Documentation ¶
Index ¶
- Constants
- type Context
- type GOweb
- type HandlerFunc
- type RouterGroup
- func (g *RouterGroup) Any(path string, handlerFunc HandlerFunc)
- func (g *RouterGroup) BottomNodeList() (sub []*RouterGroup)
- func (g *RouterGroup) CONNECT(path string, handlerFunc HandlerFunc)
- func (g *RouterGroup) DELETE(path string, handlerFunc HandlerFunc)
- func (g *RouterGroup) FootMiddleware(handlers ...HandlerFunc)
- func (g *RouterGroup) GET(path string, handlerFunc HandlerFunc)
- func (g *RouterGroup) Grep(path string) *RouterGroup
- func (g *RouterGroup) HEAD(path string, handlerFunc HandlerFunc)
- func (g *RouterGroup) List() (method, path []string)
- func (g *RouterGroup) Middleware(handlers ...HandlerFunc)
- func (g *RouterGroup) OPTIONS(path string, handlerFunc HandlerFunc)
- func (g *RouterGroup) POST(path string, handlerFunc HandlerFunc)
- func (g *RouterGroup) PUT(path string, handlerFunc HandlerFunc)
- func (g *RouterGroup) PathMatch(path, method string) (match map[string]string, handle HandlerFunc, grep *RouterGroup)
Constants ¶
View Source
const ( GET = "GET" POST = "POST" DELETE = "DELETE" PUT = "PUT" HEAD = "HEAD" OPTIONS = "OPTIONS" CONNECT = "CONNECT" ANY = "ANY" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type GOweb ¶
type GOweb struct { RouterGroup context.Context // contains filtered or unexported fields }
func (*GOweb) NoRoute ¶
func (g *GOweb) NoRoute(handlerFunc HandlerFunc)
type HandlerFunc ¶
type HandlerFunc func(ctx *Context)
type RouterGroup ¶
type RouterGroup struct {
// contains filtered or unexported fields
}
func (*RouterGroup) Any ¶
func (g *RouterGroup) Any(path string, handlerFunc HandlerFunc)
func (*RouterGroup) BottomNodeList ¶
func (g *RouterGroup) BottomNodeList() (sub []*RouterGroup)
func (*RouterGroup) CONNECT ¶
func (g *RouterGroup) CONNECT(path string, handlerFunc HandlerFunc)
func (*RouterGroup) DELETE ¶
func (g *RouterGroup) DELETE(path string, handlerFunc HandlerFunc)
func (*RouterGroup) FootMiddleware ¶
func (g *RouterGroup) FootMiddleware(handlers ...HandlerFunc)
FootMiddleware 最后运行的中间件
func (*RouterGroup) GET ¶
func (g *RouterGroup) GET(path string, handlerFunc HandlerFunc)
func (*RouterGroup) Grep ¶
func (g *RouterGroup) Grep(path string) *RouterGroup
func (*RouterGroup) HEAD ¶
func (g *RouterGroup) HEAD(path string, handlerFunc HandlerFunc)
func (*RouterGroup) List ¶
func (g *RouterGroup) List() (method, path []string)
func (*RouterGroup) Middleware ¶
func (g *RouterGroup) Middleware(handlers ...HandlerFunc)
Middleware 中间件,头部运行
func (*RouterGroup) OPTIONS ¶
func (g *RouterGroup) OPTIONS(path string, handlerFunc HandlerFunc)
func (*RouterGroup) POST ¶
func (g *RouterGroup) POST(path string, handlerFunc HandlerFunc)
func (*RouterGroup) PUT ¶
func (g *RouterGroup) PUT(path string, handlerFunc HandlerFunc)
func (*RouterGroup) PathMatch ¶
func (g *RouterGroup) PathMatch(path, method string) (match map[string]string, handle HandlerFunc, grep *RouterGroup)
Click to show internal directories.
Click to hide internal directories.