Documentation ¶
Index ¶
- func JsonErr(c *gin.Context, errCode int, data interface{})
- func JsonErrDef(c *gin.Context, def *errdef.ErrDef, errMsgs ...string)
- func JsonErrDefErr(c *gin.Context, def *errdef.ErrDef, err error, errMsg ...string)
- func JsonFail(c *gin.Context, fail string, data interface{})
- func JsonSuccess(c *gin.Context, data interface{})
- func ParseQueryCommonOffsetAndLimit(c *gin.Context) (int, int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JsonErrDef ¶
JsonErrDef
use as
handler.JsonErrDef(c, errdef.ErrParams) return
or use add messages, sep of message use string "; "
handler.JsonErrDef(c, errdef.ErrParams, "id", "not found, set id and retry") return
func JsonErrDefErr ¶
JsonErrDefErr
use as
handler.JsonErrDefErr(c, errdef.ErrDatabase, err) return
or use add messages, sep of message use string "; "
handler.JsonErrDefErr(c, errdef.ErrDatabase, err, "can not found") return
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.