errorxpb

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthErrors        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowErrors          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupErrors = fmt.Errorf("proto: unexpected end of group")
)
View Source
var ErrorxType_name = map[int32]string{
	0:  "UNKNOWN",
	1:  "INTERNAL",
	2:  "BAD_REQUEST",
	3:  "REQUIRES_PROXY_REQUEST",
	4:  "RATE_LIMITED",
	5:  "DISABLED",
	6:  "UNIMPLEMENTED",
	7:  "UNPROCESSABLE_ENTITY",
	8:  "CONFLICT",
	9:  "TOO_MANY_REQUESTS",
	10: "UNSUPPORTED_MEDIA_TYPE",
}
View Source
var ErrorxType_value = map[string]int32{
	"UNKNOWN":                0,
	"INTERNAL":               1,
	"BAD_REQUEST":            2,
	"REQUIRES_PROXY_REQUEST": 3,
	"RATE_LIMITED":           4,
	"DISABLED":               5,
	"UNIMPLEMENTED":          6,
	"UNPROCESSABLE_ENTITY":   7,
	"CONFLICT":               8,
	"TOO_MANY_REQUESTS":      9,
	"UNSUPPORTED_MEDIA_TYPE": 10,
}

Functions

This section is empty.

Types

type ErrorDetails

type ErrorDetails struct {
	Type ErrorxType `protobuf:"varint,1,opt,name=type,proto3,enum=errorx.ErrorxType" json:"type,omitempty"`
	// Reason is used by RequiresProxyRequest for logging.
	Reason string `protobuf:"bytes,2,opt,name=Reason,proto3" json:"Reason,omitempty"`
}

ErrorDetails are set for GRPC Status responses to provide extra context for conversion back to an errorx type.

func (*ErrorDetails) Descriptor

func (*ErrorDetails) Descriptor() ([]byte, []int)

func (*ErrorDetails) Equal

func (this *ErrorDetails) Equal(that interface{}) bool

func (*ErrorDetails) GetReason

func (m *ErrorDetails) GetReason() string

func (*ErrorDetails) GetType

func (m *ErrorDetails) GetType() ErrorxType

func (*ErrorDetails) GoString

func (this *ErrorDetails) GoString() string

func (*ErrorDetails) Marshal

func (m *ErrorDetails) Marshal() (dAtA []byte, err error)

func (*ErrorDetails) MarshalTo

func (m *ErrorDetails) MarshalTo(dAtA []byte) (int, error)

func (*ErrorDetails) MarshalToSizedBuffer

func (m *ErrorDetails) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ErrorDetails) ProtoMessage

func (*ErrorDetails) ProtoMessage()

func (*ErrorDetails) Reset

func (m *ErrorDetails) Reset()

func (*ErrorDetails) Size

func (m *ErrorDetails) Size() (n int)

func (*ErrorDetails) String

func (this *ErrorDetails) String() string

func (*ErrorDetails) Unmarshal

func (m *ErrorDetails) Unmarshal(dAtA []byte) error

func (*ErrorDetails) XXX_DiscardUnknown

func (m *ErrorDetails) XXX_DiscardUnknown()

func (*ErrorDetails) XXX_Marshal

func (m *ErrorDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ErrorDetails) XXX_Merge

func (m *ErrorDetails) XXX_Merge(src proto.Message)

func (*ErrorDetails) XXX_Size

func (m *ErrorDetails) XXX_Size() int

func (*ErrorDetails) XXX_Unmarshal

func (m *ErrorDetails) XXX_Unmarshal(b []byte) error

type ErrorxType

type ErrorxType int32

ErrorxType lists all of the errorx types that we have. The conversion function ignores the GRPC status type when doing the conversion.

const (
	UNKNOWN                ErrorxType = 0
	INTERNAL               ErrorxType = 1
	BAD_REQUEST            ErrorxType = 2
	REQUIRES_PROXY_REQUEST ErrorxType = 3
	RATE_LIMITED           ErrorxType = 4
	DISABLED               ErrorxType = 5
	UNIMPLEMENTED          ErrorxType = 6
	UNPROCESSABLE_ENTITY   ErrorxType = 7
	CONFLICT               ErrorxType = 8
	TOO_MANY_REQUESTS      ErrorxType = 9
	UNSUPPORTED_MEDIA_TYPE ErrorxType = 10
)

func (ErrorxType) EnumDescriptor

func (ErrorxType) EnumDescriptor() ([]byte, []int)

func (ErrorxType) String

func (x ErrorxType) String() string

Jump to

Keyboard shortcuts

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