Documentation ¶
Index ¶
- Variables
- type Context
- type Handler
- type Node
- func (p *Node) Any(path string, h ...Handler) *Node
- func (p *Node) Controller(path string, c interface{}) *Node
- func (p *Node) Delete(path string, h ...Handler) *Node
- func (p *Node) Get(path string, h ...Handler) *Node
- func (p *Node) Group(path string, funs ...func(node *Node)) *Node
- func (p *Node) Head(path string, h ...Handler) *Node
- func (p *Node) Option(path string, h ...Handler) *Node
- func (p *Node) Post(path string, h ...Handler) *Node
- func (p *Node) Put(path string, h ...Handler) *Node
- func (p *Node) Use(h ...Handler) *Node
- func (p *Node) UseToChild(h ...Handler) *Node
- type Router
- func (p *Router) Any(path string, h ...Handler) *Node
- func (p *Router) Controller(path string, c interface{}) *Node
- func (p *Router) Delete(path string, h ...Handler) *Node
- func (p *Router) Get(path string, h ...Handler) *Node
- func (p *Router) Group(path string, funs ...func(node *Node)) *Node
- func (p *Router) Head(path string, h ...Handler) *Node
- func (p *Router) Init() func(ctx *fasthttp.RequestCtx)
- func (p *Router) Option(path string, h ...Handler) *Node
- func (p *Router) Post(path string, h ...Handler) *Node
- func (p *Router) Put(path string, h ...Handler) *Node
- func (p *Router) Use(h ...Handler) *Node
- func (p *Router) UseToChild(h ...Handler) *Node
- func (p *Router) When404(h Handler)
- func (p *Router) When405(h Handler)
Constants ¶
This section is empty.
Variables ¶
View Source
var METHOD_ANY = util.S2B("ANY")
View Source
var METHOD_DELETE = util.S2B("DELETE")
View Source
var METHOD_GET = util.S2B("GET")
View Source
var METHOD_HEAD = util.S2B("HEAD")
View Source
var METHOD_OPTION = util.S2B("OPTION")
View Source
var METHOD_POST = util.S2B("POST")
View Source
var METHOD_PUT = util.S2B("PUT")
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { *fasthttp.RequestCtx // contains filtered or unexported fields }
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
use a tree struct to save all url node
func (*Node) Controller ¶
func (*Node) UseToChild ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) Controller ¶
func (*Router) Init ¶
func (p *Router) Init() func(ctx *fasthttp.RequestCtx)
func (*Router) UseToChild ¶
Click to show internal directories.
Click to hide internal directories.