Documentation
¶
Overview ¶
Package libChi provides the v2 chi web framework adapter for requestCore.
chi is used as the default router for the net/http v2 adapter, providing richer routing features (middleware, groups, path parameters) than the standard http.ServeMux.
Index ¶
- type ChiRouter
- func (r *ChiRouter) Delete(pattern string, handler routing.Handler) error
- func (r *ChiRouter) Get(pattern string, handler routing.Handler) error
- func (r *ChiRouter) Group(prefix string) routing.RouteGroup
- func (r *ChiRouter) Handle(method, pattern string, handler routing.Handler) error
- func (r *ChiRouter) Head(pattern string, handler routing.Handler) error
- func (r *ChiRouter) MethodNotAllowed(handler routing.Handler)
- func (r *ChiRouter) Native() any
- func (r *ChiRouter) NotFound(handler routing.Handler)
- func (r *ChiRouter) Patch(pattern string, handler routing.Handler) error
- func (r *ChiRouter) Post(pattern string, handler routing.Handler) error
- func (r *ChiRouter) Put(pattern string, handler routing.Handler) error
- func (r *ChiRouter) SetErrorHandler(handler *response.Handler)
- func (r *ChiRouter) With(middleware ...routing.Middleware) routing.RouteGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChiRouter ¶
type ChiRouter struct {
// contains filtered or unexported fields
}
ChiRouter implements routing.Router using chi.
func NewRouterFromMux ¶
NewRouterFromMux creates a new ChiRouter from an existing chi.Mux.
func (*ChiRouter) Group ¶
func (r *ChiRouter) Group(prefix string) routing.RouteGroup
Group creates a sub-group with the given prefix.
func (*ChiRouter) MethodNotAllowed ¶
MethodNotAllowed sets the handler for disallowed methods.
func (*ChiRouter) SetErrorHandler ¶
SetErrorHandler installs the v2 response handler and error registry used for centralized error dispatch.
func (*ChiRouter) With ¶
func (r *ChiRouter) With(middleware ...routing.Middleware) routing.RouteGroup
With returns a new group with additional middleware.
Click to show internal directories.
Click to hide internal directories.