packstream

package
v5.8.1-12 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package packstream handles serialization of data sent to database server and deserialization of data received from database server.

Index

Constants

View Source
const (
	PackedUndef = iota // Undefined must be zero!
	PackedInt
	PackedFloat
	PackedStr
	PackedStruct
	PackedByteArray
	PackedArray
	PackedMap
	PackedNil
	PackedTrue
	PackedFalse
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IoError

type IoError struct{}

func (*IoError) Error

func (e *IoError) Error() string

type OverflowError

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

func (*OverflowError) Error

func (e *OverflowError) Error() string

type Packer

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

func (*Packer) ArrayHeader

func (p *Packer) ArrayHeader(l int)

func (*Packer) Begin

func (p *Packer) Begin(buf []byte)

func (*Packer) Bool

func (p *Packer) Bool(b bool)

func (*Packer) Bytes

func (p *Packer) Bytes(b []byte)

func (*Packer) End

func (p *Packer) End() ([]byte, error)

func (*Packer) Float32

func (p *Packer) Float32(f float32)

func (*Packer) Float64

func (p *Packer) Float64(f float64)

func (*Packer) Float64s

func (p *Packer) Float64s(ii []float64)

func (*Packer) Int

func (p *Packer) Int(i int)

func (*Packer) Int16

func (p *Packer) Int16(i int16)

func (*Packer) Int32

func (p *Packer) Int32(i int32)

func (*Packer) Int64

func (p *Packer) Int64(i int64)

func (*Packer) Int64s

func (p *Packer) Int64s(ii []int64)

func (*Packer) Int8

func (p *Packer) Int8(i int8)

func (*Packer) IntMap

func (p *Packer) IntMap(m map[string]int)

func (*Packer) Ints

func (p *Packer) Ints(ii []int)

func (*Packer) MapHeader

func (p *Packer) MapHeader(l int)

func (*Packer) Nil

func (p *Packer) Nil()

func (*Packer) String

func (p *Packer) String(s string)

func (*Packer) StringMap

func (p *Packer) StringMap(m map[string]string)

func (*Packer) Strings

func (p *Packer) Strings(ss []string)

func (*Packer) StructHeader

func (p *Packer) StructHeader(tag byte, num int)

func (*Packer) Uint16

func (p *Packer) Uint16(i uint16)

func (*Packer) Uint32

func (p *Packer) Uint32(i uint32)

func (*Packer) Uint64

func (p *Packer) Uint64(i uint64)

func (*Packer) Uint8

func (p *Packer) Uint8(i uint8)

type UnpackError

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

func (*UnpackError) Error

func (e *UnpackError) Error() string

type Unpacker

type Unpacker struct {
	Err  error
	Curr int // Packed type
	// contains filtered or unexported fields
}

func (*Unpacker) Bool

func (u *Unpacker) Bool() bool

func (*Unpacker) ByteArray

func (u *Unpacker) ByteArray() []byte

func (*Unpacker) Float

func (u *Unpacker) Float() float64

func (*Unpacker) Int

func (u *Unpacker) Int() int64

func (*Unpacker) Len

func (u *Unpacker) Len() uint32

func (*Unpacker) Next

func (u *Unpacker) Next()

func (*Unpacker) Reset

func (u *Unpacker) Reset(buf []byte)

func (*Unpacker) String

func (u *Unpacker) String() string

func (*Unpacker) StructTag

func (u *Unpacker) StructTag() byte

Jump to

Keyboard shortcuts

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