Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandlerV1 ¶
func NewHandlerV1(typedHandler LambdaHTTPV1) lambda.Handler
NewHandlerV1 is a helper function that takes a typed handler's interface implementation and makes it compatible with lambda.Handler.
func NewHandlerV2 ¶
func NewHandlerV2(typedHandler LambdaHTTPV2) lambda.Handler
NewHandlerV2 is a helper function that takes a typed handler's interface implementation and makes it compatible with lambda.Handler.
Types ¶
type LambdaHTTPV1 ¶
type LambdaHTTPV1 interface {
Handle(ctx context.Context, request *events.APIGatewayProxyRequest) (response *events.APIGatewayProxyResponse, err error)
}
LambdaHTTPV1 is a typed interface to implement when the Lambda handles HTTP requests from V1 of API Gateway. It's meant to be implemented, then wrapped with NewHandlerV1. API Gateway V2 is the latest.
type LambdaHTTPV2 ¶
type LambdaHTTPV2 interface {
Handle(ctx context.Context, request *events.APIGatewayV2HTTPRequest) (response *events.APIGatewayV2HTTPResponse, err error)
}
LambdaHTTPV2 is a typed interface to implement when the Lambda handles HTTP requests from V2 of API Gateway. It's meant to be implemented, then wrapped with NewHandlerV2.
Click to show internal directories.
Click to hide internal directories.