Documentation ¶
Index ¶
- func APIException(c *gin.Context, code int, msg string, data interface{})
- func APIFailure(c *gin.Context, msg string, data interface{})
- func APISuccess(c *gin.Context, data interface{}, count int)
- func CheckWhiteList(asAPI bool) gin.HandlerFunc
- func HTTPCounter() gin.HandlerFunc
- func RecoveryWithLog(stack bool) gin.HandlerFunc
- func TxtMsg(c *gin.Context, msg string)
- func WebAPILogger() gin.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIException ¶
APIException 通用异常处理
func APIFailure ¶
APIFailure 返回失败, 状态码: 200
func APISuccess ¶
APISuccess 返回成功, 状态码: 200
func RecoveryWithLog ¶
func RecoveryWithLog(stack bool) gin.HandlerFunc
RecoveryWithLog GinRecovery 及日志 Ref: https://github.com/gin-contrib/zap
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.