Documentation ¶
Index ¶
- func CustomResponse(c *gin.Context, response *types2.Response)
- func Fail(c *gin.Context, code int, message string, args ...types2.RespOpt)
- func FailWithData(c *gin.Context, code int, message string, data interface{}, ...)
- func FailWithResult(c *gin.Context, result types2.Result, args ...types2.RespOpt)
- func InvalidRequest(c *gin.Context, message string)
- func InvalidRequestWithData(c *gin.Context, message string, data interface{})
- func Success(c *gin.Context, data interface{}, args ...types2.RespOpt)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FailWithData ¶
func FailWithData(c *gin.Context, code int, message string, data interface{}, args ...types2.RespOpt)
FailWithData 功能与Fail一致, 只不过FailWithData可以返回数据
func FailWithResult ¶
func InvalidRequest ¶
InvalidRequest 无效入参, 状态码400
func InvalidRequestWithData ¶
InvalidRequestWithData 与InvalidRequest功能一致, 但是可以返回数据
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.