Documentation ¶
Index ¶
- func BindAndCheck(ctx *gin.Context, data interface{}) bool
- func HandleResponse(c *gin.Context, err error, data interface{})
- func SendFailResp(c *gin.Context, httpCode int, message string)
- func SendResp(c *gin.Context, httpCode, code int, message string, data interface{})
- func SendSuccessResp(c *gin.Context, message string, data interface{})
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindAndCheck ¶
BindAndCheck 绑定参数并验证参数 true: 确实存在问题,会返回400错误 false: 不存在问题,验证通过
func HandleResponse ¶
HandleResponse 统一处理异常,统一处理日志,统一处理返回
func SendFailResp ¶
SendFailResp 返回失败请求
func SendSuccessResp ¶
SendSuccessResp 返回成功请求
Types ¶
Click to show internal directories.
Click to hide internal directories.