Documentation ¶
Index ¶
- func GetPage(c *gin.Context) (page, pagesize int)
- func RespData(c *gin.Context, httpCode, code int, data interface{})
- func RespFail(c *gin.Context, httpCode, code int, detail string)
- func RespJSON(c *gin.Context, httpCode int, resp interface{})
- func RespOk(c *gin.Context, httpCode, code int)
- type Article
- type ResponseData
- type ResponseFail
- type ResponseSuccess
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Article ¶
type Article struct { Log logger.ILogger `inject:""` Service service.IArticleService `inject:""` }
Article 注入IArticleService
type ResponseData ¶
type ResponseData struct { Code int `json:"code"` Msg string `json:"msg"` Data interface{} `json:"data"` }
ResponseData 数据返回结构体
type ResponseFail ¶
type ResponseFail struct { Code int `json:"code"` Msg string `json:"msg"` Detail string `json:"detail"` }
ResponseFail 返回成功结构体
type ResponseSuccess ¶
ResponseSuccess 返回成功结构体
Click to show internal directories.
Click to hide internal directories.