Versions in this module Expand all Collapse all v3 v3.7.3 Apr 29, 2020 Changes in this version + var Definitions = make(map[string]*Definition) + var ErrorDetailsFromProto func(msg ...proto.Message) (details ErrorDetails, rest []proto.Message) + var ErrorDetailsToProto func(e ErrorDetails) (msg proto.Message) + var JSONCodec interface{ ... } = jsonpb.TTN() + func Attributes(err ...error) map[string]interface + func Cause(err error) error + func Code(err error) uint32 + func Details(err error) []proto.Message + func FromHTTP(resp *http.Response) error + func HasCode(err error, c uint32) bool + func IsAborted(err error) bool + func IsAlreadyExists(err error) bool + func IsCanceled(err error) bool + func IsDataLoss(err error) bool + func IsDeadlineExceeded(err error) bool + func IsFailedPrecondition(err error) bool + func IsInternal(err error) bool + func IsInvalidArgument(err error) bool + func IsNotFound(err error) bool + func IsPermissionDenied(err error) bool + func IsResourceExhausted(err error) bool + func IsUnauthenticated(err error) bool + func IsUnavailable(err error) bool + func IsUnknown(err error) bool + func PublicAttributes(err ...error) map[string]interface + func Resemble(a, b error) bool + func RootCause(err error) error + func Stack(err error) (stack []error) + func StreamClientInterceptor() grpc.StreamClientInterceptor + func StreamServerInterceptor() grpc.StreamServerInterceptor + func ToHTTP(in error, w http.ResponseWriter) error + func ToHTTPStatusCode(err error) int + func UnaryClientInterceptor() grpc.UnaryClientInterceptor + func UnaryServerInterceptor() grpc.UnaryServerInterceptor + type Definition struct + func Define(name, messageFormat string, publicAttributes ...string) Definition + func DefineAborted(name, messageFormat string, publicAttributes ...string) Definition + func DefineAlreadyExists(name, messageFormat string, publicAttributes ...string) Definition + func DefineCorruption(name, messageFormat string, publicAttributes ...string) Definition + func DefineDataLoss(name, messageFormat string, publicAttributes ...string) Definition + func DefineFailedPrecondition(name, messageFormat string, publicAttributes ...string) Definition + func DefineInternal(name, messageFormat string, publicAttributes ...string) Definition + func DefineInvalidArgument(name, messageFormat string, publicAttributes ...string) Definition + func DefineNotFound(name, messageFormat string, publicAttributes ...string) Definition + func DefinePermissionDenied(name, messageFormat string, publicAttributes ...string) Definition + func DefineResourceExhausted(name, messageFormat string, publicAttributes ...string) Definition + func DefineUnauthenticated(name, messageFormat string, publicAttributes ...string) Definition + func DefineUnavailable(name, messageFormat string, publicAttributes ...string) Definition + func DefineUnimplemented(name, messageFormat string, publicAttributes ...string) Definition + func (d *Definition) UnmarshalJSON(data []byte) error + func (d Definition) Attributes() map[string]interface{} + func (d Definition) Cause() error + func (d Definition) Code() uint32 + func (d Definition) CorrelationID() string + func (d Definition) Details() []proto.Message + func (d Definition) Error() string + func (d Definition) FormatMessage(attributes map[string]interface{}) string + func (d Definition) FullName() string + func (d Definition) GRPCStatus() *status.Status + func (d Definition) MarshalJSON() ([]byte, error) + func (d Definition) MessageFormat() string + func (d Definition) Name() string + func (d Definition) Namespace() string + func (d Definition) New() Error + func (d Definition) PublicAttributes() map[string]interface{} + func (d Definition) String() string + func (d Definition) WithAttributes(kv ...interface{}) Error + func (d Definition) WithCause(cause error) Error + func (d Definition) WithDetails(details ...proto.Message) Error + type DefinitionInterface interface + Code func() uint32 + FullName func() string + MessageFormat func() string + Name func() string + Namespace func() string + type Error struct + func From(err error) (out *Error, ok bool) + func FromGRPCStatus(status *status.Status) Error + func FromHTTPStatusCode(status int, publicAttributes ...string) Error + func New(text string) Error + func (e *Error) GRPCStatus() *status.Status + func (e *Error) UnmarshalJSON(data []byte) error + func (e Error) Attributes() map[string]interface{} + func (e Error) Cause() error + func (e Error) Code() uint32 + func (e Error) CorrelationID() string + func (e Error) Details() (details []proto.Message) + func (e Error) Error() string + func (e Error) Fields() map[string]interface{} + func (e Error) MarshalJSON() ([]byte, error) + func (e Error) PublicAttributes() map[string]interface{} + func (e Error) String() string + func (e Error) WithAttributes(kv ...interface{}) Error + func (e Error) WithCause(cause error) Error + func (e Error) WithDetails(details ...proto.Message) Error + func (s Error) StackTrace() errors.StackTrace + type ErrorDetails interface + Cause func() error + Code func() uint32 + CorrelationID func() string + Details func() []proto.Message + Error func() string + MessageFormat func() string + Name func() string + Namespace func() string + PublicAttributes func() map[string]interface{} + type Interface interface + Attributes func() map[string]interface{} + Cause func() error + Details func() (details []proto.Message)