Versions in this module Expand all Collapse all v0 v0.4.7 May 5, 2022 v0.4.6 May 5, 2022 Changes in this version + var ExposeServerErrors = true + func BasicAuth(req events.APIGatewayProxyRequest) (user, pass string) + func HandleError(err error) (events.APIGatewayProxyResponse, error) + func HandleHTTPError(status int, err error) (events.APIGatewayProxyResponse, error) + func MarshalResponse(status int, headers map[string]string, data interface{}) (events.APIGatewayProxyResponse, error) + func UnmarshalRequest(req events.APIGatewayProxyRequest, body bool, target interface{}) error + type HTTPError struct + Message string + Status int + func (err HTTPError) Error() string + type Handler func(context.Context, events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) + type Middleware func(Handler) Handler + type Router struct + func NewRouter(basePath string, middleware ...Middleware) (l *Router) + func (l *Router) GetOptionsHandler() Handler + func (l *Router) Handler(ctx context.Context, req events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) + func (l *Router) Route(method, path string, handler Handler, middleware ...Middleware) + func (l *Router) ServeHTTP(w http.ResponseWriter, r *http.Request)