Documentation ¶
Index ¶
- Constants
- Variables
- func IsCanceled(err *EgoError) bool
- func IsDeadlineExceeded(err *EgoError) bool
- func IsNotFound(err *EgoError) bool
- func Register(egoError *EgoError)
- type EgoError
- func (*EgoError) Descriptor() ([]byte, []int)deprecated
- func (x *EgoError) Error() string
- func (x *EgoError) GRPCStatus() *status.Status
- func (x *EgoError) GetCode() int32
- func (x *EgoError) GetMessage() string
- func (x *EgoError) GetMetadata() map[string]string
- func (x *EgoError) GetReason() string
- func (x *EgoError) Is(err error) bool
- func (*EgoError) ProtoMessage()
- func (x *EgoError) ProtoReflect() protoreflect.Message
- func (x *EgoError) Reset()
- func (x *EgoError) String() string
- func (x *EgoError) ToHTTPStatusCode() int
- func (x *EgoError) WithMd(md map[string]string) Error
- func (x *EgoError) WithMessage(msg string) Error
- func (x *EgoError) WithMetadata(md map[string]string) Error
- func (x *EgoError) WithMsg(msg string) Error
- type Error
Constants ¶
View Source
const ( // UnknownReason is unknown reason for error info. UnknownReason = "" // SupportPackageIsVersion1 this constant should not be referenced by any other code. SupportPackageIsVersion1 = true )
Variables ¶
View Source
var File_core_eerrors_errors_proto protoreflect.FileDescriptor
Functions ¶
func IsCanceled ¶ added in v1.1.6
IsCanceled determines if err is an error which indicates a Canceled error.
func IsDeadlineExceeded ¶ added in v1.1.6
IsDeadlineExceeded determines if err is an error which indicates a DeadlineExceeded error.
func IsNotFound ¶ added in v1.1.6
IsNotFound determines if err is an error which indicates a NotFound error.
Types ¶
type EgoError ¶
type EgoError struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` Metadata map[string]string `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
func DeadlineExceeded ¶ added in v1.1.6
DeadlineExceeded new DeadlineExceeded error that is mapped to context.DeadlineExceeded.
func (*EgoError) Descriptor
deprecated
func (*EgoError) GRPCStatus ¶
GRPCStatus returns the Status represented by se.
func (*EgoError) GetMessage ¶ added in v0.6.10
func (*EgoError) GetMetadata ¶
func (*EgoError) ProtoMessage ¶
func (*EgoError) ProtoMessage()
func (*EgoError) ProtoReflect ¶
func (x *EgoError) ProtoReflect() protoreflect.Message
func (*EgoError) ToHTTPStatusCode ¶ added in v0.6.11
ToHTTPStatusCode Get equivalent HTTP status code from x.Code
func (*EgoError) WithMessage ¶ added in v0.6.10
WithMessage set message to current EgoError Deprecated: Will be removed in future versions, use WithMsg instead.
func (*EgoError) WithMetadata ¶
WithMetadata with an MD formed by the mapping of key, value. Deprecated: Will be removed in future versions, use WithMd instead.
Click to show internal directories.
Click to hide internal directories.