types

package
v0.0.0-...-fe14df0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Continuation

type Continuation struct {
	Flags   ContinuationFlags
	Payload ContinuationPayload
}

func CreateContinuation

func CreateContinuation(flags byte, payload []byte, payloadLength uint32) *Continuation

type ContinuationFlags

type ContinuationFlags struct {
	EndHeaders bool
}

The CONTINUATION frame is used to continue a sequence of header block fragments

func (ContinuationFlags) Byte

func (c ContinuationFlags) Byte() (flags byte)

func (*ContinuationFlags) ReadFlags

func (c *ContinuationFlags) ReadFlags(flags byte)

type ContinuationPayload

type ContinuationPayload struct {
	HeaderFragment []byte
}

func (ContinuationPayload) Bytes

func (c ContinuationPayload) Bytes(flags IFlags) []byte

func (*ContinuationPayload) ReadPayload

func (c *ContinuationPayload) ReadPayload(payload []byte, length uint32, flags IFlags)

type Data

type Data struct {
	Flags   DataFlags
	Payload DataPayload
}

func CreateData

func CreateData(flags byte, payload []byte, payloadLength uint32) *Data

type DataFlags

type DataFlags struct {
	EndStream bool
	Padded    bool
}

func (DataFlags) Byte

func (d DataFlags) Byte() (flags byte)

func (*DataFlags) ReadFlags

func (d *DataFlags) ReadFlags(flags byte)

type DataPayload

type DataPayload struct {
	Data []byte
}

func (DataPayload) Bytes

func (d DataPayload) Bytes(flags IFlags) []byte

func (*DataPayload) ReadPayload

func (d *DataPayload) ReadPayload(payload []byte, length uint32, flags IFlags)

type GoAway

type GoAway struct {
	Flags   GoAwayFlags
	Payload GoAwayPayload
}

func CreateGoAway

func CreateGoAway(flags byte, payload []byte, payloadLength uint32) *GoAway

type GoAwayFlags

type GoAwayFlags struct{}

func (GoAwayFlags) Byte

func (g GoAwayFlags) Byte() (flags byte)

func (GoAwayFlags) ReadFlags

func (g GoAwayFlags) ReadFlags(flags byte)

type GoAwayPayload

type GoAwayPayload struct {
	LastStreamID uint32
	ErrorCode    uint32
	DebugData    []byte
}

func (GoAwayPayload) Bytes

func (g GoAwayPayload) Bytes(flags IFlags) []byte

func (*GoAwayPayload) ReadPayload

func (g *GoAwayPayload) ReadPayload(payload []byte, length uint32, flags IFlags)

type Headers

type Headers struct {
	Flags   HeadersFlags
	Payload HeadersPayload
}

func CreateHeaders

func CreateHeaders(flags byte, payload []byte, payloadLength uint32) *Headers

type HeadersFlags

type HeadersFlags struct {
	EndStream  bool
	EndHeaders bool
	Padded     bool
	Priority   bool
}

func (HeadersFlags) Byte

func (h HeadersFlags) Byte() (flags byte)

func (*HeadersFlags) ReadFlags

func (h *HeadersFlags) ReadFlags(flags byte)

type HeadersPayload

type HeadersPayload struct {
	StreamExclusive  bool   // Can only be set true if Priority flag is set
	StreamDependency uint32 // Can only be present if Priority flag  is set
	PriorityWeight   byte   // Can only be present if Priority flag is set
	Fragment         []byte
	PadLength        byte
}

func (HeadersPayload) Bytes

func (h HeadersPayload) Bytes(flags IFlags) []byte

func (*HeadersPayload) ReadPayload

func (h *HeadersPayload) ReadPayload(payload []byte, length uint32, flags IFlags)

type IFlags

type IFlags interface {
	ReadFlags(byte)
	Byte() byte
}

IFlags is an interface implemented by the different frame types so that the generic Frame struct can handle all the different frame types

type IPayload

type IPayload interface {
	ReadPayload(payload []byte, length uint32, flags IFlags)
	Bytes(flags IFlags) []byte
}

IPayload is an interface implemented by the different frame types so that the generic Frame struct can handle all the different payload types

type Ping

type Ping struct {
	Flags   PingFlags
	Payload PingPayload
}

func CreatePing

func CreatePing(flags byte, payload []byte, payloadLength uint32) *Ping

type PingFlags

type PingFlags struct {
	Ack bool
}

func (PingFlags) Byte

func (p PingFlags) Byte() (flags byte)

func (*PingFlags) ReadFlags

func (p *PingFlags) ReadFlags(flags byte)

type PingPayload

type PingPayload struct {
	Data []byte
}

