Documentation ¶
Index ¶
- Variables
- func ErrorAlreadyExists(format string, args ...interface{}) *errors.Error
- func ErrorInvalidParams(format string, args ...interface{}) *errors.Error
- func ErrorNotFound(format string, args ...interface{}) *errors.Error
- func ErrorPermissionDenied(format string, args ...interface{}) *errors.Error
- func ErrorUnauthorized(format string, args ...interface{}) *errors.Error
- func ErrorUnknown(format string, args ...interface{}) *errors.Error
- func IsAlreadyExists(err error) bool
- func IsInvalidParams(err error) bool
- func IsNotFound(err error) bool
- func IsPermissionDenied(err error) bool
- func IsUnauthorized(err error) bool
- func IsUnknown(err error) bool
- type Err
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Err_name = map[int32]string{ 0: "UNKNOWN", 1: "INVALID_PARAMS", 2: "NOT_FOUND", 3: "ALREADY_EXISTS", 4: "PERMISSION_DENIED", 5: "UNAUTHORIZED", } Err_value = map[string]int32{ "UNKNOWN": 0, "INVALID_PARAMS": 1, "NOT_FOUND": 2, "ALREADY_EXISTS": 3, "PERMISSION_DENIED": 4, "UNAUTHORIZED": 5, } )
Enum value maps for Err.
View Source
var File_perrors_error_proto protoreflect.FileDescriptor
Functions ¶
func ErrorAlreadyExists ¶
数据已存在
func ErrorInvalidParams ¶
参数错误
func ErrorPermissionDenied ¶
权限不足
func ErrorUnauthorized ¶
未登录
Types ¶
type Err ¶
type Err int32
func (Err) Descriptor ¶
func (Err) Descriptor() protoreflect.EnumDescriptor
func (Err) EnumDescriptor
deprecated
func (Err) Number ¶
func (x Err) Number() protoreflect.EnumNumber
func (Err) Type ¶
func (Err) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.