Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CognitoUser ¶
type CognitoUser struct {
UserID string
Username string
Email string
Groups []string
TokenData map[string]interface{}
}
CognitoDummyUser represents user data that would come from Cognito
type LambdaHandler ¶
type LambdaHandler func(events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
LambdaHandler is a type alias for the standard Lambda handler function
func Chain ¶
func Chain(handler LambdaHandler, middlewares ...Middleware) LambdaHandler
Chain applies multiple middleware to a handler in the order they are provided
type Middleware ¶
type Middleware func(LambdaHandler) LambdaHandler
Middleware is a function that wraps a LambdaHandler and returns a new LambdaHandler
func CognitoAuthMiddleware ¶
func CognitoAuthMiddleware() Middleware
CognitoAuthMiddleware returns a Middleware that adds Cognito authentication data to the request
func LoggingMiddleware ¶
func LoggingMiddleware() Middleware
LoggingMiddleware returns a Middleware that logs requests and responses
Click to show internal directories.
Click to hide internal directories.