Versions in this module Expand all Collapse all v0 v0.1.0 Aug 20, 2021 Changes in this version + var ErrUnsupportedEventType = errors.New("unsupported event type") + func New(h HandlerFunc) lambda.Handler + func NewWithConfig(c Config, h HandlerFunc) lambda.Handler + func StatusCode(err error) int + type Config struct + Middleware MiddlewareFunc + OnBind func(Context, interface{}) error + OnEmptyResponse HandlerFunc + OnError func(Context, error) error + Resolver Resolver + type Context interface + Bind func(v interface{}) error + Context func() context.Context + Get func(key string) interface{} + JSON func(code int, v interface{}) error + NoContent func(code int) error + Path func(key string) string + Query func(key string) string + Request func() *Request + Response func() *Response + Set func(key string, v interface{}) + String func(code int, s string) error + type HandlerFunc func(Context) error + type MiddlewareFunc func(HandlerFunc) HandlerFunc + func Chain(m ...MiddlewareFunc) MiddlewareFunc + type Processor interface + CanProcess func(payload []byte) bool + MarshalResponse func(res *Response) ([]byte, error) + UnmarshalRequest func(payload []byte) (*Request, error) + var ALBTargetGroupEventProcessor Processor = &processor{ ... } + var APIGatewayProxyEventProcessor Processor = &processor{ ... } + var APIGatewayV2HTTPEventProcessor Processor = &processor{ ... } + type Request struct + Body string + Event interface{} + Header http.Header + Method string + Path map[string]string + Query url.Values + RawPath string + type Resolver interface + Resolve func(payload []byte) (Processor, error) + func ResolveConditional(p ...Processor) Resolver + func ResolveStatic(p Processor) Resolver + type Response struct + Body string + Headers http.Header + StatusCode int + type StatusError struct + func WrapError(code int, err error) *StatusError + func (e *StatusError) Code() int + func (e *StatusError) Error() string + func (e *StatusError) Unwrap() error