Documentation ¶
Index ¶
- type IWrapper
- type Option
- type Wrapper
- func (r *Wrapper) Action(handlers ...customrest.ICustomRest)
- func (r *Wrapper) Group(fn func(r chi.Router)) chi.Router
- func (r *Wrapper) Handle(pattern string, handler http.Handler)
- func (r *Wrapper) Method(method, pattern string, handler http.Handler)
- func (r *Wrapper) Mount(pattern string, handler http.Handler)
- func (r *Wrapper) Route(pattern string, fn func(r chi.Router)) chi.Router
- func (r *Wrapper) With(middlewares ...func(http.Handler) http.Handler) chi.Router
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IWrapper ¶
type IWrapper interface { chi.Router Action(...customrest.ICustomRest) }
IWrapper ...
type Wrapper ¶
type Wrapper struct { chi.Router PrepareHandler customrest.Handler }
Wrapper wraps chi.Router to pre-process http.Handler and add support for ActionHandler
func (*Wrapper) Action ¶
func (r *Wrapper) Action(handlers ...customrest.ICustomRest)
Action adds one or more HTTPAction for `h.Pattern()` that matches the `h.HTTPMethod()` HTTP method
func (*Wrapper) Group ¶
Group adds a new inline-Router along the current routing path, with a fresh middleware stack for the inline-Router
Click to show internal directories.
Click to hide internal directories.