cerror

package
v0.0.0-...-c55c97e Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUserHasExists  = status.Error(101, "用户名已存在")
	ErrUserNotFound   = status.Error(102, "用户不存在")
	ErrEmailHasExists = status.Error(103, "邮箱已存在")
	ErrPhoneHasExists = status.Error(104, "手机号已存在")
	ErrPasswordWrong  = status.Error(105, "密码错误")
	ErrUserDisabled   = status.Error(106, "用户被禁用")
)
View Source
var (
	ErrNotLogin         = status.Error(201, "用户未登录")
	ErrPermissionDenied = status.Error(202, "权限不足")
	ErrTokenInvalid     = status.Error(203, "token无效")
	ErrTokenExpired     = status.Error(204, "token过期")
	ErrTokenNotMatch    = status.Error(205, "token不匹配")
)
View Source
var (
	ErrRoleHasExists = status.Error(301, "角色已存在")
)

Functions

func FromError

func FromError(err error) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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