Documentation
¶
Index ¶
- Constants
- func ErrAuth(c *gin.Context, msgs ...string)
- func ErrBadRequest(c *gin.Context, msgs ...string)
- func ErrNotFound(c *gin.Context, msgs ...string)
- func ErrParams(c *gin.Context, msgs ...string)
- func ErrParamsMissing(c *gin.Context, msgs ...string)
- func ErrToken(c *gin.Context, msgs ...string)
- func Failed(c *gin.Context, msg string)
- func OK(c *gin.Context, msg string, datas ...interface{})
- func Result(c *gin.Context, ret int, msg string, datas ...interface{})
- type ResultBody
Constants ¶
View Source
const ( Success = iota * 100 InvalidParameter // 参数错误 MissingParameter // 参数缺损 InvalidToken // token 失效 BadRequest // 无效的访问 NotFound = 404 // 空数据 InternalServerError = 500 // 内部服务器错误 )
Variables ¶
This section is empty.
Functions ¶
func ErrBadRequest ¶
func ErrNotFound ¶
func ErrParamsMissing ¶
Types ¶
type ResultBody ¶
Click to show internal directories.
Click to hide internal directories.