Versions in this module Expand all Collapse all v2 v2.0.4 Aug 2, 2021 Changes in this version + const SupportPackageIsVersion1 + const UnknownCode + const UnknownReason + var E_Code = &file_errors_proto_extTypes[1] + var E_DefaultCode = &file_errors_proto_extTypes[0] + var File_errors_proto protoreflect.FileDescriptor + func As(err error, target interface{}) bool + func Code(err error) int + func Errorf(code int, reason, format string, a ...interface{}) error + func Is(err, target error) bool + func IsBadRequest(err error) bool + func IsClientClosed(err error) bool + func IsConflict(err error) bool + func IsForbidden(err error) bool + func IsGatewayTimeout(err error) bool + func IsInternalServer(err error) bool + func IsNotFound(err error) bool + func IsServiceUnavailable(err error) bool + func IsUnauthorized(err error) bool + func Reason(err error) string + func Unwrap(err error) error + type Error struct + Code int32 + Message string + Metadata map[string]string + Reason string + func BadRequest(reason, message string) *Error + func ClientClosed(reason, message string) *Error + func Conflict(reason, message string) *Error + func Forbidden(reason, message string) *Error + func FromError(err error) *Error + func GatewayTimeout(reason, message string) *Error + func InternalServer(reason, message string) *Error + func New(code int, reason, message string) *Error + func Newf(code int, reason, format string, a ...interface{}) *Error + func NotFound(reason, message string) *Error + func ServiceUnavailable(reason, message string) *Error + func Unauthorized(reason, message string) *Error + func (*Error) Descriptor() ([]byte, []int) + func (*Error) ProtoMessage() + func (e *Error) Error() string + func (e *Error) GRPCStatus() *status.Status + func (e *Error) Is(err error) bool + func (e *Error) WithMetadata(md map[string]string) *Error + func (x *Error) GetCode() int32 + func (x *Error) GetMessage() string + func (x *Error) GetMetadata() map[string]string + func (x *Error) GetReason() string + func (x *Error) ProtoReflect() protoreflect.Message + func (x *Error) Reset() + func (x *Error) String() string