Documentation ¶
Index ¶
- Variables
- func MetaHandler(meta Meta) gin.HandlerFunc
- type E
- type Meta
- type RouterGroup
- func (r *RouterGroup) Any(path string, meta Meta, handlers ...gin.HandlerFunc) []*RouterHandler
- func (r *RouterGroup) Attach(handlers ...gin.HandlerFunc)
- func (r *RouterGroup) DELETE(path string, meta Meta, handlers ...gin.HandlerFunc) *RouterHandler
- func (r *RouterGroup) GET(path string, meta Meta, handlers ...gin.HandlerFunc) *RouterHandler
- func (r *RouterGroup) Group(path string, subMeta Meta, handlers ...gin.HandlerFunc) *RouterGroup
- func (r *RouterGroup) HEAD(path string, meta Meta, handlers ...gin.HandlerFunc) *RouterHandler
- func (r *RouterGroup) Handle(method string, path string, meta Meta, handlers ...gin.HandlerFunc) *RouterHandler
- func (r *RouterGroup) Match(methods []string, path string, meta Meta, handlers ...gin.HandlerFunc) []*RouterHandler
- func (r *RouterGroup) OPTIONS(path string, meta Meta, handlers ...gin.HandlerFunc) *RouterHandler
- func (r *RouterGroup) POST(path string, meta Meta, handlers ...gin.HandlerFunc) *RouterHandler
- func (r *RouterGroup) PUT(path string, meta Meta, handlers ...gin.HandlerFunc) *RouterHandler
- func (r *RouterGroup) Use(handlers ...gin.HandlerFunc)
- func (r *RouterGroup) Walk(walk func(info WalkRouteInfo) error) error
- type RouterHandler
- type WalkRouteInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var MetaKey = "coco.route.meta"
MetaKey meta key, could update if you need
Functions ¶
func MetaHandler ¶
func MetaHandler(meta Meta) gin.HandlerFunc
Types ¶
type RouterGroup ¶
func NewRouterGroup ¶
func NewRouterGroup(group *gin.RouterGroup) *RouterGroup
func (*RouterGroup) Any ¶
func (r *RouterGroup) Any(path string, meta Meta, handlers ...gin.HandlerFunc) []*RouterHandler
func (*RouterGroup) Attach ¶
func (r *RouterGroup) Attach(handlers ...gin.HandlerFunc)
Attach handlers to the root group directly
func (*RouterGroup) DELETE ¶
func (r *RouterGroup) DELETE(path string, meta Meta, handlers ...gin.HandlerFunc) *RouterHandler
func (*RouterGroup) GET ¶
func (r *RouterGroup) GET(path string, meta Meta, handlers ...gin.HandlerFunc) *RouterHandler
func (*RouterGroup) Group ¶
func (r *RouterGroup) Group(path string, subMeta Meta, handlers ...gin.HandlerFunc) *RouterGroup
func (*RouterGroup) HEAD ¶
func (r *RouterGroup) HEAD(path string, meta Meta, handlers ...gin.HandlerFunc) *RouterHandler
func (*RouterGroup) Handle ¶
func (r *RouterGroup) Handle(method string, path string, meta Meta, handlers ...gin.HandlerFunc) *RouterHandler
func (*RouterGroup) Match ¶
func (r *RouterGroup) Match(methods []string, path string, meta Meta, handlers ...gin.HandlerFunc) []*RouterHandler
func (*RouterGroup) OPTIONS ¶
func (r *RouterGroup) OPTIONS(path string, meta Meta, handlers ...gin.HandlerFunc) *RouterHandler
func (*RouterGroup) POST ¶
func (r *RouterGroup) POST(path string, meta Meta, handlers ...gin.HandlerFunc) *RouterHandler
func (*RouterGroup) PUT ¶
func (r *RouterGroup) PUT(path string, meta Meta, handlers ...gin.HandlerFunc) *RouterHandler
func (*RouterGroup) Use ¶
func (r *RouterGroup) Use(handlers ...gin.HandlerFunc)
Use append the handlers to chain, group's chain will be inherited by subgroup and sub handlers
func (*RouterGroup) Walk ¶
func (r *RouterGroup) Walk(walk func(info WalkRouteInfo) error) error
Walk walk group and handlers info, include subgroup
type RouterHandler ¶
type WalkRouteInfo ¶
type WalkRouteInfo struct { IsGroup bool Group *WalkRouteInfo Method string FullPath string Meta Meta }
Click to show internal directories.
Click to hide internal directories.