Documentation
¶
Index ¶
- Constants
- func ErrorCasbinAuthFail(c *gin.Context, msg interface{})
- func ErrorForbidden(c *gin.Context)
- func ErrorParam(c *gin.Context, wrongParam interface{})
- func ErrorServiceForbidden(c *gin.Context)
- func ErrorSystem(c *gin.Context, msg string, data interface{})
- func ErrorTokenAuthFail(c *gin.Context)
- func ErrorTokenBaseInfo(c *gin.Context)
- func ErrorTokenRefreshFail(c *gin.Context)
- func ErrorTooManyRequests(c *gin.Context)
- func Fail(c *gin.Context, dataCode int, msg string, data *interface{})
- func GetToCamel(c *gin.Context) bool
- func ReturnJson(context *gin.Context, httpCode int, dataCode int, msg string, ...)
- func ReturnJsonFromString(context *gin.Context, httpCode int, jsonStr string)
- func S(c *gin.Context)
- func SetToCamel(c *gin.Context)
- func Success(c *gin.Context, msg string, data *interface{})
- func TokenErrorParam(c *gin.Context, wrongParam interface{})
- func ValidatorError(c *gin.Context, err error)
Constants ¶
View Source
const Tocamel = "toCamel"
Variables ¶
This section is empty.
Functions ¶
func ErrorCasbinAuthFail ¶
ErrorCasbinAuthFail 鉴权失败,返回 405 方法不允许访问
func ErrorServiceForbidden ¶
func ErrorSystem ¶
ErrorSystem 系统执行代码错误
func ErrorTokenRefreshFail ¶
ErrorTokenRefreshFail token不符合刷新条件
func GetToCamel ¶
func ReturnJson ¶
func ReturnJsonFromString ¶
ReturnJsonFromString 将json字符窜以标准json格式返回(例如,从redis读取json格式的字符串,返回给浏览器json格式)
func SetToCamel ¶
func TokenErrorParam ¶
TokenErrorParam 参数校验错误
func ValidatorError ¶
ValidatorError 翻译表单参数验证器出现的校验错误
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.