Help us shape the future of Go! Take the 2026 Go Developer Survey

exthttp

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: Apache-2.0 Imports: 8 Imported by: 1

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")
)

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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) 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 (dst *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