codec

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxSliceSize = sizeOfUint32
)

Variables

This section is empty.

Functions

func AppendBool

func AppendBool(b []byte, v bool) []byte

func AppendBoolSlice

func AppendBoolSlice(b []byte, a []bool) []byte

func AppendBytes

func AppendBytes(b []byte, buf []byte) []byte

func AppendFloat32

func AppendFloat32(b []byte, f float32) []byte

func AppendFloat32Slice

func AppendFloat32Slice(b []byte, a []float32) []byte

func AppendFloat64

func AppendFloat64(b []byte, f float64) []byte

func AppendFloat64Slice

func AppendFloat64Slice(b []byte, a []float64) []byte

func AppendInt

func AppendInt(b []byte, i int) []byte

func AppendInt16

func AppendInt16(b []byte, i int16) []byte

func AppendInt16Slice

func AppendInt16Slice(b []byte, a []int16) []byte

func AppendInt32

func AppendInt32(b []byte, i int32) []byte

func AppendInt32Slice

func AppendInt32Slice(b []byte, a []int32) []byte

func AppendInt64

func AppendInt64(b []byte, i int64) []byte

func AppendInt64Slice

func AppendInt64Slice(b []byte, a []int64) []byte

func AppendIntSlice

func AppendIntSlice(b []byte, a []int) []byte

func AppendMapStringString

func AppendMapStringString(b []byte, m map[string]string) []byte

func AppendString

func AppendString(b []byte, s string) []byte

func AppendStringSlice

func AppendStringSlice(b []byte, a []string) []byte

func AppendUint16

func AppendUint16(b []byte, i uint16) []byte

func AppendUint16Slice

func AppendUint16Slice(b []byte, a []uint16) []byte

func AppendUint32

func AppendUint32(b []byte, i uint32) []byte

func AppendUint32Slice

func AppendUint32Slice(b []byte, a []uint32) []byte

func AppendUint64

func AppendUint64(b []byte, i uint64) []byte

func AppendUint64Slice

func AppendUint64Slice(b []byte, a []uint64) []byte

func AppendUint8

func AppendUint8(b []byte, i uint8) []byte

func SizeOfBool

func SizeOfBool() int

func SizeOfBoolSlice

func SizeOfBoolSlice(s []bool) int

func SizeOfByteSlice

func SizeOfByteSlice(s []byte) int

func SizeOfFloat32

func SizeOfFloat32() int

func SizeOfFloat32Slice

func SizeOfFloat32Slice(s []float32) int

func SizeOfFloat64

func SizeOfFloat64() int

func SizeOfFloat64Slice

func SizeOfFloat64Slice(s []float64) int

func SizeOfInt

func SizeOfInt() int

func SizeOfInt16

func SizeOfInt16() int

func SizeOfInt16Slice

func SizeOfInt16Slice(s []int16) int

func SizeOfInt32

func SizeOfInt32() int

func SizeOfInt32Slice

func SizeOfInt32Slice(s []int32) int

func SizeOfInt64

func SizeOfInt64() int

func SizeOfInt64Slice

func SizeOfInt64Slice(s []int64) int

func SizeOfIntSlice

func SizeOfIntSlice(s []int) int

func SizeOfMapStringString

func SizeOfMapStringString(m map[string]string) int

func SizeOfString

func SizeOfString(s string) int

func SizeOfStringSlice

func SizeOfStringSlice(s []string) int

func SizeOfUint16

func SizeOfUint16() int

func SizeOfUint16Slice

func SizeOfUint16Slice(s []uint16) int

func SizeOfUint32

func SizeOfUint32() int

func SizeOfUint32Slice

func SizeOfUint32Slice(s []uint32) int

func SizeOfUint64

func SizeOfUint64() int

func SizeOfUint64Slice

func SizeOfUint64Slice(s []uint64) int

func SizeOfUint8

func SizeOfUint8() int

Types

type BinaryCodec

type BinaryCodec interface {
	MarshalBinary() (data []byte, err error)
	UnmarshalBinary(data []byte) error
}

type BinaryDecoder

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

func NewBinaryDecoder

func NewBinaryDecoder(buf []byte) *BinaryDecoder

func (*BinaryDecoder) Bool

func (c *BinaryDecoder) Bool() bool

func (*BinaryDecoder) BoolSlice

func (c *BinaryDecoder) BoolSlice() []bool

func (*BinaryDecoder) Bytes

func (c *BinaryDecoder) Bytes() []byte

func (*BinaryDecoder) BytesNoCopy

func (c *BinaryDecoder) BytesNoCopy() []byte

func (*BinaryDecoder) Float32

func (c *BinaryDecoder) Float32() float32

func (*BinaryDecoder) Float32Slice

func (c *BinaryDecoder) Float32Slice() []float32

func (*BinaryDecoder) Float64

func (c *BinaryDecoder) Float64() float64

func (*BinaryDecoder) Float64Slice

func (c *BinaryDecoder) Float64Slice() []float64

func (*BinaryDecoder) Int

func (c *BinaryDecoder) Int() int

func (*BinaryDecoder) Int16

func (c *BinaryDecoder) Int16() int16

func (*BinaryDecoder) Int16Slice

func (c *BinaryDecoder) Int16Slice() []int16

func (*BinaryDecoder) Int32

func (c *BinaryDecoder) Int32() int32

func (*BinaryDecoder) Int32Slice

func (c *BinaryDecoder) Int32Slice() []int32

func (*BinaryDecoder) Int64

func (c *BinaryDecoder) Int64() int64

func (*BinaryDecoder) Int64Slice

func (c *BinaryDecoder) Int64Slice() []int64

func (*BinaryDecoder) IntSlice

func (c *BinaryDecoder) IntSlice() []int

func (*BinaryDecoder) MapStringString

func (c *BinaryDecoder) MapStringString() map[string]string

func (*BinaryDecoder) String

func (c *BinaryDecoder) String() string

func (*BinaryDecoder) StringSlice

func (c *BinaryDecoder) StringSlice() []string

func (*BinaryDecoder) Uint16

func (c *BinaryDecoder) Uint16() uint16

func (*BinaryDecoder) Uint16Slice

func (c *BinaryDecoder) Uint16Slice() []uint16

func (*BinaryDecoder) Uint16SliceNoCopy

func (c *BinaryDecoder) Uint16SliceNoCopy() []uint16

func (*BinaryDecoder) Uint32

func (c *BinaryDecoder) Uint32() uint32

func (*BinaryDecoder) Uint32Slice

func (c *BinaryDecoder) Uint32Slice() []uint32

func (*BinaryDecoder) Uint64

func (c *BinaryDecoder) Uint64() uint64

func (*BinaryDecoder) Uint64Slice

func (c *BinaryDecoder) Uint64Slice() []uint64

func (*BinaryDecoder) Uint8

func (c *BinaryDecoder) Uint8() uint8

type EmptyCodec

type EmptyCodec struct {
}

func (*EmptyCodec) Instance

func (c *EmptyCodec) Instance() transport.Codec

func (*EmptyCodec) Marshal

func (c *EmptyCodec) Marshal(buf []byte) ([]byte, error)

func (*EmptyCodec) Size

func (c *EmptyCodec) Size() int

func (*EmptyCodec) Unmarshal

func (c *EmptyCodec) Unmarshal([]byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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