events

package
v0.0.0-...-fefa4f9 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GatewayProxyResponder

type GatewayProxyResponder struct {
	// contains filtered or unexported fields
}

GatewayProxyResponder provides a standard mechanism to create instances of APIGatewayProxyResponse. The instance can optionally sign the body of the response when a private key is provided

func NewGatewayProxyResponder

func NewGatewayProxyResponder(signingPrivateKey *rsa.PrivateKey) *GatewayProxyResponder

NewGatewayProxyResponder returns an initialised responder

func (*GatewayProxyResponder) AddHeader

func (g *GatewayProxyResponder) AddHeader(header, value string)

AddHeader allows a single header to be added

func (*GatewayProxyResponder) NewAPIResponse

func (g *GatewayProxyResponder) NewAPIResponse(status int, body any) (*events.APIGatewayProxyResponse, error)

NewAPIResponse formats the response for the API Gateway

func (*GatewayProxyResponder) NewErrorAPIResponse

func (g *GatewayProxyResponder) NewErrorAPIResponse(status int, e error) *events.APIGatewayProxyResponse

NewErrorAPIResponse returns a standard body for errors

Jump to

Keyboard shortcuts

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