Documentation ¶
Index ¶
- Variables
- func Custom(c *gin.Context, httpCode, bizCode int, msg string, data interface{})
- func FailCheckBizErr(c *gin.Context, title string, err error)
- func FailCheckTargetErr(c *gin.Context, title string, sourceErr error, possibleErrs ...error)
- func FailErr(c *gin.Context, err error)
- func FailMsg(c *gin.Context, msg string)
- func Forbidden(c *gin.Context)
- func Success(c *gin.Context, data interface{})
- func SuccessMsg(c *gin.Context, data interface{}, msg string)
- func SuccessNil(c *gin.Context)
- func Unauthorized(c *gin.Context)
- func Unknown(c *gin.Context, err error)
- func ValidateErr(c *gin.Context, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var NilData = struct{}{}
Functions ¶
func FailCheckBizErr ¶
FailCheckBizErr 检查错误是否为业务错误,否则记录日志并响应未知
func FailCheckTargetErr ¶ added in v0.0.5
FailCheckTargetErr 检查错误是否为指定的错误,否则记录日志并响应
func SuccessMsg ¶
func SuccessNil ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.