Documentation
¶
Index ¶
- func StartApi(ctx *context.CoreContext) error
- type HandlerFunc
- type Keys
- type MyContext
- type MyRouterGroup
- func (r *MyRouterGroup) GET(relativePath string, handlers ...HandlerFunc) gin.IRoutes
- func (group *MyRouterGroup) Group(relativePath string, handlers ...HandlerFunc) *MyRouterGroup
- func (r *MyRouterGroup) POST(relativePath string, handlers ...HandlerFunc) gin.IRoutes
- func (r *MyRouterGroup) Use(middlewares ...func(c *MyContext)) gin.IRoutes
- type MyServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartApi ¶
func StartApi(ctx *context.CoreContext) error
Types ¶
type HandlerFunc ¶
type HandlerFunc func(c *MyContext)
type MyContext ¶
type MyContext struct {
*gin.Context
CoreContext *context.CoreContext
}
MyContext extend gin.Context
type MyRouterGroup ¶
type MyRouterGroup struct {
*gin.RouterGroup
CoreContext *context.CoreContext
}
MyRouterGroup extend gin.RouterGroup
func (*MyRouterGroup) GET ¶
func (r *MyRouterGroup) GET(relativePath string, handlers ...HandlerFunc) gin.IRoutes
GET extend group GET
func (*MyRouterGroup) Group ¶
func (group *MyRouterGroup) Group(relativePath string, handlers ...HandlerFunc) *MyRouterGroup
func (*MyRouterGroup) POST ¶
func (r *MyRouterGroup) POST(relativePath string, handlers ...HandlerFunc) gin.IRoutes
POST extend group POST
type MyServer ¶
type MyServer struct {
*gin.Engine
CoreContext *context.CoreContext
}
func (*MyServer) GET ¶
func (server *MyServer) GET(relativePath string, handlers ...HandlerFunc) gin.IRoutes
GET extent GET
func (*MyServer) Group ¶
func (server *MyServer) Group(relativePath string, handlers ...HandlerFunc) *MyRouterGroup
Group rewrite route register
Click to show internal directories.
Click to hide internal directories.