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
Click to show internal directories.
Click to hide internal directories.