Documentation ¶
Index ¶
- func CommonErrorCodeResponse(c *gin.Context, code int, err error)
- func CommonErrorResponse(c *gin.Context, err error)
- func CommonFailCodeResponse(c *gin.Context, code int, err string)
- func CommonFailResponse(c *gin.Context, err string)
- func CommonSuccessPageResponse(c *gin.Context, total int, items []interface{})
- func CommonSuccessResponse(c *gin.Context, data interface{})
- func GetBody(ctx *gin.Context, v interface{}) error
- func NewTableData(data interface{}, pageNo, pageSize, count int) (td *types.TableData)
- type HttpResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommonErrorResponse ¶
func CommonFailResponse ¶
func CommonSuccessResponse ¶
func NewTableData ¶
Types ¶
type HttpResult ¶
type HttpResult struct { Code int `json:"code"` Data interface{} `json:"data"` Message string `json:"message"` }
func CommonErrResult ¶
func CommonErrResult(err error) HttpResult
func CommonFailResult ¶
func CommonFailResult(err string) HttpResult
func CommonSuccessPageResult ¶
func CommonSuccessPageResult(total int, items []interface{}) HttpResult
func CommonSuccessResult ¶
func CommonSuccessResult(data interface{}) HttpResult
Click to show internal directories.
Click to hide internal directories.