Skip to content

Commit

Permalink
moving into alignment with existing example repo
Browse files Browse the repository at this point in the history
  • Loading branch information
sebito91 committed Jul 31, 2018
1 parent a3b7daa commit 4ed8130
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
13 changes: 6 additions & 7 deletions examples/aws-golang-simple-http-endpoint/hello/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
13 changes: 6 additions & 7 deletions examples/aws-golang-simple-http-endpoint/world/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4ed8130

Please sign in to comment.