xstream

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2020 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StreamReader

type StreamReader interface {
	ReadStr() (string, error)
	ReadInt8() (int8, error)
	ReadInt16() (int16, error)
	ReadInt32() (int32, error)
	ReadInt64() (int64, error)
	ReadFloat32() (float32, error)
	ReadFloat64() (float64, error)
	ReadBool() (bool, error)
	ReadBytes() ([]byte, error)
	ReadNode() (val interface{}, t TNodeType, err error)
}

func NewBeStreamReader

func NewBeStreamReader(r io.Reader) StreamReader

func NewLeStreamReader

func NewLeStreamReader(r io.Reader) StreamReader

type StreamWriter

type StreamWriter interface {
	WriteStr(str string) error
	WriteInt8(v int8) error
	WriteInt16(v int16) error
	WriteInt32(v int32) error
	WriteInt64(v int64) error
	WriteFloat32(v float32) error
	WriteFloat64(v float64) error
	WriteBool(v bool) error
	WriteBytes(buf []byte) error
}

func NewBeStreamWriter

func NewBeStreamWriter(writer io.Writer) StreamWriter

func NewLeStreamWriter

func NewLeStreamWriter(writer io.Writer) StreamWriter

type TNodeType

type TNodeType int8
const (
	STR_NODE TNodeType = iota
	BOOL_NODE
	INT8_NODE
	INT16_NODE
	INT32_NODE
	INT64_NODE
	FLOAT32_NODE
	FLOAT64_NODE
	BYTES_NODE
	BEGIN_NODE
	END_NODE
	UNKNOWN_NODE
)

func (TNodeType) String

func (nt TNodeType) String() string

Jump to

Keyboard shortcuts

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