Documentation ¶
Index ¶
- func SetDefaultRespJSON(c *gin.Context, data interface{})
- func SetDefaultRespJSONPaged(c *gin.Context, data interface{}, total int64)
- func SetRespErr(c *gin.Context, err error)
- func SetRespJSON(c *gin.Context, data interface{}, message string)
- func SetRespJSONPaged(c *gin.Context, data interface{}, message string, total int64)
- type JSONResult
- type JSONResultPaged
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDefaultRespJSON ¶
func SetDefaultRespJSONPaged ¶
func SetRespErr ¶
func SetRespJSON ¶
Types ¶
type JSONResult ¶
type JSONResult struct { Code int `json:"code"` // 回包code,表明是否正确,在code == 0时,表明服务正常 Message string `json:"message" example:"success"` // 回报message,在code != 0时,展示给前端 Data interface{} `json:"data"` // 数据 }
func MakeResultWithError ¶
func MakeResultWithError(err errorx.IError) *JSONResult
type JSONResultPaged ¶
Click to show internal directories.
Click to hide internal directories.