compact

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

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

Go to latest
Published: Apr 2, 2019 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Iterator

type Iterator struct {
	spi.ValDecoderProvider
	// contains filtered or unexported fields
}

func NewIterator

func NewIterator(provider spi.ValDecoderProvider, reader io.Reader, buf []byte) *Iterator

func (*Iterator) Discard

func (iter *Iterator) Discard(ttype protocol.TType)

func (*Iterator) Error

func (iter *Iterator) Error() error

func (*Iterator) ReadBinary

func (iter *Iterator) ReadBinary() []byte

func (*Iterator) ReadBool

func (iter *Iterator) ReadBool() bool

func (*Iterator) ReadFloat64

func (iter *Iterator) ReadFloat64() float64

func (*Iterator) ReadInt

func (iter *Iterator) ReadInt() int

func (*Iterator) ReadInt16

func (iter *Iterator) ReadInt16() int16

func (*Iterator) ReadInt32

func (iter *Iterator) ReadInt32() int32

func (*Iterator) ReadInt64

func (iter *Iterator) ReadInt64() int64

func (*Iterator) ReadInt8

func (iter *Iterator) ReadInt8() int8

func (*Iterator) ReadListHeader

func (iter *Iterator) ReadListHeader() (elemType protocol.TType, size int)

func (*Iterator) ReadMapHeader

func (iter *Iterator) ReadMapHeader() (keyType protocol.TType, elemType protocol.TType, size int)

func (*Iterator) ReadMessageHeader

func (iter *Iterator) ReadMessageHeader() protocol.MessageHeader

func (*Iterator) ReadString

func (iter *Iterator) ReadString() string

func (*Iterator) ReadStructField

func (iter *Iterator) ReadStructField() (fieldType protocol.TType, fieldId protocol.FieldId)

func (*Iterator) ReadStructHeader

func (iter *Iterator) ReadStructHeader()

func (*Iterator) ReadUint

func (iter *Iterator) ReadUint() uint

func (*Iterator) ReadUint16

func (iter *Iterator) ReadUint16() uint16

func (*Iterator) ReadUint32

func (iter *Iterator) ReadUint32() uint32

func (*Iterator) ReadUint64

func (iter *Iterator) ReadUint64() uint64

func (*Iterator) ReadUint8

func (iter *Iterator) ReadUint8() uint8

func (*Iterator) ReportError

func (iter *Iterator) ReportError(operation string, err string)

func (*Iterator) Reset

func (iter *Iterator) Reset(reader io.Reader, buf []byte)

func (*Iterator) Skip

func (iter *Iterator) Skip(ttype protocol.TType, space []byte) []byte

func (*Iterator) SkipBinary

func (iter *Iterator) SkipBinary(space []byte) []byte

func (*Iterator) SkipList

func (iter *Iterator) SkipList(space []byte) []byte

func (*Iterator) SkipMap

func (iter *Iterator) SkipMap(space []byte) []byte

func (*Iterator) SkipMessageHeader

func (iter *Iterator) SkipMessageHeader(space []byte) []byte

func (*Iterator) SkipStruct

func (iter *Iterator) SkipStruct(space []byte) []byte

func (*Iterator) Spawn

func (iter *Iterator) Spawn() spi.Iterator

type Stream

type Stream struct {
	spi.ValEncoderProvider
	// contains filtered or unexported fields
}

func NewStream

func NewStream(provider spi.ValEncoderProvider, writer io.Writer, buf []byte) *Stream

func (*Stream) Buffer

func (stream *Stream) Buffer() []byte

func (*Stream) Error

func (stream *Stream) Error() error

func (*Stream) Flush

func (stream *Stream) Flush()

func (*Stream) ReportError

func (stream *Stream) ReportError(operation string, err string)

func (*Stream) Reset

func (stream *Stream) Reset(writer io.Writer)

func (*Stream) Spawn

func (stream *Stream) Spawn() spi.Stream

func (*Stream) Write

func (stream *Stream) Write(buf []byte) error

func (*Stream) WriteBinary

func (stream *Stream) WriteBinary(val []byte)

func (*Stream) WriteBool

func (stream *Stream) WriteBool(val bool)

func (*Stream) WriteFloat64

func (stream *Stream) WriteFloat64(val float64)

func (*Stream) WriteInt

func (stream *Stream) WriteInt(val int)

func (*Stream) WriteInt16

func (stream *Stream) WriteInt16(val int16)

func (*Stream) WriteInt32

func (stream *Stream) WriteInt32(val int32)

func (*Stream) WriteInt64

func (stream *Stream) WriteInt64(val int64)

func (*Stream) WriteInt8

func (stream *Stream) WriteInt8(val int8)

func (*Stream) WriteListHeader

func (stream *Stream) WriteListHeader(elemType protocol.TType, length int)

func (*Stream) WriteMapHeader

func (stream *Stream) WriteMapHeader(keyType protocol.TType, elemType protocol.TType, length int)

func (*Stream) WriteMessageHeader

func (stream *Stream) WriteMessageHeader(header protocol.MessageHeader)

func (*Stream) WriteString

func (stream *Stream) WriteString(val string)

func (*Stream) WriteStructField

func (stream *Stream) WriteStructField(fieldType protocol.TType, fieldId protocol.FieldId)

func (*Stream) WriteStructFieldStop

func (stream *Stream) WriteStructFieldStop()

func (*Stream) WriteStructHeader

func (stream *Stream) WriteStructHeader()

func (*Stream) WriteUint

func (stream *Stream) WriteUint(val uint)

func (*Stream) WriteUint16

func (stream *Stream) WriteUint16(val uint16)

func (*Stream) WriteUint32

func (stream *Stream) WriteUint32(val uint32)

func (*Stream) WriteUint64

func (stream *Stream) WriteUint64(val uint64)

func (*Stream) WriteUint8

func (stream *Stream) WriteUint8(val uint8)

type TCompactType

type TCompactType byte
const (
	TypeStop         TCompactType = 0x00
	TypeBooleanTrue  TCompactType = 0x01
	TypeBooleanFalse TCompactType = 0x02
	TypeByte         TCompactType = 0x03
	TypeI16          TCompactType = 0x04
	TypeI32          TCompactType = 0x05
	TypeI64          TCompactType = 0x06
	TypeDouble       TCompactType = 0x07
	TypeBinary       TCompactType = 0x08
	TypeList         TCompactType = 0x09
	TypeSet          TCompactType = 0x0A
	TypeMap          TCompactType = 0x0B
	TypeStruct       TCompactType = 0x0C
)

func (TCompactType) ToTType

func (t TCompactType) ToTType() protocol.TType

TType value.

Jump to

Keyboard shortcuts

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