Documentation ¶
Index ¶
- Variables
- type ErrorReason
- func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x ErrorReason) Enum() *ErrorReason
- func (ErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x ErrorReason) Number() protoreflect.EnumNumber
- func (x ErrorReason) String() string
- func (ErrorReason) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorReason_name = map[int32]string{ 0: "internal_server", 1: "bad_request", 401: "invalid_token", 403: "un_authorized", 404: "not_found", 409: "conflict", } ErrorReason_value = map[string]int32{ "internal_server": 0, "bad_request": 1, "invalid_token": 401, "token_revoked": 401, "no_login": 401, "un_authorized": 403, "not_found": 404, "conflict": 409, } )
Enum value maps for ErrorReason.
View Source
var File_errno_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type ErrorReason ¶
type ErrorReason int32
const ( // #[errno(code=500,message="服务器错误")] ErrorReason_internal_server ErrorReason = 0 // 请求参数错误 // #[errno(code=400)] ErrorReason_bad_request ErrorReason = 1 // 令牌无效或令牌已过期 ErrorReason_invalid_token ErrorReason = 401 // 令牌已失效 ErrorReason_token_revoked ErrorReason = 401 // 未登录 ErrorReason_no_login ErrorReason = 401 ErrorReason_un_authorized ErrorReason = 403 // 没有找到,已删除或不存在 ErrorReason_not_found ErrorReason = 404 // 资源冲突 ErrorReason_conflict ErrorReason = 409 )
func (ErrorReason) Descriptor ¶
func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
func (ErrorReason) Enum ¶
func (x ErrorReason) Enum() *ErrorReason
func (ErrorReason) EnumDescriptor
deprecated
func (ErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use ErrorReason.Descriptor instead.
func (ErrorReason) Number ¶
func (x ErrorReason) Number() protoreflect.EnumNumber
func (ErrorReason) String ¶
func (x ErrorReason) String() string
func (ErrorReason) Type ¶
func (ErrorReason) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.