Documentation
¶
Index ¶
- type Context
- type Engine
- func (e *Engine) EnableDebugMode()
- func (e *Engine) Get(path string, desc string, handlers ...HandlerFunc) gin.IRoutes
- func (e *Engine) GetGinEngine() *gin.Engine
- func (e *Engine) GetWithStructParams(path string, desc string, structTemplate interface{}, handlers ...HandlerFunc) gin.IRoutes
- func (e *Engine) Group(path string, handlers ...HandlerFunc) *RouterGroup
- func (e *Engine) Post(path string, desc string, handlers ...HandlerFunc) gin.IRoutes
- func (e *Engine) PostWithStructParams(path string, desc string, structTemplate interface{}, handlers ...HandlerFunc) gin.IRoutes
- func (e *Engine) Run() error
- func (e *Engine) Stop()
- func (e *Engine) TravelGroupTree() map[string]*RouteInfo
- func (e *Engine) Use(middleware ...HandlerFunc)
- func (e *Engine) WithLogger(logger Logger) *Engine
- type HandlerFunc
- type Logger
- type RouteInfo
- type RouterGroup
- func (g *RouterGroup) Get(path string, desc string, handlers ...HandlerFunc) gin.IRoutes
- func (g *RouterGroup) GetWithStructParams(path string, desc string, structTemplate interface{}, handlers ...HandlerFunc) gin.IRoutes
- func (g *RouterGroup) Group(path string, handlers ...HandlerFunc) *RouterGroup
- func (g *RouterGroup) Post(path string, desc string, handlers ...HandlerFunc) gin.IRoutes
- func (g *RouterGroup) PostWithStructParams(path string, desc string, structTemplate interface{}, handlers ...HandlerFunc) gin.IRoutes
- func (g *RouterGroup) SetUnmarshalHandler(handlerFunc unmarshal) *RouterGroup
- func (g *RouterGroup) TravelGroupTree() map[string]*RouteInfo
- func (g *RouterGroup) Use(middleware ...HandlerFunc)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct { Addr string GroupRoutes map[string]*RouterGroup // 组路由 Routes map[string]*RouteInfo // 直接路由 // contains filtered or unexported fields }
func (*Engine) EnableDebugMode ¶
func (e *Engine) EnableDebugMode()
func (*Engine) GetGinEngine ¶
func (*Engine) GetWithStructParams ¶
func (*Engine) Group ¶
func (e *Engine) Group(path string, handlers ...HandlerFunc) *RouterGroup
func (*Engine) PostWithStructParams ¶
func (*Engine) TravelGroupTree ¶
func (*Engine) Use ¶
func (e *Engine) Use(middleware ...HandlerFunc)
func (*Engine) WithLogger ¶
type Logger ¶
type Logger interface {
HandleRequest(ctx Context, params *gin.LogFormatterParams)
}
type RouteInfo ¶
func (*RouteInfo) JsonStructDesc ¶
func (ri *RouteInfo) JsonStructDesc() []*fieldDescInfo
type RouterGroup ¶
type RouterGroup struct { GroupRoutes map[string]*RouterGroup Routes map[string]*RouteInfo UnmarshalHandler unmarshal // contains filtered or unexported fields }
func (*RouterGroup) Get ¶
func (g *RouterGroup) Get(path string, desc string, handlers ...HandlerFunc) gin.IRoutes
func (*RouterGroup) GetWithStructParams ¶
func (g *RouterGroup) GetWithStructParams(path string, desc string, structTemplate interface{}, handlers ...HandlerFunc) gin.IRoutes
func (*RouterGroup) Group ¶
func (g *RouterGroup) Group(path string, handlers ...HandlerFunc) *RouterGroup
func (*RouterGroup) Post ¶
func (g *RouterGroup) Post(path string, desc string, handlers ...HandlerFunc) gin.IRoutes
func (*RouterGroup) PostWithStructParams ¶
func (g *RouterGroup) PostWithStructParams(path string, desc string, structTemplate interface{}, handlers ...HandlerFunc) gin.IRoutes
func (*RouterGroup) SetUnmarshalHandler ¶
func (g *RouterGroup) SetUnmarshalHandler(handlerFunc unmarshal) *RouterGroup
func (*RouterGroup) TravelGroupTree ¶
func (g *RouterGroup) TravelGroupTree() map[string]*RouteInfo
func (*RouterGroup) Use ¶
func (g *RouterGroup) Use(middleware ...HandlerFunc)
Click to show internal directories.
Click to hide internal directories.