Documentation ¶
Index ¶
- type TMDecoder
- type TMDecoderPure
- func (e TMDecoderPure) DecodeBool(inp []byte) (b bool, bytesRead int, err error)
- func (e TMDecoderPure) DecodeFloat32(inp []byte) (f float32, bytesRead int, err error)
- func (e TMDecoderPure) DecodeFloat64(inp []byte) (f float64, bytesRead int, err error)
- func (e TMDecoderPure) DecodeInt16(inp []byte) (i int16, bytesRead int, err error)
- func (e TMDecoderPure) DecodeInt32(inp []byte) (i int32, bytesRead int, err error)
- func (e TMDecoderPure) DecodeInt64(inp []byte) (i int64, bytesRead int, err error)
- func (e TMDecoderPure) DecodeInt8(inp []byte) (i int8, bytesRead int, err error)
- func (e TMDecoderPure) DecodeOctet(inp []byte) (b byte, bytesRead int, err error)
- func (e TMDecoderPure) DecodeOctets(inp []byte) (b []byte, bytesRead int, err error)
- func (e TMDecoderPure) DecodeTime(inp []byte) (t time.Time, bytesRead int, err error)
- func (e TMDecoderPure) DecodeUint16(inp []byte) (i uint16, bytesRead int, err error)
- func (e TMDecoderPure) DecodeUint16s(inp []byte) (iz []uint16, bytesRead int, err error)
- func (e TMDecoderPure) DecodeUint32(inp []byte) (i uint32, bytesRead int, err error)
- func (e TMDecoderPure) DecodeUint64(inp []byte) (i uint64, bytesRead int, err error)
- func (e TMDecoderPure) DecodeUint8(inp []byte) (i uint8, bytesRead int, err error)
- func (e TMDecoderPure) DecodeUvarint(inp []byte) (i uint, bytesRead int, err error)
- func (e TMDecoderPure) DecodeVarint(inp []byte) (i int, bytesRead int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TMDecoder ¶
type TMDecoder interface { DecodeBool([]byte) (b bool, bytesRead int, err error) DecodeFloat32([]byte) (f float32, bytesRead int, err error) DecodeFloat64([]byte) (f float64, bytesRead int, err error) DecodeInt8([]byte) (i int8, bytesRead int, err error) DecodeInt16([]byte) (i int16, bytesRead int, err error) DecodeInt32([]byte) (i int32, bytesRead int, err error) DecodeInt64([]byte) (i int64, bytesRead int, err error) DecodeOctet([]byte) (b byte, bytesRead int, err error) DecodeOctets([]byte) (b []byte, bytesRead int, err error) DecodeTime([]byte) (t time.Time, bytesRead int, err error) DecodeUint8([]byte) (i uint8, bytesRead int, err error) DecodeUint16([]byte) (i uint16, bytesRead int, err error) DecodeUint16s([]byte) (iz []uint16, bytesRead int, err error) DecodeUint32([]byte) (i uint32, bytesRead int, err error) DecodeUint64([]byte) (i uint64, bytesRead int, err error) DecodeUvarint([]byte) (i uint, bytesRead int, err error) DecodeVarint([]byte) (i int, bytesRead int, err error) }
Simplest pure interface for decoding and generally preferred. return >0 bytesRead to indicate successful parse of one item. return bytesRead = 0 to indicate not enough bytes read to parse yet. return bytesRead = -1 to indicate enough bytes read to know of parse error. if err is not nil, then bytesRead = -1 if bytesRead is not -1, then err is nil if bytesRead is <= 0, the first return part uses the default constructor
type TMDecoderPure ¶
type TMDecoderPure struct { }
Implementation of the TMDecoder interface.
func (TMDecoderPure) DecodeBool ¶
func (e TMDecoderPure) DecodeBool(inp []byte) (b bool, bytesRead int, err error)
func (TMDecoderPure) DecodeFloat32 ¶
func (e TMDecoderPure) DecodeFloat32(inp []byte) (f float32, bytesRead int, err error)
func (TMDecoderPure) DecodeFloat64 ¶
func (e TMDecoderPure) DecodeFloat64(inp []byte) (f float64, bytesRead int, err error)
func (TMDecoderPure) DecodeInt16 ¶
func (e TMDecoderPure) DecodeInt16(inp []byte) (i int16, bytesRead int, err error)
func (TMDecoderPure) DecodeInt32 ¶
func (e TMDecoderPure) DecodeInt32(inp []byte) (i int32, bytesRead int, err error)
func (TMDecoderPure) DecodeInt64 ¶
func (e TMDecoderPure) DecodeInt64(inp []byte) (i int64, bytesRead int, err error)
func (TMDecoderPure) DecodeInt8 ¶
func (e TMDecoderPure) DecodeInt8(inp []byte) (i int8, bytesRead int, err error)
func (TMDecoderPure) DecodeOctet ¶
func (e TMDecoderPure) DecodeOctet(inp []byte) (b byte, bytesRead int, err error)
func (TMDecoderPure) DecodeOctets ¶
func (e TMDecoderPure) DecodeOctets(inp []byte) (b []byte, bytesRead int, err error)
func (TMDecoderPure) DecodeTime ¶
func (TMDecoderPure) DecodeUint16 ¶
func (e TMDecoderPure) DecodeUint16(inp []byte) (i uint16, bytesRead int, err error)
func (TMDecoderPure) DecodeUint16s ¶
func (e TMDecoderPure) DecodeUint16s(inp []byte) (iz []uint16, bytesRead int, err error)
func (TMDecoderPure) DecodeUint32 ¶
func (e TMDecoderPure) DecodeUint32(inp []byte) (i uint32, bytesRead int, err error)
func (TMDecoderPure) DecodeUint64 ¶
func (e TMDecoderPure) DecodeUint64(inp []byte) (i uint64, bytesRead int, err error)
func (TMDecoderPure) DecodeUint8 ¶
func (e TMDecoderPure) DecodeUint8(inp []byte) (i uint8, bytesRead int, err error)
func (TMDecoderPure) DecodeUvarint ¶
func (e TMDecoderPure) DecodeUvarint(inp []byte) (i uint, bytesRead int, err error)
func (TMDecoderPure) DecodeVarint ¶
func (e TMDecoderPure) DecodeVarint(inp []byte) (i int, bytesRead int, err error)
Click to show internal directories.
Click to hide internal directories.