exthttp

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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