mirror of
https://github.com/serverless/serverless.git
synced 2026-02-01 16:07:28 +00:00
updating example based on feedback
This commit is contained in:
parent
3db9dc23ed
commit
3ae60c03bd
@ -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
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user