Documentation
¶
Index ¶
- Variables
- func AlreadyExist(k ...string) string
- func AssertionFailed(k ...any) string
- func Expired(k ...string) string
- func Failed(k ...string) string
- func FieldIsBlank(k ...string) string
- func FieldIsEmpty(k ...string) string
- func FieldIsInvalid(k ...string) string
- func FieldIsNil(k ...string) string
- func FieldIsRequired(k ...string) string
- func NotExist(k ...string) string
- func NotSingular(k ...string) string
- func Success(k ...string) string
- func Text(code int) string
- func TypeMismatch(k ...string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( OK = 0 // Success AppKeyInvalid = -1 // Application does not exist or has been banned AccessKeyErr = -2 // Access Key error SignCheckErr = -3 // API signature check error MethodNoPermission = -4 // Caller has no permission for this method NoLogin = -101 // Account not logged in UserDisabled = -102 // Account suspended LackOfScores = -103 // Lack of scores LackOfCoins = -104 // Lack of coins CaptchaErr = -105 // Captcha error UserInactive = -106 // Account inactive UserNoMember = -107 // Account not a formal member or in adaptation period AppDenied = -108 // Application does not exist or has been banned MobileNoVerfiy = -110 // Mobile phone not bound CsrfNotMatchErr = -111 // CSRF check failed ServiceUpdate = -112 // System is upgrading UserIDCheckInvalid = -113 // Account not yet verified UserIDCheckInvalidPhone = -114 // Please bind your mobile phone first UserIDCheckInvalidCard = -115 // Please complete real-name authentication first NotModified = -304 // Not modified TemporaryRedirect = -307 // Temporary redirect RequestErr = -400 // Request error AccessDenied = -403 // Access denied NothingFound = -404 // Nothing found MethodNotAllowed = -405 // Method not allowed Conflict = -409 // Conflict Gone = -410 // Gone ServerErr = -500 // Server error Deadline = -504 // Service call timeout LimitExceed = -509 // Exceed limit FileNotExists = -616 // File does not exist FileTooLarge = -617 // File too large FailedTooManyTimes = -625 // Too many login failures UserNotExist = -626 // User does not exist PasswordTooLeak = -628 // Password too weak UsernameOrPasswordErr = -629 // Incorrect username or password TargetNumberLimit = -632 // Operation target number limit TargetBlocked = -643 // Blocked UserLevelLow = -650 // User level too low UserDuplicate = -652 // Duplicate user AccessTokenExpires = -658 // Token expired PasswordHashExpires = -662 // Password timestamp expired AreaLimit = -688 // Geographic area limit CopyrightLimit = -689 // Copyright limit FailToAddMoral = -701 // Failed to deduct moral Degrade = -1200 // Filtered request due to degradation RPCNoClient = -1201 // No available client for rpc service RPCNoAuth = -1202 // Client for rpc service not authorized )
Define all error codes
Functions ¶
func AlreadyExist ¶
AlreadyExist returns already exist message
func AssertionFailed ¶ added in v0.1.4
AssertionFailed returns type assertion failed message
func FieldIsInvalid ¶
FieldIsInvalid returns field invalid message
func FieldIsRequired ¶
FieldIsRequired returns field required message
func Text ¶
Text returns the text corresponding to the error code. If the error code does not exist, it returns a default message.
func TypeMismatch ¶ added in v0.1.4
TypeMismatch returns type mismatch message
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.