(ctx context.Context, request events.APIGatewayProxyRequest)
| 16 | } |
| 17 | |
| 18 | func handleRequest(ctx context.Context, request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) { |
| 19 | resp := &response{ |
| 20 | Message: "hello world!", |
| 21 | } |
| 22 | body, err := json.Marshal(resp) |
| 23 | if err != nil { |
| 24 | return events.APIGatewayProxyResponse{Body: string("Error parsing payload"), StatusCode: 400}, err |
| 25 | } |
| 26 | return events.APIGatewayProxyResponse{Body: string(body), StatusCode: 200}, nil |
| 27 | } |
| 28 | |
| 29 | func main() { |
| 30 | lambda.Start(handleRequest) |
nothing calls this directly
no outgoing calls
no test coverage detected