Documentation
¶
Index ¶
- Constants
- func GetPage(c *gin.Context) int
- func GetPageLimit(c *gin.Context, limit int) int
- func MarkError(v string)
- type Error
- type Gin
- func (g *Gin) Response(httpCode, errCode int, msg string, data interface{})
- func (g *Gin) Response400(err error, msg string)
- func (g *Gin) Response400Str(msg string)
- func (g *Gin) Response500(err error)
- func (g *Gin) ResponseCodeError(error Error)
- func (g *Gin) ResponseFailValidParam(err error)
- func (g *Gin) ResponseSuc(data interface{})
- func (g *Gin) ResponseSucNoData()
Constants ¶
View Source
const DefaultLimit = 20
修改全局 limit 大小
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Gin ¶
Gin 实体
func (*Gin) Response400 ¶
Response400 返回失败, err记录日志错误,msg提示用户
func (*Gin) ResponseCodeError ¶
ResponseFailError 返回自定义的错误码
func (*Gin) ResponseFailValidParam ¶
ResponseFailValidParam 验证参数错误
Click to show internal directories.
Click to hide internal directories.