protogen

package
v0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

For internal use. Aliases to generated code are available in pkerr.

Index

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) Descriptor() ([]byte, []int)

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) Error

func (x *Error) Error() string

Error implements builtins.error

func (*Error) GetCode

func (x *Error) GetCode() uint32

func (*Error) GetDetails

func (x *Error) GetDetails() []*any.Any

func (*Error) GetGrpcCode

func (x *Error) GetGrpcCode() int32

func (*Error) GetId

func (x *Error) GetId() *cereal.UUID

func (*Error) GetIssuer

func (x *Error) GetIssuer() string

func (*Error) GetMessage

func (x *Error) GetMessage() string

func (*Error) GetName

func (x *Error) GetName() string

func (*Error) GetSourceError added in v0.0.2

func (x *Error) GetSourceError() string

func (*Error) GetSourceType added in v0.0.2

func (x *Error) GetSourceType() string

func (*Error) GetTime

func (x *Error) GetTime() *timestamp.Timestamp

func (*Error) GetTrace

func (x *Error) GetTrace() []*TraceInfo

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

func (x *Error) ProtoReflect() protoreflect.Message

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use TraceInfo.ProtoReflect.Descriptor instead.

func (*TraceInfo) GetAdditionalContext

func (x *TraceInfo) GetAdditionalContext() string

func (*TraceInfo) GetAppHost

func (x *TraceInfo) GetAppHost() string

func (*TraceInfo) GetAppName

func (x *TraceInfo) GetAppName() string

func (*TraceInfo) GetStackTrace

func (x *TraceInfo) GetStackTrace() string

func (*TraceInfo) ProtoMessage

func (*TraceInfo) ProtoMessage()

func (*TraceInfo) ProtoReflect

func (x *TraceInfo) ProtoReflect() protoreflect.Message

func (*TraceInfo) Reset

func (x *TraceInfo) Reset()

func (*TraceInfo) String

func (x *TraceInfo) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL