binbuf

package
v0.0.0-...-9ae062e Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

View Source
const (
	Byte   byte = 'b'
	Short       = 't'
	Int         = 'i'
	Long        = 'l'
	String      = 's'
	Float       = 'f'
	Ints        = 'I'
	Array       = 'A'
	Hash        = 'H'
	Bool        = 'B'
	Null        = 'N'
	Unknow      = 0
)

Variables

This section is empty.

Functions

func ExtendCustomType

func ExtendCustomType(itype reflect.Type, bSign byte, serializeFunc func(b *BinBuffer, obj interface{}), deserializeFunc func(p *BinParser) interface{})

Types

type BinBuffer

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

func BuildBuffer

func BuildBuffer(capacity int) *BinBuffer

func (*BinBuffer) Bytes

func (b *BinBuffer) Bytes() ([]byte, error)

func (*BinBuffer) Dispose

func (b *BinBuffer) Dispose()

func (*BinBuffer) ErrorInfo

func (b *BinBuffer) ErrorInfo() string

func (*BinBuffer) PushArray

func (b *BinBuffer) PushArray(value []interface{}) *BinBuffer

func (*BinBuffer) PushBool

func (b *BinBuffer) PushBool(value bool) *BinBuffer

func (*BinBuffer) PushByte

func (b *BinBuffer) PushByte(value byte) *BinBuffer

func (*BinBuffer) PushBytes

func (b *BinBuffer) PushBytes(value []byte) *BinBuffer

func (*BinBuffer) PushFloat

func (b *BinBuffer) PushFloat(value float32) *BinBuffer

func (*BinBuffer) PushHash

func (b *BinBuffer) PushHash(value map[interface{}]interface{}) *BinBuffer

func (*BinBuffer) PushInt

func (b *BinBuffer) PushInt(value int32) *BinBuffer

func (*BinBuffer) PushInts

func (b *BinBuffer) PushInts(value []int32) *BinBuffer

func (*BinBuffer) PushLong

func (b *BinBuffer) PushLong(value int64) *BinBuffer

func (*BinBuffer) PushObject

func (b *BinBuffer) PushObject(value interface{}) *BinBuffer

func (*BinBuffer) PushShort

func (b *BinBuffer) PushShort(value int16) *BinBuffer

func (*BinBuffer) PushString

func (b *BinBuffer) PushString(value string) *BinBuffer

type BinParser

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

func BuildParser

func BuildParser(buffer []byte, offset int) *BinParser

func (*BinParser) Array

func (b *BinParser) Array() []interface{}

func (*BinParser) Bool

func (b *BinParser) Bool() bool

func (*BinParser) Byte

func (b *BinParser) Byte() byte

func (*BinParser) Bytes

func (b *BinParser) Bytes() []byte

func (*BinParser) Error

func (b *BinParser) Error() error

func (*BinParser) ErrorInfo

func (b *BinParser) ErrorInfo() string

func (*BinParser) Float

func (b *BinParser) Float() float32

func (*BinParser) Hash

func (b *BinParser) Hash() map[interface{}]interface{}

func (*BinParser) Int

func (b *BinParser) Int() int32

func (*BinParser) Ints

func (b *BinParser) Ints() []int32

func (*BinParser) Long

func (b *BinParser) Long() int64

func (*BinParser) Object

func (b *BinParser) Object() interface{}

func (*BinParser) OverFlow

func (b *BinParser) OverFlow() bool

func (*BinParser) Short

func (b *BinParser) Short() int16

func (*BinParser) String

func (b *BinParser) String() string

type CustomType

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

func NewCustomType

func NewCustomType(itype reflect.Type, bSign byte, serializeFunc func(b *BinBuffer, obj interface{}), deserializeFunc func(p *BinParser) interface{}) *CustomType

Jump to

Keyboard shortcuts

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