util

package
v0.0.0-...-406d2ef Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2022 License: MIT Imports: 5 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL