Documentation ¶
Index ¶
- Variables
- func MethodNotAllowedHandler(c *fasthttp.RequestCtx)
- func NotFoundHandler(c *fasthttp.RequestCtx)
- func RecoverHanlder(c *fasthttp.RequestCtx)
- type GroupRouter
- func (g *GroupRouter) Any(path string, h func(*fasthttp.RequestCtx) (_ bool))
- func (g *GroupRouter) Delete(path string, h func(*fasthttp.RequestCtx) (_ bool))
- func (g *GroupRouter) Get(path string, h func(*fasthttp.RequestCtx) (_ bool))
- func (g *GroupRouter) Group(path string) (cg *GroupRouter)
- func (g *GroupRouter) Head(path string, h func(*fasthttp.RequestCtx) (_ bool))
- func (g *GroupRouter) Method(path, method string, h func(*fasthttp.RequestCtx) (_ bool))
- func (g *GroupRouter) Options(path string, h func(*fasthttp.RequestCtx) (_ bool))
- func (g *GroupRouter) Patch(path string, h func(*fasthttp.RequestCtx) (_ bool))
- func (g *GroupRouter) Post(path string, h func(*fasthttp.RequestCtx) (_ bool))
- func (g *GroupRouter) Put(path string, h func(*fasthttp.RequestCtx) (_ bool))
- func (g *GroupRouter) Use(h func(*fasthttp.RequestCtx) (abort bool))
- type Router
- func (r *Router) Any(path string, h func(*fasthttp.RequestCtx) (_ bool))
- func (r *Router) BuildHandler() func(ctx *fasthttp.RequestCtx)
- func (r *Router) Delete(path string, h func(*fasthttp.RequestCtx) (_ bool))
- func (r *Router) Get(path string, h func(*fasthttp.RequestCtx) (_ bool))
- func (r *Router) Group(path string) (g *GroupRouter)
- func (r *Router) Handler(ctx *fasthttp.RequestCtx)
- func (r *Router) Head(path string, h func(*fasthttp.RequestCtx) (_ bool))
- func (r *Router) Method(path, method string, h func(*fasthttp.RequestCtx) (_ bool))
- func (r *Router) MethodNotAllowed(h func(*fasthttp.RequestCtx))
- func (r *Router) NotFound(h func(*fasthttp.RequestCtx))
- func (r *Router) OnError(h func(*fasthttp.RequestCtx))
- func (r *Router) Options(path string, h func(*fasthttp.RequestCtx) (_ bool))
- func (r *Router) Patch(path string, h func(*fasthttp.RequestCtx) (_ bool))
- func (r *Router) Post(path string, h func(*fasthttp.RequestCtx) (_ bool))
- func (r *Router) Put(path string, h func(*fasthttp.RequestCtx) (_ bool))
- func (r *Router) Recover(h func(*fasthttp.RequestCtx))
- func (r *Router) Use(h func(*fasthttp.RequestCtx) (abort bool))
Constants ¶
This section is empty.
Variables ¶
View Source
var StrRecoverPanic = "Recovered from panic:"
StrRecoverPanic string
Functions ¶
func MethodNotAllowedHandler ¶ added in v1.0.1
func MethodNotAllowedHandler(c *fasthttp.RequestCtx)
MethodNotAllowedHandler is default MethodNotAllowedHandler
func NotFoundHandler ¶ added in v1.0.1
func NotFoundHandler(c *fasthttp.RequestCtx)
NotFoundHandler is default NotFoundHandler
func RecoverHanlder ¶ added in v1.0.1
func RecoverHanlder(c *fasthttp.RequestCtx)
RecoverHanlder is default RecoverHanlder
Types ¶
type GroupRouter ¶
type GroupRouter struct {
// contains filtered or unexported fields
}
GroupRouter struct
func (*GroupRouter) Any ¶
func (g *GroupRouter) Any(path string, h func(*fasthttp.RequestCtx) (_ bool))
Any method
func (*GroupRouter) Delete ¶
func (g *GroupRouter) Delete(path string, h func(*fasthttp.RequestCtx) (_ bool))
Delete method
func (*GroupRouter) Get ¶
func (g *GroupRouter) Get(path string, h func(*fasthttp.RequestCtx) (_ bool))
Get method
func (*GroupRouter) Group ¶
func (g *GroupRouter) Group(path string) (cg *GroupRouter)
Group create another group
func (*GroupRouter) Head ¶
func (g *GroupRouter) Head(path string, h func(*fasthttp.RequestCtx) (_ bool))
Head method
func (*GroupRouter) Method ¶ added in v1.0.1
func (g *GroupRouter) Method(path, method string, h func(*fasthttp.RequestCtx) (_ bool))
Method specific
func (*GroupRouter) Options ¶
func (g *GroupRouter) Options(path string, h func(*fasthttp.RequestCtx) (_ bool))
Options method
func (*GroupRouter) Patch ¶
func (g *GroupRouter) Patch(path string, h func(*fasthttp.RequestCtx) (_ bool))
Patch method
func (*GroupRouter) Post ¶
func (g *GroupRouter) Post(path string, h func(*fasthttp.RequestCtx) (_ bool))
Post method
func (*GroupRouter) Put ¶
func (g *GroupRouter) Put(path string, h func(*fasthttp.RequestCtx) (_ bool))
Put method
func (*GroupRouter) Use ¶
func (g *GroupRouter) Use(h func(*fasthttp.RequestCtx) (abort bool))
Use middlewares
type Router ¶
type Router struct { RecoverHanlder func(*fasthttp.RequestCtx) NotFoundHandler func(*fasthttp.RequestCtx) MethodNotAllowedHandler func(*fasthttp.RequestCtx) // contains filtered or unexported fields }
Router struct
func (*Router) Any ¶
func (r *Router) Any(path string, h func(*fasthttp.RequestCtx) (_ bool))
Any method
func (*Router) BuildHandler ¶
func (r *Router) BuildHandler() func(ctx *fasthttp.RequestCtx)
BuildHandler return the request handler
func (*Router) Delete ¶
func (r *Router) Delete(path string, h func(*fasthttp.RequestCtx) (_ bool))
Delete method
func (*Router) Get ¶
func (r *Router) Get(path string, h func(*fasthttp.RequestCtx) (_ bool))
Get method
func (*Router) Group ¶
func (r *Router) Group(path string) (g *GroupRouter)
Group make a group of routers
func (*Router) Handler ¶ added in v1.0.1
func (r *Router) Handler(ctx *fasthttp.RequestCtx)
Handler ate request :v
func (*Router) Head ¶
func (r *Router) Head(path string, h func(*fasthttp.RequestCtx) (_ bool))
Head method
func (*Router) Method ¶ added in v1.0.1
func (r *Router) Method(path, method string, h func(*fasthttp.RequestCtx) (_ bool))
Method specific
func (*Router) MethodNotAllowed ¶
func (r *Router) MethodNotAllowed(h func(*fasthttp.RequestCtx))
MethodNotAllowed handler
func (*Router) OnError ¶
func (r *Router) OnError(h func(*fasthttp.RequestCtx))
OnError is an alias of r.Recover()
func (*Router) Options ¶
func (r *Router) Options(path string, h func(*fasthttp.RequestCtx) (_ bool))
Options method
func (*Router) Patch ¶
func (r *Router) Patch(path string, h func(*fasthttp.RequestCtx) (_ bool))
Patch method
func (*Router) Post ¶
func (r *Router) Post(path string, h func(*fasthttp.RequestCtx) (_ bool))
Post method
func (*Router) Put ¶
func (r *Router) Put(path string, h func(*fasthttp.RequestCtx) (_ bool))
Put method
func (*Router) Recover ¶ added in v1.0.1
func (r *Router) Recover(h func(*fasthttp.RequestCtx))
Recover set RecoverHanlder
Click to show internal directories.
Click to hide internal directories.