Documentation ¶
Index ¶
- Constants
- func GValidError2MapData(err gvalid.Error) map[string][]string
- type ServerError
- func AccountUnavailableError(message string, errs ...error) *ServerError
- func AuthorizationFailedError(message string, errs ...error) *ServerError
- func CaptchaIncorrectError(message string, errs ...error) *ServerError
- func CaptchaMissedError(message string, errs ...error) *ServerError
- func ConflictError(message string, errs ...error) *ServerError
- func FormFormatInvalidError(message string, errs ...error) *ServerError
- func InvalidError(message string, errs ...error) *ServerError
- func LimitError(message string, errs ...error) *ServerError
- func NotFoundError(message string, errs ...error) *ServerError
- func NotPermissionError(message string, errs ...error) *ServerError
- func ORMError(message string, errs ...error) *ServerError
- func ServiceError(message string, errs ...error) *ServerError
- func UserOrPasswordFailed(message string, errs ...error) *ServerError
- func WithoutAuthorizationError(message string, errs ...error) *ServerError
Constants ¶
View Source
const ( CUserOrPasswordFailed = 1000 // 账号密码错误 CWithoutAuthorization = 1001 // 没有鉴权 CAuthorizationFailed = 1002 // 鉴权错误 CCaptchaMissed = 1003 // 没有验证码 CCaptchaIncorrect = 1004 // 验证码错误 CHasNoPermission = 1006 // 没有权限 CFormInvalid = 1007 // 表单参数格式错误 CInvalid = 1008 // 无效请求 CConflict = 1009 // 与现有数据冲突 CNotFound = 1010 // 没找到所查找Object CORMError = 1011 // ORM错误 CServiceError = 1012 // 业务逻辑错误 CLimitError = 1013 // 操作被限制 CUnknownError = 1999 // 未知的错误 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ServerError ¶
func AccountUnavailableError ¶
func AccountUnavailableError(message string, errs ...error) *ServerError
func AuthorizationFailedError ¶
func AuthorizationFailedError(message string, errs ...error) *ServerError
func CaptchaIncorrectError ¶
func CaptchaIncorrectError(message string, errs ...error) *ServerError
func CaptchaMissedError ¶
func CaptchaMissedError(message string, errs ...error) *ServerError
func ConflictError ¶
func ConflictError(message string, errs ...error) *ServerError
func FormFormatInvalidError ¶
func FormFormatInvalidError(message string, errs ...error) *ServerError
func InvalidError ¶
func InvalidError(message string, errs ...error) *ServerError
func LimitError ¶
func LimitError(message string, errs ...error) *ServerError
func NotFoundError ¶
func NotFoundError(message string, errs ...error) *ServerError
func NotPermissionError ¶
func NotPermissionError(message string, errs ...error) *ServerError
func ORMError ¶
func ORMError(message string, errs ...error) *ServerError
func ServiceError ¶
func ServiceError(message string, errs ...error) *ServerError
func UserOrPasswordFailed ¶
func UserOrPasswordFailed(message string, errs ...error) *ServerError
func WithoutAuthorizationError ¶
func WithoutAuthorizationError(message string, errs ...error) *ServerError
func (*ServerError) Error ¶
func (s *ServerError) Error() string
Click to show internal directories.
Click to hide internal directories.