func (PingPayload) Bytes

func (p PingPayload) Bytes(flags IFlags) []byte

func (*PingPayload) ReadPayload

func (p *PingPayload) ReadPayload(payload []byte, length uint32, flags IFlags)

type Priority

type Priority struct {
	Flags   PriorityFlags
	Payload PriorityPayload
}

func CreatePriority

func CreatePriority(flags byte, payload []byte, payloadLength uint32) *Priority

type PriorityFlags

type PriorityFlags struct{}

func (PriorityFlags) Byte

func (p PriorityFlags) Byte() (flags byte)

func (PriorityFlags) ReadFlags

func (p PriorityFlags) ReadFlags(flags byte)

type PriorityPayload

type PriorityPayload struct {
	StreamExclusive  bool
	StreamDependency uint32
	PriorityWeight   byte
}

func (PriorityPayload) Bytes

func (p PriorityPayload) Bytes(flags IFlags) []byte

func (*PriorityPayload) ReadPayload

func (p *PriorityPayload) ReadPayload(payload []byte, length uint32, flags IFlags)

type PushPromise

type PushPromise struct {
	Flags   PushPromiseFlags
	Payload PushPromisePayload
}

func CreatePushPromise

func CreatePushPromise(flags byte, payload []byte, payloadLength uint32) *PushPromise

type PushPromiseFlags

type PushPromiseFlags struct {
	EndHeaders bool
	Padded     bool
}

func (PushPromiseFlags) Byte

func (p PushPromiseFlags) Byte() (flags byte)

func (PushPromiseFlags) ReadFlags

func (p PushPromiseFlags) ReadFlags(flags byte)

type PushPromisePayload

type PushPromisePayload struct {
	StreamID  uint32
	Fragment  []byte
	PadLength byte
}

func (PushPromisePayload) Bytes

func (p PushPromisePayload) Bytes(flags IFlags) []byte

func (PushPromisePayload) ReadPayload

func (p PushPromisePayload) ReadPayload(payload []byte, length uint32, flags IFlags)

type RstStream

type RstStream struct {
	Flags   RstStreamFlags
	Payload RstStreamPayload
}

func CreateRstStream

func CreateRstStream(flags byte, payload []byte, payloadLength uint32) *RstStream

type RstStreamFlags

type RstStreamFlags struct{}

func (RstStreamFlags) Byte

func (r RstStreamFlags) Byte() (flags byte)

func (RstStreamFlags) ReadFlags

func (r RstStreamFlags) ReadFlags(flags byte)

type RstStreamPayload

type RstStreamPayload struct {
	ErrorCode uint32
}

func (RstStreamPayload) Bytes

func (rst RstStreamPayload) Bytes(flags IFlags) []byte

func (*RstStreamPayload) ReadPayload

func (rst *RstStreamPayload) ReadPayload(payload []byte, length uint32, flags IFlags)

type Settings

type Settings struct {
	Flags   SettingsFlags
	Payload SettingsPayload
}

func CreateSettings

func CreateSettings(flags byte, payload []byte, payloadLength uint32) *Settings

type SettingsFlags

type SettingsFlags struct {
	Ack bool
}

func (SettingsFlags) Byte

func (s SettingsFlags) Byte() (flags byte)

func (*SettingsFlags) ReadFlags

func (s *SettingsFlags) ReadFlags(flags byte)

type SettingsPayload

type SettingsPayload struct {
	IDValuePair map[uint16]uint32
}

func (SettingsPayload) Bytes

func (s SettingsPayload) Bytes(flags IFlags) []byte

func (*SettingsPayload) ReadPayload

func (s *SettingsPayload) ReadPayload(payload []byte, length uint32, flags IFlags)

type WindowUpdate

type WindowUpdate struct {
	Flags   WindowUpdateFlags
	Payload WindowUpdatePayload
}

func CreateWindowUpdate

func CreateWindowUpdate(flags byte, payload []byte, payloadLength uint32) *WindowUpdate

type WindowUpdateFlags

type WindowUpdateFlags struct{}

func (WindowUpdateFlags) Byte

func (w WindowUpdateFlags) Byte() (flags byte)

func (WindowUpdateFlags) ReadFlags

func (w WindowUpdateFlags) ReadFlags(flags byte)

type WindowUpdatePayload

type WindowUpdatePayload struct {
	WindowSizeIncrement uint32
}

func (WindowUpdatePayload) Bytes

func (w WindowUpdatePayload) Bytes(flags IFlags) []byte

func (*WindowUpdatePayload) ReadPayload

func (w *WindowUpdatePayload) ReadPayload(payload []byte, length uint32, flags IFlags)

Jump to

Keyboard shortcuts

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