shorthand

package
v0.0.0-...-2bde968 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidCRC = fmt.Errorf("invalid CRC")
)

Functions

func Recover

func Recover(errp *error)

Types

type Decoder

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

func NewDecoder

func NewDecoder(b []byte) *Decoder

func (*Decoder) Advance

func (d *Decoder) Advance(fun, field string, n int)

func (*Decoder) Available

func (d *Decoder) Available(fun, field string, num int) []byte

func (*Decoder) Buffer

func (d *Decoder) Buffer() []byte

func (*Decoder) ByteSlice

func (d *Decoder) ByteSlice(field string) []byte

func (*Decoder) Bytes

func (d *Decoder) Bytes(field string, num int) []byte

func (*Decoder) CheckCRC

func (d *Decoder) CheckCRC(field string)

func (*Decoder) Len

func (d *Decoder) Len() int

func (*Decoder) StartCRC

func (d *Decoder) StartCRC()

func (*Decoder) String

func (d *Decoder) String(field string) string

func (*Decoder) Uint16

func (d *Decoder) Uint16(field string) uint16

func (*Decoder) Uint32

func (d *Decoder) Uint32(field string) uint32

func (*Decoder) Uint64

func (d *Decoder) Uint64(field string) uint64

func (*Decoder) Uint8

func (d *Decoder) Uint8(field string) uint8

func (*Decoder) VarInt

func (d *Decoder) VarInt(field string) int

func (*Decoder) VarInt64

func (d *Decoder) VarInt64(field string) int64

func (*Decoder) VarUint64

func (d *Decoder) VarUint64(field string) uint64

type Encoder

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

func NewEncoder

func NewEncoder(buf []byte) *Encoder

func (*Encoder) Advance

func (e *Encoder) Advance(size int)

func (*Encoder) Buffer

func (e *Encoder) Buffer() []byte

func (*Encoder) ByteSlice

func (e *Encoder) ByteSlice(b []byte)

func (*Encoder) Bytes

func (e *Encoder) Bytes(b []byte)

func (*Encoder) Copy

func (e *Encoder) Copy() []byte

func (*Encoder) Grow

func (e *Encoder) Grow(required int) []byte

func (*Encoder) PutCRC

func (e *Encoder) PutCRC()

func (*Encoder) StartCRC

func (e *Encoder) StartCRC()

func (*Encoder) String

func (e *Encoder) String(s string)

func (*Encoder) Uint16

func (e *Encoder) Uint16(i uint16)

func (*Encoder) Uint32

func (e *Encoder) Uint32(i uint32)

func (*Encoder) Uint64

func (e *Encoder) Uint64(i uint64)

func (*Encoder) Uint8

func (e *Encoder) Uint8(i uint8)

func (*Encoder) VarInt

func (e *Encoder) VarInt(i int)

func (*Encoder) VarInt64

func (e *Encoder) VarInt64(i int64)

func (*Encoder) VarUint64

func (e *Encoder) VarUint64(u uint64)

Jump to

Keyboard shortcuts

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