Documentation ¶
Index ¶
- Constants
- func FromInt8(vec []int8) []byte
- type Buffer
- func (b *Buffer) Grow(size int)
- func (b *Buffer) Len() int
- func (b *Buffer) Reset()
- func (b *Buffer) ToBytes() []byte
- func (b *Buffer) WriteBool(data bool, tag byte) error
- func (b *Buffer) WriteBytes(data []byte) error
- func (b *Buffer) WriteFloat32(data float32, tag byte) error
- func (b *Buffer) WriteFloat64(data float64, tag byte) error
- func (b *Buffer) WriteHead(ty byte, tag byte) error
- func (b *Buffer) WriteInt16(data int16, tag byte) error
- func (b *Buffer) WriteInt32(data int32, tag byte) error
- func (b *Buffer) WriteInt64(data int64, tag byte) error
- func (b *Buffer) WriteInt8(data int8, tag byte) error
- func (b *Buffer) WriteSliceInt8(data []int8) error
- func (b *Buffer) WriteSliceUint8(data []uint8) error
- func (b *Buffer) WriteString(data string, tag byte) error
- func (b *Buffer) WriteUint16(data uint16, tag byte) error
- func (b *Buffer) WriteUint32(data uint32, tag byte) error
- func (b *Buffer) WriteUint8(data uint8, tag byte) error
- type Reader
- func (b *Reader) Len() int
- func (b *Reader) Next(n int) []byte
- func (b *Reader) ReadBool(data *bool, tag byte, require bool) error
- func (b *Reader) ReadBytes(data *[]byte, len int32, require bool) error
- func (b *Reader) ReadFloat32(data *float32, tag byte, require bool) error
- func (b *Reader) ReadFloat64(data *float64, tag byte, require bool) error
- func (b *Reader) ReadInt16(data *int16, tag byte, require bool) error
- func (b *Reader) ReadInt32(data *int32, tag byte, require bool) error
- func (b *Reader) ReadInt64(data *int64, tag byte, require bool) error
- func (b *Reader) ReadInt8(data *int8, tag byte, require bool) error
- func (b *Reader) ReadSliceInt8(data *[]int8, len int32, require bool) error
- func (b *Reader) ReadSliceUint8(data *[]uint8, len int32, require bool) error
- func (b *Reader) ReadString(data *string, tag byte, require bool) error
- func (b *Reader) ReadUint16(data *uint16, tag byte, require bool) error
- func (b *Reader) ReadUint32(data *uint32, tag byte, require bool) error
- func (b *Reader) ReadUint8(data *uint8, tag byte, require bool) error
- func (b *Reader) Reset(data []byte)
- func (b *Reader) Skip(n int)
- func (b *Reader) SkipTo(ty, tag byte, require bool) (bool, error)
- func (b *Reader) SkipToNoCheck(tag byte, require bool) (bool, byte, error)
- func (b *Reader) SkipToStructEnd() error
- func (b *Reader) ToBytes() []byte
- func (b *Reader) ToString() string
Constants ¶
const ( BYTE byte = iota SHORT INT LONG FLOAT DOUBLE STRING1 STRING4 MAP LIST StructBegin StructEnd ZeroTag SimpleList )
jce type
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
Buffer is wrapper of bytes.Buffer
func (*Buffer) WriteBytes ¶ added in v1.3.0
WriteBytes write []byte to the buffer
func (*Buffer) WriteFloat32 ¶ added in v1.3.0
WriteFloat32 writes float32 with the tag.
func (*Buffer) WriteFloat64 ¶ added in v1.3.0
WriteFloat64 writes float64 with the tag.
func (*Buffer) WriteInt16 ¶ added in v1.3.0
WriteInt16 write the int16 with the tag.
func (*Buffer) WriteInt32 ¶ added in v1.3.0
WriteInt32 write int32 with the tag.
func (*Buffer) WriteInt64 ¶ added in v1.3.0
WriteInt64 write int64 with the tag.
func (*Buffer) WriteSliceInt8 ¶ added in v1.3.0
WriteSliceInt8 write []int8 to the buffer.
func (*Buffer) WriteSliceUint8 ¶ added in v1.3.0
WriteSliceUint8 write []uint8 to the buffer.
func (*Buffer) WriteString ¶ added in v1.3.0
WriteString writes string data with the tag.
func (*Buffer) WriteUint16 ¶ added in v1.3.0
WriteUint16 write uint16 with the tag.
func (*Buffer) WriteUint32 ¶ added in v1.3.0
WriteUint32 write uint32 data with the tag.
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader is wrapper of bytes.Reader
func (*Reader) ReadBool ¶ added in v1.3.0
ReadBool reads the bool value for the tag and the require or optional sign.
func (*Reader) ReadBytes ¶ added in v1.3.0
ReadBytes reads []byte for the given length and the require or optional sign.
func (*Reader) ReadFloat32 ¶ added in v1.3.0
ReadFloat32 reads the float32 value for the tag and the require or optional sign.
func (*Reader) ReadFloat64 ¶ added in v1.3.0
ReadFloat64 reads the float64 value for the tag and the require or optional sign.
func (*Reader) ReadInt16 ¶ added in v1.3.0
ReadInt16 reads the int16 value for the tag and the require or optional sign.
func (*Reader) ReadInt32 ¶ added in v1.3.0
ReadInt32 reads the int32 value for the tag and the require or optional sign.
func (*Reader) ReadInt64 ¶ added in v1.3.0
ReadInt64 reads the int64 value for the tag and the require or optional sign.
func (*Reader) ReadInt8 ¶ added in v1.3.0
ReadInt8 reads the int8 data for the tag and the require or optional sign.
func (*Reader) ReadSliceInt8 ¶ added in v1.3.0
ReadSliceInt8 reads []int8 for the given length and the require or optional sign.
func (*Reader) ReadSliceUint8 ¶ added in v1.3.0
ReadSliceUint8 reads []uint8 force the given length and the require or optional sign.
func (*Reader) ReadString ¶ added in v1.3.0
ReadString reads the string value for the tag and the require or optional sign.
func (*Reader) ReadUint16 ¶ added in v1.3.0
ReadUint16 reads the uint16 value for the tag and the require or optional sign.
func (*Reader) ReadUint32 ¶ added in v1.3.0
ReadUint32 reads the uint32 value for the tag and the require or optional sign.
func (*Reader) ReadUint8 ¶ added in v1.3.0
ReadUint8 reads the uint8 for the tag and the require or optional sign.
func (*Reader) SkipToNoCheck ¶
SkipToNoCheck for skip to the none StructEnd tag.
func (*Reader) SkipToStructEnd ¶
SkipToStructEnd for skip to the StructEnd tag.