Versions in this module Expand all Collapse all v2 deprecated v2.1.1 Sep 7, 2023 Changes in this version + var RouteCtxKey = &contextKey + func ServerBaseContext(h http.Handler, baseCtx context.Context) http.Handler + func URLParam(r *http.Request, key string) string + func URLParamFromCtx(ctx context.Context, key string) string + type ChainHandler struct + Endpoint http.Handler + Middlewares Middlewares + func (c *ChainHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type Context struct + RoutePath string + RoutePattern string + RoutePatterns []string + URLParams params + func NewRouteContext() *Context + func RouteContext(ctx context.Context) *Context + type Middlewares []func(http.Handler) http.Handler + func Chain(middlewares ...func(http.Handler) http.Handler) Middlewares + func (mws Middlewares) Handler(h http.Handler) http.Handler + func (mws Middlewares) HandlerFunc(h http.HandlerFunc) http.Handler + type Mux struct + func NewMux() *Mux + func NewRouter() *Mux + func (mx *Mux) Connect(pattern string, handlerFn http.HandlerFunc) + func (mx *Mux) Delete(pattern string, handlerFn http.HandlerFunc) + func (mx *Mux) FileServer(path string, root http.FileSystem) + func (mx *Mux) Get(pattern string, handlerFn http.HandlerFunc) + func (mx *Mux) Group(fn func(r Router)) Router + func (mx *Mux) Handle(pattern string, handler http.Handler) + func (mx *Mux) HandleFunc(pattern string, handlerFn http.HandlerFunc) + func (mx *Mux) Head(pattern string, handlerFn http.HandlerFunc) + func (mx *Mux) MethodNotAllowed(handlerFn http.HandlerFunc) + func (mx *Mux) MethodNotAllowedHandler() http.HandlerFunc + func (mx *Mux) Middlewares() Middlewares + func (mx *Mux) Mount(pattern string, handler http.Handler) + func (mx *Mux) NotFound(handlerFn http.HandlerFunc) + func (mx *Mux) NotFoundHandler() http.HandlerFunc + func (mx *Mux) Options(pattern string, handlerFn http.HandlerFunc) + func (mx *Mux) Patch(pattern string, handlerFn http.HandlerFunc) + func (mx *Mux) Post(pattern string, handlerFn http.HandlerFunc) + func (mx *Mux) Put(pattern string, handlerFn http.HandlerFunc) + func (mx *Mux) Route(pattern string, fn func(r Router)) Router + func (mx *Mux) Routes() []Route + func (mx *Mux) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (mx *Mux) Trace(pattern string, handlerFn http.HandlerFunc) + func (mx *Mux) Use(middlewares ...func(http.Handler) http.Handler) + func (mx *Mux) With(middlewares ...func(http.Handler) http.Handler) Router + type Route struct + Handlers map[string]http.Handler + Pattern string + SubRoutes Routes + type Router interface + Connect func(pattern string, h http.HandlerFunc) + Delete func(pattern string, h http.HandlerFunc) + Get func(pattern string, h http.HandlerFunc) + Group func(fn func(r Router)) Router + Handle func(pattern string, h http.Handler) + HandleFunc func(pattern string, h http.HandlerFunc) + Head func(pattern string, h http.HandlerFunc) + MethodNotAllowed func(h http.HandlerFunc) + Mount func(pattern string, h http.Handler) + NotFound func(h http.HandlerFunc) + Options func(pattern string, h http.HandlerFunc) + Patch func(pattern string, h http.HandlerFunc) + Post func(pattern string, h http.HandlerFunc) + Put func(pattern string, h http.HandlerFunc) + Route func(pattern string, fn func(r Router)) Router + Trace func(pattern string, h http.HandlerFunc) + Use func(middlewares ...func(http.Handler) http.Handler) + With func(middlewares ...func(http.Handler) http.Handler) Router + type Routes interface + Middlewares func() Middlewares + Routes func() []Route Other modules containing this package github.com/go-chi/chi github.com/go-chi/chi/v3 github.com/go-chi/chi/v4 github.com/go-chi/chi/v5