Documentation
¶
Index ¶
- func OpenWeb(port int) error
- func SS58AuthMiddleware(c *MyContext)
- func StartApi(ctx *context.CoreContext) error
- type AddDuration
- type BootParam
- type ChangePrice
- 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
- type Result
- type UnitPriceParam
- type VersionVo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SS58AuthMiddleware ¶ added in v1.3.0
func SS58AuthMiddleware(c *MyContext)
func StartApi ¶
func StartApi(ctx *context.CoreContext) error
Types ¶
type AddDuration ¶ added in v1.1.0
type AddDuration struct {
Duration uint16 `json:"duration"`
}
type ChangePrice ¶ added in v1.1.0
type ChangePrice struct {
Price uint64 `json:"price"`
}
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
type Result ¶ added in v1.1.0
type Result struct {
Code uint64 `json:"code"`
Type string `json:"type"`
Message string `json:"message"`
Result interface{} `json:"result"`
}
func BadRequest ¶ added in v1.1.0
type UnitPriceParam ¶ added in v1.1.0
type UnitPriceParam struct {
UnitPrice uint64 `json:"unitPrice"`
}
Click to show internal directories.
Click to hide internal directories.