Documentation
¶
Index ¶
- Variables
- func Any(rule string, call func(ctx *_context.Context))
- func Business(business string) *router
- func Delete(rule string, call func(ctx *_context.Context))
- func Get(rule string, call func(ctx *_context.Context))
- func Group(group func())
- func Head(rule string, call func(ctx *_context.Context))
- func Method(method string, rule string, call func(ctx *_context.Context))
- func MethodList(methodList []string, rule string, call func(ctx *_context.Context))
- func MiddlewareAfter(middleware func(ctx *_context.Context)) *router
- func MiddlewareAfterList(middlewareList []func(ctx *_context.Context)) *router
- func MiddlewareBefore(middleware func(ctx *_context.Context)) *router
- func MiddlewareBeforeList(middlewareList []func(ctx *_context.Context)) *router
- func Options(rule string, call func(ctx *_context.Context))
- func Patch(rule string, call func(ctx *_context.Context))
- func Post(rule string, call func(ctx *_context.Context))
- func Prefix(prefix string) *router
- func Put(rule string, call func(ctx *_context.Context))
- type Router
Constants ¶
This section is empty.
Variables ¶
View Source
var RouterList []*Router = []*Router{}
Functions ¶
func MethodList ¶
func MiddlewareAfter ¶
func MiddlewareAfterList ¶
func MiddlewareBefore ¶
func MiddlewareBeforeList ¶
Types ¶
type Router ¶
type Router struct {
Business string // 业务标识
Rule string // 路径
Call func(ctx *_context.Context) // 处理方法
MethodList []string // 方法列表
MiddlewareBeforeList []func(ctx *_context.Context) // 前中间件列表
MiddlewareAfterList []func(ctx *_context.Context) // 后中间件列表
Parameter map[string]string // 正则路径解析参数
IsRegexp bool // 是否使用正则匹配
}
Click to show internal directories.
Click to hide internal directories.