Documentation
¶
Index ¶
- type Buffer
- func (b *Buffer) Bytes() []byte
- func (b *Buffer) DecodeBool() (bool, error)
- func (b *Buffer) DecodeByte() (byte, error)
- func (b *Buffer) DecodeBytes() ([]byte, error)
- func (b *Buffer) DecodeBytesN(n uint16) ([]byte, error)
- func (b *Buffer) DecodeInt16() (int16, error)
- func (b *Buffer) DecodeInt32() (int32, error)
- func (b *Buffer) DecodeInt64() (int64, error)
- func (b *Buffer) DecodeInt8() (int8, error)
- func (b *Buffer) DecodeRune() (rune, error)
- func (b *Buffer) DecodeString() (string, error)
- func (b *Buffer) DecodeStringN(n uint16) (string, error)
- func (b *Buffer) DecodeUint16() (uint16, error)
- func (b *Buffer) DecodeUint32() (uint32, error)
- func (b *Buffer) DecodeUint64() (uint64, error)
- func (b *Buffer) DecodeUint8() (uint8, error)
- func (b *Buffer) EncodeBool(v bool)
- func (b *Buffer) EncodeByte(v byte)
- func (b *Buffer) EncodeBytes(v []byte)
- func (b *Buffer) EncodeBytesN(v []byte, n uint16)
- func (b *Buffer) EncodeFloat32(v float32)
- func (b *Buffer) EncodeFloat64(v float64)
- func (b *Buffer) EncodeInt16(v int16)
- func (b *Buffer) EncodeInt32(v int32)
- func (b *Buffer) EncodeInt64(v int64)
- func (b *Buffer) EncodeInt8(v int8)
- func (b *Buffer) EncodeRawBytes(v []byte)
- func (b *Buffer) EncodeRawString(v string)
- func (b *Buffer) EncodeRune(v rune)
- func (b *Buffer) EncodeString(v string)
- func (b *Buffer) EncodeStringN(v string, n uint16)
- func (b *Buffer) EncodeUint16(v uint16)
- func (b *Buffer) EncodeUint32(u uint32)
- func (b *Buffer) EncodeUint64(v uint64)
- func (b *Buffer) EncodeUint8(v uint8)
- func (b *Buffer) Index() int
- func (b *Buffer) Len() int
- func (b *Buffer) ReadBytes() ([]byte, error)
- func (b *Buffer) ReadInt64() (int64, error)
- func (b *Buffer) ReadString() (string, error)
- func (b *Buffer) ReadUint16() (uint16, error)
- func (b *Buffer) ReadUint32() (uint32, error)
- func (b *Buffer) ReadUint32Bytes() ([]byte, error)
- func (b *Buffer) ReadUint32String() (string, error)
- func (b *Buffer) ReadUint64() (uint64, error)
- func (b *Buffer) ReadUint8() (uint8, error)
- func (b *Buffer) Reset()
- func (b *Buffer) Seek(i int)
- func (b *Buffer) Skip(i int)
- func (b *Buffer) Write(p []byte)
- func (b *Buffer) WriteUint16(u uint16)
- func (b *Buffer) WriteUint16Bytes(p []byte)
- func (b *Buffer) WriteUint16LengthBytes(p []byte)
- func (b *Buffer) WriteUint16String(s string)
- func (b *Buffer) WriteUint32(u uint32)
- func (b *Buffer) WriteUint32At(u uint32, off int64)
- func (b *Buffer) WriteUint32Bytes(p []byte)
- func (b *Buffer) WriteUint32String(s string)
- func (b *Buffer) WriteUint8(u uint8)
- type Decoder
- type Encoder
- type Pool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
func NewBuffer ¶
NewBuffer allocates a new Buffer initialized with buf, where the contents of buf are considered the unread portion of the buffer.
func (*Buffer) DecodeBool ¶
DecodeBool consumes an encoded raw boolean from the buffer.
func (*Buffer) DecodeByte ¶
DecodeByte consumes an encoded raw byte from the buffer.
func (*Buffer) DecodeBytes ¶
DecodeBytes consumes an encoded length-prefixed raw bytes from the buffer.
func (*Buffer) DecodeBytesN ¶
DecodeBytesN consumes an n-limited encoded raw bytes to the buffer.
func (*Buffer) DecodeInt16 ¶
DecodeUint16 consumes an encoded signed 16-bit big-endian integer from the buffer.
func (*Buffer) DecodeInt32 ¶
DecodeInt32 consumes an encoded signed 32-bit big-endian integer from the buffer.
func (*Buffer) DecodeInt64 ¶
DecodeInt64 consumes an encoded signed 64-bit big-endian integer from the buffer.
func (*Buffer) DecodeInt8 ¶
DecodeInt8 consumes an encoded signed 8-bit integer from the buffer.
func (*Buffer) DecodeRune ¶
DecodeRune consumes an encoded rune from the buffer.
func (*Buffer) DecodeString ¶
DecodeString consumes an encoded length-prefixed raw string from the buffer.
func (*Buffer) DecodeStringN ¶
DecodeStringN consumes an n-limited encoded raw string to the buffer.
func (*Buffer) DecodeUint16 ¶
DecodeUint16 consumes an encoded unsigned 16-bit big-endian integer from the buffer.
func (*Buffer) DecodeUint32 ¶
DecodeUint32 consumes an encoded unsigned 32-bit big-endian integer from the buffer.
func (*Buffer) DecodeUint64 ¶
DecodeUint64 consumes an encoded unsigned 64-bit big-endian integer from the buffer.
func (*Buffer) DecodeUint8 ¶
DecodeUint8 consumes an encoded unsigned 8-bit integer from the buffer.
func (*Buffer) EncodeBool ¶
EncodeBool appends a raw boolean to the buffer.
func (*Buffer) EncodeByte ¶
EncodeByte appends a raw byte to the buffer.
func (*Buffer) EncodeBytes ¶
EncodeBytes appends a length-prefixed raw bytes to the buffer.
func (*Buffer) EncodeBytesN ¶
EncodeBytesN appends an n-limited length-prefixed raw bytes to the buffer.
func (*Buffer) EncodeFloat32 ¶
EncodeFloat32 appends a float 32 big-endian integer to the buffer.
func (*Buffer) EncodeFloat64 ¶
EncodeFloat64 appends a float 64 big-endian integer to the buffer.
func (*Buffer) EncodeInt16 ¶
EncodeUint16 appends a signed 16-bit big-endian integer to the buffer.
func (*Buffer) EncodeInt32 ¶
EncodeInt32 appends a signed 32-bit big-endian integer to the buffer.
func (*Buffer) EncodeInt64 ¶
EncodeInt64 appends a signed 64-bit big-endian integer to the buffer.
func (*Buffer) EncodeInt8 ¶
EncodeInt8 appends a signed 8-bit integer to the buffer.
func (*Buffer) EncodeRawBytes ¶
EncodeRawBytes appends a raw bytes to the buffer.
func (*Buffer) EncodeRawString ¶
EncodeRawString appends a raw string to the buffer.
func (*Buffer) EncodeRune ¶
EncodeRune appends a rune to the buffer.
func (*Buffer) EncodeString ¶
EncodeString appends a length-prefixed raw string to the buffer.
func (*Buffer) EncodeStringN ¶
EncodeStringN appends an n-limited length-prefixed raw string to the buffer.
func (*Buffer) EncodeUint16 ¶
EncodeUint16 appends an unsigned 16-bit big-endian integer to the buffer.
func (*Buffer) EncodeUint32 ¶
EncodeUint32 appends an unsigned 32-bit big-endian integer to the buffer.
func (*Buffer) EncodeUint64 ¶
EncodeUint64 appends an unsigned 64-bit big-endian integer to the buffer.
func (*Buffer) EncodeUint8 ¶
EncodeUint8 appends an unsigned 8-bit integer to the buffer.