awslambdago

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIGatewayTransport

type APIGatewayTransport = func(ctx context.Context, req *events.APIGatewayProxyRequest) (*events.APIGatewayProxyResponse, error)

func NewAPIGatewayHSTSMiddleware added in v0.4.0

func NewAPIGatewayHSTSMiddleware(transport APIGatewayTransport, maxAge time.Duration) APIGatewayTransport

adds a default HSTS header to the APIGateway response. If the maxAge is 0, it will default to `63072000` seconds

func NewAPIGatewayTransport

func NewAPIGatewayTransport[TIn, TOut any](
	decode func(*events.APIGatewayProxyRequest) (TIn, error),
	encode func(TOut) (*events.APIGatewayProxyResponse, error),
	encodeError func(error) *events.APIGatewayProxyResponse,
	endpoint box.Endpoint[TIn, TOut],
) APIGatewayTransport

type CloudWatchEventTransport

type CloudWatchEventTransport = func(ctx context.Context, e *events.CloudWatchEvent) (any, error)

func NewClouadWatchEventTransport

func NewClouadWatchEventTransport[TIn, TOut any](
	decode func(*events.CloudWatchEvent) (TIn, error),
	endpoint box.Endpoint[TIn, TOut],
) CloudWatchEventTransport

type KinesisTransport

type KinesisTransport = func(ctx context.Context, e *events.KinesisEvent) (*events.KinesisEventResponse, error)

func NewKinesisTransport

func NewKinesisTransport[TIn, TOut any](
	decode func(events.KinesisEventRecord) (TIn, error),
	endpoint box.Endpoint[TIn, TOut],
) KinesisTransport

type SQSTransport

type SQSTransport = func(ctx context.Context, e *events.SQSEvent) (*events.SQSEventResponse, error)

func NewSQSTransport

func NewSQSTransport[TIn, TOut any](
	fifo bool,
	decode func(events.SQSMessage) (TIn, error),
	endpoint box.Endpoint[TIn, TOut],
) SQSTransport

Jump to

Keyboard shortcuts

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