updating example based on feedback

This commit is contained in:
Sebastian Borza 2018-07-24 15:13:04 -05:00
parent 3db9dc23ed
commit 3ae60c03bd
No known key found for this signature in database
GPG Key ID: CA2A58DAF0E754A7
3 changed files with 14 additions and 16 deletions

View File

@ -64,12 +64,12 @@ services:
volumes:
- ./tmp/serverless-integration-test-aws-fsharp:/app
aws-go:
image: golang:1.10
image: golang:1.9
volumes:
- ./tmp/serverless-integration-test-aws-go:/app
- ./tmp/serverless-integration-test-aws-go:/go/src/app
aws-go-dep:
image: golang:1.10
image: yunspace/golang:1.9
volumes:
- ./tmp/serverless-integration-test-aws-go-dep:/app
- ./tmp/serverless-integration-test-aws-go-dep:/go/src/app

View File

@ -5,16 +5,15 @@ import (
"context"
"encoding/json"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
)
// Response is the default struct required to reply to an AWS Lambda request
type Response struct {
StatusCode int `json:"statusCode"`
IsBase64Encoded bool `json:"isBase64Encoded"`
Body string `json:"body"`
Headers map[string]string `json:"headers"`
}
// Response is of type APIGatewayProxyResponse since we're leveraging the
// AWS Lambda Proxy Request functionality (default behavior)
//
// https://serverless.com/framework/docs/providers/aws/events/apigateway/#lambda-proxy-integration
type Response events.APIGatewayProxyResponse
// Handler is our lambda handler invoked by the `lambda.Start` function call
func Handler(ctx context.Context) (Response, error) {

View File

@ -5,16 +5,15 @@ import (
"context"
"encoding/json"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
)
// Response is the default struct required to reply to an AWS Lambda request
type Response struct {
StatusCode int `json:"statusCode"`
IsBase64Encoded bool `json:"isBase64Encoded"`
Body string `json:"body"`
Headers map[string]string `json:"headers"`
}
// Response is of type APIGatewayProxyResponse since we're leveraging the
// AWS Lambda Proxy Request functionality (default behavior)
//
// https://serverless.com/framework/docs/providers/aws/events/apigateway/#lambda-proxy-integration
type Response events.APIGatewayProxyResponse
// Handler is our lambda handler invoked by the `lambda.Start` function call
func Handler(ctx context.Context) (Response, error) {