Versions in this module Expand all Collapse all v1 v1.0.2 Nov 22, 2021 v1.0.1 Nov 22, 2021 Changes in this version + const Version + var ExposeServerErrors = true + func Delete(pattern string, handler HandlerFunc) + func Get(pattern string, handler HandlerFunc) + func HandleError(err error) (events.APIGatewayProxyResponse, error) + func Handler(ctx context.Context, request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) + func Head(pattern string, handler HandlerFunc) + func MarshalResponse(status int, headers map[string]string, data interface{}) (events.APIGatewayProxyResponse, error) + func Options(pattern string, handler HandlerFunc) + func Param(r *http.Request, key string) string + func Params(r *http.Request) map[string]string + func Patch(pattern string, handler HandlerFunc) + func Post(pattern string, handler HandlerFunc) + func Put(pattern string, handler HandlerFunc) + type Group struct + Name string + func NewGroup(name string) *Group + func (g *Group) Delete(pattern string, handler HandlerFunc) + func (g *Group) Get(pattern string, handler HandlerFunc) + func (g *Group) Head(pattern string, handler HandlerFunc) + func (g *Group) Options(pattern string, handler HandlerFunc) + func (g *Group) Patch(pattern string, handler HandlerFunc) + func (g *Group) Post(pattern string, handler HandlerFunc) + func (g *Group) Put(pattern string, handler HandlerFunc) + type HandlerFunc func(ctx context.Context, request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) + type Matched struct + Node *Node + Params map[string]string + Path string + type Node struct + func (n *Node) BuildURL(pairs ...string) (*url.URL, error) + func (n *Node) GetAllow() []string + func (n *Node) GetHandler(method string) interface{} + func (n *Node) GetName(name string) *Node + func (n *Node) Handle(method string, handler interface{}) + func (n *Node) Name(name string) *Node + type Router struct + func New(opts ...TOptions) *Router + func (r *Router) DefaultHandler(handler HandlerFunc) + func (r *Router) Delete(pattern string, handler HandlerFunc) + func (r *Router) Get(pattern string, handler HandlerFunc) + func (r *Router) Handle(method, pattern string, handler HandlerFunc) + func (r *Router) Handler(ctx context.Context, request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) + func (r *Router) Head(pattern string, handler HandlerFunc) + func (r *Router) Options(pattern string, handler HandlerFunc) + func (r *Router) Patch(pattern string, handler HandlerFunc) + func (r *Router) Post(pattern string, handler HandlerFunc) + func (r *Router) Put(pattern string, handler HandlerFunc) + type RouterError struct + Code int + Message string + func (err RouterError) Error() string + type TOptions struct + CaseSensitive bool + PathClean bool + StrictSlash bool + UseEncodedPath bool + type Trie struct + func NewTrie(args ...TOptions) *Trie + func (t *Trie) Match(path string) (*Matched, error) + func (t *Trie) Parse(pattern string) *Node