header

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: MIT Imports: 8 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SignatureV1 = []byte{'\x0D', '\x0A', '\x0D', '\x0A', '\x00', '\x0D', '\x0A', '\x51', '\x55', '\x49', '\x54', '\x0A', '\x01'}

	ErrNoPiCoP            = errors.New("PiCoP: signature not present")
	ErrCannotReadV1Header = errors.New("PiCoP: cannot read v1 header")
)

Functions

This section is empty.

Types

type Header struct {
	// contains filtered or unexported fields
}

func NewV1

func NewV1() *Header

NewV1 return PiCoP V1 Header.

func Parse

func Parse(r io.Reader) (*Header, error)

func (Header) Add

func (h Header) Add(key, value string)

func (Header) Del

func (h Header) Del(key string)

func (Header) Format

func (h Header) Format() []byte

func (Header) Get

func (h Header) Get(key string) string

func (Header) Keys

func (h Header) Keys() []string

func (Header) Set

func (h Header) Set(key, value string)

func (Header) String

func (h Header) String() string

func (Header) Values

func (h Header) Values(key string) []string

func (Header) WriteTo

func (h Header) WriteTo(w io.Writer) (int64, error)

WriteTo renders a proxy protocol header in a format and writes it to an io.Writer.

type MIMEHeader

type MIMEHeader struct {
	textproto.MIMEHeader
}

func NewMIMEHeader

func NewMIMEHeader() MIMEHeader

func (MIMEHeader) String

func (h MIMEHeader) String() string

Jump to

Keyboard shortcuts

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