Documentation
¶
Index ¶
- Variables
- func Chain(h http.Handler, mw ...Middleware) http.Handler
- type Middleware
- type Route
- type Router
- func (r *Router) Any(pattern string, fn http.HandlerFunc, mw ...Middleware) *Route
- func (r *Router) Delete(pattern string, fn http.HandlerFunc, mw ...Middleware) *Route
- func (r *Router) Get(pattern string, fn http.HandlerFunc, mw ...Middleware) *Route
- func (r *Router) Group(prefix string, mw ...Middleware) *Router
- func (r *Router) Handle(method, pattern string, h http.Handler, mw ...Middleware) *Route
- func (r *Router) HandleFunc(method, pattern string, fn http.HandlerFunc, mw ...Middleware) *Route
- func (r *Router) Mount(prefix string, h http.Handler, mw ...Middleware) *Route
- func (r *Router) MustReverse(name string, values ...any) string
- func (r *Router) Named(name string) (Route, bool)
- func (r *Router) NotFound() http.Handler
- func (r *Router) Patch(pattern string, fn http.HandlerFunc, mw ...Middleware) *Route
- func (r *Router) Post(pattern string, fn http.HandlerFunc, mw ...Middleware) *Route
- func (r *Router) Put(pattern string, fn http.HandlerFunc, mw ...Middleware) *Route
- func (r *Router) Reverse(name string, values ...any) (string, error)
- func (r *Router) Routes() []Route
- func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request)
- func (r *Router) SetNotFound(handler http.Handler)
- func (r *Router) Static(prefix string, fsys fs.FS) *Route
- func (r *Router) Use(mw ...Middleware)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Route ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) Any ¶
func (r *Router) Any(pattern string, fn http.HandlerFunc, mw ...Middleware) *Route
func (*Router) Delete ¶
func (r *Router) Delete(pattern string, fn http.HandlerFunc, mw ...Middleware) *Route
func (*Router) Get ¶
func (r *Router) Get(pattern string, fn http.HandlerFunc, mw ...Middleware) *Route
func (*Router) HandleFunc ¶
func (r *Router) HandleFunc(method, pattern string, fn http.HandlerFunc, mw ...Middleware) *Route
func (*Router) Patch ¶
func (r *Router) Patch(pattern string, fn http.HandlerFunc, mw ...Middleware) *Route
func (*Router) Post ¶
func (r *Router) Post(pattern string, fn http.HandlerFunc, mw ...Middleware) *Route
func (*Router) Put ¶
func (r *Router) Put(pattern string, fn http.HandlerFunc, mw ...Middleware) *Route
func (*Router) SetNotFound ¶
func (*Router) Use ¶
func (r *Router) Use(mw ...Middleware)
Click to show internal directories.
Click to hide internal directories.