Documentation ¶
Index ¶
- Constants
- Variables
- func CheckErr(err error, c *gin.Context)
- func FileExist(file string) bool
- func ResError(c *gin.Context, msg string, res int, data interface{})
- func ResSuccess(c *gin.Context, data interface{}, msg string)
- func ResSuccessList(c *gin.Context, dataList interface{}, pagination Pagination, msg string)
- type AppError
- type Pagination
- type Res
Constants ¶
View Source
const ( SUCCESS = 1 //成功 ZERO = 0 //0值 ERROR = -1 //失败 )
appRes 系统通用返回
Variables ¶
View Source
var Validate *validator.Validate
全局验证实例
Functions ¶
func ResSuccess ¶
func ResSuccessList ¶
func ResSuccessList(c *gin.Context, dataList interface{}, pagination Pagination, msg string)
Types ¶
type Pagination ¶
type Pagination struct { TotalCount int64 `json:"total_count"` Page int `json:"page"` PerPage int `json:"per_page"` }
分页
Click to show internal directories.
Click to hide internal directories.