Documentation ¶
Index ¶
- Variables
- func HttpStatusFromCode(code ErrCode) int
- type ErrCode
- func (x ErrCode) Code() int
- func (ErrCode) Descriptor() protoreflect.EnumDescriptor
- func (x ErrCode) Enum() *ErrCode
- func (ErrCode) EnumDescriptor() ([]byte, []int)deprecated
- func (x ErrCode) ErrRep() *errcode.ErrRep
- func (x ErrCode) Error() string
- func (x ErrCode) GRPCStatus() *status.Status
- func (x ErrCode) MarshalGQL(w io.Writer)
- func (x ErrCode) Msg(msg string) *errcode.ErrRep
- func (x ErrCode) Number() protoreflect.EnumNumber
- func (x ErrCode) OrigString() string
- func (x ErrCode) Origin() errcode.ErrCode
- func (x ErrCode) String() string
- func (ErrCode) Type() protoreflect.EnumType
- func (x *ErrCode) UnmarshalGQL(v interface{}) error
- func (x ErrCode) Wrap(err error) *errcode.ErrRep
- type ErrCodeGeneric
- type ErrCodeInterface
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCode_name = map[int32]string{ 0: "Success", 1: "Canceled", 2: "Unknown", 3: "InvalidArgument", 4: "DeadlineExceeded", 5: "NotFound", 6: "AlreadyExists", 7: "PermissionDenied", 8: "ResourceExhausted", 9: "FailedPrecondition", 10: "Aborted", 11: "OutOfRange", 12: "Unimplemented", 13: "Internal", 14: "Unavailable", 15: "DataLoss", 16: "Unauthenticated", 10000: "SysError", 21000: "DBError", 21001: "RowExists", 22000: "RedisErr", 30000: "IOError", 30001: "UploadFail", 30002: "UploadCheckFail", 30003: "UploadCheckFormat", 30004: "TimeTooMuch", 30005: "ParamInvalid", } ErrCode_value = map[string]int32{ "Success": 0, "Canceled": 1, "Unknown": 2, "InvalidArgument": 3, "DeadlineExceeded": 4, "NotFound": 5, "AlreadyExists": 6, "PermissionDenied": 7, "ResourceExhausted": 8, "FailedPrecondition": 9, "Aborted": 10, "OutOfRange": 11, "Unimplemented": 12, "Internal": 13, "Unavailable": 14, "DataLoss": 15, "Unauthenticated": 16, "SysError": 10000, "DBError": 21000, "RowExists": 21001, "RedisErr": 22000, "IOError": 30000, "UploadFail": 30001, "UploadCheckFail": 30002, "UploadCheckFormat": 30003, "TimeTooMuch": 30004, "ParamInvalid": 30005, } )
Enum value maps for ErrCode.
View Source
var File_hopeio_errcode_errcode_proto protoreflect.FileDescriptor
Functions ¶
func HttpStatusFromCode ¶ added in v0.0.9
Types ¶
type ErrCode ¶
type ErrCode int32
const ( Success ErrCode = 0 Canceled ErrCode = 1 Unknown ErrCode = 2 InvalidArgument ErrCode = 3 DeadlineExceeded ErrCode = 4 NotFound ErrCode = 5 AlreadyExists ErrCode = 6 PermissionDenied ErrCode = 7 ResourceExhausted ErrCode = 8 FailedPrecondition ErrCode = 9 Aborted ErrCode = 10 OutOfRange ErrCode = 11 Unimplemented ErrCode = 12 Internal ErrCode = 13 DataLoss ErrCode = 15 Unauthenticated ErrCode = 16 SysError ErrCode = 10000 DBError ErrCode = 21000 RowExists ErrCode = 21001 RedisErr ErrCode = 22000 IOError ErrCode = 30000 UploadFail ErrCode = 30001 UploadCheckFail ErrCode = 30002 UploadCheckFormat ErrCode = 30003 TimeTooMuch ErrCode = 30004 ParamInvalid ErrCode = 30005 )
func (ErrCode) Descriptor ¶
func (ErrCode) Descriptor() protoreflect.EnumDescriptor
func (ErrCode) EnumDescriptor
deprecated
func (ErrCode) GRPCStatus ¶ added in v0.0.24
example 实现
func (ErrCode) MarshalGQL ¶
func (ErrCode) Number ¶
func (x ErrCode) Number() protoreflect.EnumNumber
func (ErrCode) OrigString ¶
func (ErrCode) Type ¶
func (ErrCode) Type() protoreflect.EnumType
func (*ErrCode) UnmarshalGQL ¶
type ErrCodeGeneric ¶
type ErrCodeInterface ¶
type ErrCodeInterface interface { }
Click to show internal directories.
Click to hide internal directories.