package
Version:
v1.6.5
Opens a new window with list of versions in this module.
Published: Aug 6, 2024
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
- Constants
-
func ErrorAuthFail(c *gin.Context)
-
func ErrorParam(c *gin.Context, wrongParam interface{})
-
func Fail(c *gin.Context, dataCode int, msg interface{}, data interface{})
-
func ReturnJson(c *gin.Context, httpCode int, dataCode int, msg interface{}, data interface{}, ...)
-
func Success(c *gin.Context, dataCode int, msg interface{}, data interface{})
View Source
const (
RequestStatusOkCode int = 1
RequestStatusOkMsg string = "Success"
RequestStatusFailCode int = 0
RequestStatusFailMsg string = "Failed"
ErrorsNoAuthorization string = "token鉴权未通过,请通过token授权接口重新获取token,"
ValidatorParamsCheckFail string = "请求参数错误"
)
func ErrorParam(c *gin.Context, wrongParam interface{})
ErrorParam 参数校验失败
func Fail(c *gin.Context, dataCode int, msg interface{}, data interface{})
Fail 失败的业务逻辑
func ReturnJson(c *gin.Context, httpCode int, dataCode int, msg interface{}, data interface{}, success bool)
func Success(c *gin.Context, dataCode int, msg interface{}, data interface{})
Success 直接返回成功
Source Files
¶
Click to show internal directories.
Click to hide internal directories.