Documentation
¶
Index ¶
- type Router
- func (r Router) AllowedMethods(methods ...string) *Router
- func (r Router) BindJson(d any) error
- func (r Router) Execute(name, path string, data any) (string, error)
- func (r Router) Handler(method, path string, ...)
- func (r Router) Middleware() Router
- func (r Router) Run() (models.LambdaResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Router ¶
type Router struct { R *models.LambdaRequest W *models.LambdaResponse Ctx context.Context RouteMap map[string]map[string]func(ctx context.Context, event models.LambdaRequest) (models.LambdaResponse, error) }
func NewLambdaRouter ¶
func NewLambdaRouter(ctx context.Context, event *models.LambdaRequest) (router Router)
func (Router) AllowedMethods ¶
func (Router) Handler ¶
func (r Router) Handler(method, path string, f func(ctx context.Context, event models.LambdaRequest) (models.LambdaResponse, error))
func (Router) Middleware ¶
Click to show internal directories.
Click to hide internal directories.