Documentation ¶
Index ¶
- func FileServer(r chi.Router, public string, static string)
- type ChiRouter
- func (cr *ChiRouter) Delete(pattern string, handler WrapperFunc)
- func (cr *ChiRouter) Get(pattern string, handler WrapperFunc)
- func (cr *ChiRouter) GetHandler() *chi.Mux
- func (cr *ChiRouter) Group(prefix string, fn func(r RouteInterface)) RouteInterface
- func (cr *ChiRouter) Handle(pattern string, handler http.Handler)
- func (cr *ChiRouter) Match(rctx *chi.Context, method, path string) bool
- func (cr *ChiRouter) Middlewares() chi.Middlewares
- func (cr *ChiRouter) Mount(pattern string, handler http.Handler)
- func (cr *ChiRouter) Patch(pattern string, handler WrapperFunc)
- func (cr *ChiRouter) Post(pattern string, handler WrapperFunc)
- func (cr *ChiRouter) Put(pattern string, handler WrapperFunc)
- func (cr *ChiRouter) Routes() []chi.Route
- func (cr *ChiRouter) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (cr *ChiRouter) StaticFS(pattern, imgDir string)
- func (cr *ChiRouter) Use(middlewares ...func(http.Handler) http.Handler)
- func (cr *ChiRouter) With(middlewares ...func(http.Handler) http.Handler) RouteInterface
- type RouteInterface
- type WrapperFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChiRouter ¶
type ChiRouter struct {
// contains filtered or unexported fields
}
func NewChiRouter ¶
func (*ChiRouter) Delete ¶
func (cr *ChiRouter) Delete(pattern string, handler WrapperFunc)
func (*ChiRouter) Get ¶
func (cr *ChiRouter) Get(pattern string, handler WrapperFunc)
func (*ChiRouter) GetHandler ¶
func (*ChiRouter) Group ¶
func (cr *ChiRouter) Group(prefix string, fn func(r RouteInterface)) RouteInterface
func (*ChiRouter) Middlewares ¶
func (cr *ChiRouter) Middlewares() chi.Middlewares
func (*ChiRouter) Patch ¶
func (cr *ChiRouter) Patch(pattern string, handler WrapperFunc)
func (*ChiRouter) Post ¶
func (cr *ChiRouter) Post(pattern string, handler WrapperFunc)
func (*ChiRouter) Put ¶
func (cr *ChiRouter) Put(pattern string, handler WrapperFunc)
type RouteInterface ¶
type RouteInterface interface { chi.Routes GetHandler() *chi.Mux Handle(pattern string, handler http.Handler) Group(prefix string, fn func(r RouteInterface)) RouteInterface Get(pattern string, handler WrapperFunc) Post(pattern string, handler WrapperFunc) Patch(pattern string, handler WrapperFunc) Delete(pattern string, handler WrapperFunc) Put(pattern string, handler WrapperFunc) Use(middlewares ...func(http.Handler) http.Handler) With(middlewares ...func(http.Handler) http.Handler) RouteInterface Mount(pattern string, handler http.Handler) StaticFS(pattern, imgDir string) }
type WrapperFunc ¶
Click to show internal directories.
Click to hide internal directories.