Documentation
¶
Index ¶
- func RunLocalServer(router *Router, addr string, logger *log.Logger) error
- type Handler
- type HandlerFunc
- type LambdaAdapter
- type Middleware
- type MiddlewareConfig
- type MiddlewareFunc
- type Response
- type Router
- func (r *Router) AddRoute(method, path string, handler Handler)
- func (r *Router) HandleRequest(ctx context.Context, req events.LambdaFunctionURLRequest) Response
- func (r *Router) SetMethodNotAllowedHandler(handler Handler)
- func (r *Router) SetNotFoundHandler(handler Handler)
- func (r *Router) SetPanicHandler(handler func(context.Context, events.LambdaFunctionURLRequest) Response)
- func (r *Router) SetStripTrailingSlash(strip bool)
- func (r *Router) UsePost(mw MiddlewareFunc, config MiddlewareConfig)
- func (r *Router) UsePre(mw MiddlewareFunc, config MiddlewareConfig)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
type Handler interface {
ServeHTTP(context.Context, events.LambdaFunctionURLRequest) Response
}
type HandlerFunc ¶
type HandlerFunc func(context.Context, events.LambdaFunctionURLRequest) Response
func (HandlerFunc) ServeHTTP ¶
func (f HandlerFunc) ServeHTTP(ctx context.Context, req events.LambdaFunctionURLRequest) Response
type LambdaAdapter ¶
type LambdaAdapter struct {
// contains filtered or unexported fields
}
func NewLambdaAdapter ¶
func NewLambdaAdapter(router *Router, logger *log.Logger) *LambdaAdapter
type Middleware ¶
type Middleware struct { Func MiddlewareFunc Config MiddlewareConfig }
type MiddlewareConfig ¶
type MiddlewareFunc ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) HandleRequest ¶
func (*Router) SetMethodNotAllowedHandler ¶
func (*Router) SetNotFoundHandler ¶
func (*Router) SetPanicHandler ¶
func (*Router) SetStripTrailingSlash ¶
func (*Router) UsePost ¶
func (r *Router) UsePost(mw MiddlewareFunc, config MiddlewareConfig)
func (*Router) UsePre ¶
func (r *Router) UsePre(mw MiddlewareFunc, config MiddlewareConfig)
Click to show internal directories.
Click to hide internal directories.