gzerror

package
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OK                   = 200  // 通用-Success
	Error                = 400  // 通用-ERROR
	ServerError          = 500  // 系统错误
	ParameterIllegal     = 1002 // 参数不合法
	NoAuth               = 1003 // 权限不足
	NotData              = 1004 // 没有数据
	HasData              = 1005 // 数据已存在
	UnauthorizedToken    = 1006 // 非法的用户token
	NeedLogin            = 1007 // 请先登录
	RequestLimit         = 1008 // 请求频繁,请稍后再试
	CaptchaGenerateError = 1009 // 验证码生成错误
	CaptchaError         = 1010 // 验证码错误
	LoginFail            = 2000 // 登录失败
	LoginPasswordError   = 2001 // 密码错误
	LoginNoUser          = 2002 // 该用户不存在
	LoginBan             = 2003 // 你暂时不能进行登录操作
	ThirdLoginError      = 2004 // 第三方登录失败
	UserIsset            = 2005 // 用户已存在
)

1开头系统校验类,2开头用户及用户行为校验类

Variables

This section is empty.

Functions

func GetErrorMessage

func GetErrorMessage(code int64, message ...string) string

func Trans

func Trans(err error) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL