Documentation ¶
Overview ¶
For internal use. Aliases to generated code are available in pkerr.
Index ¶
- Variables
- type Error
- func (*Error) Descriptor() ([]byte, []int)deprecated
- func (x *Error) Error() string
- func (x *Error) GetCode() uint32
- func (x *Error) GetDetails() []*any.Any
- func (x *Error) GetGrpcCode() int32
- func (x *Error) GetId() *cereal.UUID
- func (x *Error) GetIssuer() string
- func (x *Error) GetMessage() string
- func (x *Error) GetName() string
- func (x *Error) GetSourceError() string
- func (x *Error) GetSourceType() string
- func (x *Error) GetTime() *timestamp.Timestamp
- func (x *Error) GetTrace() []*TraceInfo
- func (*Error) ProtoMessage()
- func (x *Error) ProtoReflect() protoreflect.Message
- func (x *Error) Reset()
- func (x *Error) String() string
- type TraceInfo
- func (*TraceInfo) Descriptor() ([]byte, []int)deprecated
- func (x *TraceInfo) GetAdditionalContext() string
- func (x *TraceInfo) GetAppHost() string
- func (x *TraceInfo) GetAppName() string
- func (x *TraceInfo) GetStackTrace() string
- func (*TraceInfo) ProtoMessage()
- func (x *TraceInfo) ProtoReflect() protoreflect.Message
- func (x *TraceInfo) Reset()
- func (x *TraceInfo) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_grpeakec_proto_pkerr_error_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { // id is a uuid that uniquely identifies this error. Id *cereal.UUID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // issuer is the issuer of a code. If multiple services use this library, they // can differentiate their error codes by having unique issuers. If a number of // services working together in the same backend coordinate to ensure their error // definitions do not overlap, they can share an Issuer value. Issuer string `protobuf:"bytes,2,opt,name=issuer,proto3" json:"issuer,omitempty"` // code is the API Error code. Code uint32 `protobuf:"varint,3,opt,name=code,proto3" json:"code,omitempty"` // grpc_code is the grpc status code associated with this error. GrpcCode int32 `protobuf:"varint,4,opt,name=grpc_code,json=grpcCode,proto3" json:"grpc_code,omitempty"` // name is the human-readable API Error name tied to code. Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` // message is the error message. Message string `protobuf:"bytes,6,opt,name=message,proto3" json:"message,omitempty"` // source_err is a string representation of the original native error that lead to // this gRPEAKEC Error. Can be blank. SourceError string `protobuf:"bytes,7,opt,name=source_error,json=sourceError,proto3" json:"source_error,omitempty"` // source_type is the type of source_err. Can be blank. SourceType string `protobuf:"bytes,8,opt,name=source_type,json=sourceType,proto3" json:"source_type,omitempty"` // time is the time that the error occurred Time *timestamp.Timestamp `protobuf:"bytes,9,opt,name=time,proto3" json:"time,omitempty"` // details are arbitrary information about the error. Details []*any.Any `protobuf:"bytes,10,rep,name=details,proto3" json:"details,omitempty"` // Trace holds a stack of TraceInfo objects. Each time an app encounters an error, // it can add it's TraceInfo object to the end of the trace. Trace []*TraceInfo `protobuf:"bytes,11,rep,name=trace,proto3" json:"trace,omitempty"` // contains filtered or unexported fields }
Error holds information about an error.
func (*Error) Descriptor
deprecated
func (*Error) GetDetails ¶
func (*Error) GetGrpcCode ¶
func (*Error) GetMessage ¶
func (*Error) GetSourceError ¶ added in v0.0.2
func (*Error) GetSourceType ¶ added in v0.0.2
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
type TraceInfo ¶
type TraceInfo struct { // app name is the name of the service or process that generated the error. AppName string `protobuf:"bytes,1,opt,name=app_name,json=appName,proto3" json:"app_name,omitempty"` // Identifier for the host the app is running on. AppHost string `protobuf:"bytes,2,opt,name=app_host,json=appHost,proto3" json:"app_host,omitempty"` // stack_trace of the error (can be ""). No enforced format. This is meant for human // reference). StackTrace string `protobuf:"bytes,3,opt,name=stack_trace,json=stackTrace,proto3" json:"stack_trace,omitempty"` // Some languages let an error continue to gather context, with wrapping errors in go. // This field can be used to store additional context added to the error after it // was created. AdditionalContext string `protobuf:"bytes,4,opt,name=additional_context,json=additionalContext,proto3" json:"additional_context,omitempty"` // contains filtered or unexported fields }
Trace info holds information about where an error occurred.
func (*TraceInfo) Descriptor
deprecated
func (*TraceInfo) GetAdditionalContext ¶
func (*TraceInfo) GetAppHost ¶
func (*TraceInfo) GetAppName ¶
func (*TraceInfo) GetStackTrace ¶
func (*TraceInfo) ProtoMessage ¶
func (*TraceInfo) ProtoMessage()
func (*TraceInfo) ProtoReflect ¶
func (x *TraceInfo) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.