middlewares

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2025 License: MIT Imports: 6 Imported by: 0

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

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

Jump to

Keyboard shortcuts

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