Documentation ¶
Overview ¶
Package lambda provides helpers for interacting with AWS Lambda/API Gateway
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Start ¶
func Start(fn func(context.Context, events.APIGatewayProxyRequest) (*events.APIGatewayProxyResponse, error))
Start wraps the provided handler function and returns the error message within the response. This allows for normal Go error handling to take place within the handler function while ensuring the error is contextualized within the API Gateway response.
Types ¶
type APIGatewayError ¶
type APIGatewayError interface {
StatusCode() int
}
type BadRequestError ¶
type BadRequestError struct {
Message string
}
func (BadRequestError) Error ¶
func (e BadRequestError) Error() string
func (BadRequestError) StatusCode ¶
func (BadRequestError) StatusCode() int
type NotFoundError ¶
type NotFoundError struct {
Message string
}
func (NotFoundError) Error ¶
func (e NotFoundError) Error() string
func (NotFoundError) StatusCode ¶
func (NotFoundError) StatusCode() int
type UnauthorizedError ¶
type UnauthorizedError struct {
}func (UnauthorizedError) Error ¶
func (e UnauthorizedError) Error() string
func (UnauthorizedError) StatusCode ¶
func (UnauthorizedError) StatusCode() int
Click to show internal directories.
Click to hide internal directories.