exthttp

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthExtHttp        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowExtHttp          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupExtHttp = fmt.Errorf("proto: unexpected end of group")
)

Functions

func GetHTTPCode

func GetHTTPCode(err error, defaultCode int) int

GetHTTPCode retrieves the HTTP code from a stack of causes.

func WrapWithHTTPCode

func WrapWithHTTPCode(err error, code int) error

WrapWithHTTPCode adds a HTTP code to an existing error.

Types

type EncodedHTTPCode

type EncodedHTTPCode struct {
	Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
}

func (*EncodedHTTPCode) Descriptor

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

func (*EncodedHTTPCode) Marshal

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

func (*EncodedHTTPCode) MarshalTo

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

func (*EncodedHTTPCode) MarshalToSizedBuffer added in v1.8.4

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

func (*EncodedHTTPCode) ProtoMessage

func (*EncodedHTTPCode) ProtoMessage()

func (*EncodedHTTPCode) Reset

func (m *EncodedHTTPCode) Reset()

func (*EncodedHTTPCode) Size

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

func (*EncodedHTTPCode) String

func (m *EncodedHTTPCode) String() string

func (*EncodedHTTPCode) Unmarshal

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

func (*EncodedHTTPCode) XXX_DiscardUnknown

func (m *EncodedHTTPCode) XXX_DiscardUnknown()

func (*EncodedHTTPCode) XXX_Marshal

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

func (*EncodedHTTPCode) XXX_Merge

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

func (*EncodedHTTPCode) XXX_Size

func (m *EncodedHTTPCode) XXX_Size() int

func (*EncodedHTTPCode) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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