Documentation
¶
Index ¶
- Variables
- func WarpCode(code codes.Code, errorCode int32) codes.Code
- type Codes
- type Status
- func (Status) Descriptor() protoreflect.EnumDescriptor
- func (x Status) Enum() *Status
- func (Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x Status) Message() string
- func (x Status) Number() protoreflect.EnumNumber
- func (x Status) String() string
- func (Status) Type() protoreflect.EnumType
- func (x Status) Warp(status codes.Code) codes.Code
- func (x Status) With(c codes.Code, msg string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Status_name = map[int32]string{ 0: "UNKNOWN", 20000: "OK", 40000: "INVALID_ARGUMENT", 40400: "NOT_FOUND", 50000: "SERVICE_ERROR", } Status_value = map[string]int32{ "UNKNOWN": 0, "OK": 20000, "INVALID_ARGUMENT": 40000, "NOT_FOUND": 40400, "SERVICE_ERROR": 50000, } )
Enum value maps for Status.
View Source
var File_common_status_proto protoreflect.FileDescriptor
Functions ¶
Types ¶
type Codes ¶
func UnwarpCode ¶
type Status ¶
type Status int32
请求状态 错误定义
func (Status) Descriptor ¶
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) Number ¶
func (x Status) Number() protoreflect.EnumNumber
func (Status) Type ¶
func (Status) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.