Documentation ¶
Index ¶
- type Encoder
- func (e *Encoder) CalcBool(v bool) int
- func (e *Encoder) CalcByte(b byte) int
- func (e *Encoder) CalcComplex128(v complex128) int
- func (e *Encoder) CalcComplex64(v complex64) int
- func (e *Encoder) CalcFloat32(v float32) int
- func (e *Encoder) CalcFloat64(v float64) int
- func (e *Encoder) CalcInt(v int) int
- func (e *Encoder) CalcInt16(v int16) int
- func (e *Encoder) CalcInt32(v int32) int
- func (e *Encoder) CalcInt64(v int64) int
- func (e *Encoder) CalcInt8(v int8) int
- func (e *Encoder) CalcMapLength(l int) (int, error)
- func (e *Encoder) CalcNil() int
- func (e *Encoder) CalcRune(v rune) int
- func (e *Encoder) CalcSliceLength(l int, isChildTypeByte bool) (int, error)
- func (e *Encoder) CalcString(v string) int
- func (e *Encoder) CalcString16(length int) int
- func (e *Encoder) CalcString32(length int) int
- func (e *Encoder) CalcString8(length int) int
- func (e *Encoder) CalcStringFix(length int) int
- func (e *Encoder) CalcStructHeader16(fieldNum int) int
- func (e *Encoder) CalcStructHeader32(fieldNum int) int
- func (e *Encoder) CalcStructHeaderFix(fieldNum int) int
- func (e *Encoder) CalcTime(t time.Time) int
- func (e *Encoder) CalcUint(v uint) int
- func (e *Encoder) CalcUint16(v uint16) int
- func (e *Encoder) CalcUint32(v uint32) int
- func (e *Encoder) CalcUint64(v uint64) int
- func (e *Encoder) CalcUint8(v uint8) int
- func (e *Encoder) EncodedBytes() []byte
- func (e *Encoder) MakeBytes(size int)
- func (e *Encoder) WriteBool(v bool, offset int) int
- func (e *Encoder) WriteByte(b byte, offset int) int
- func (e *Encoder) WriteComplex128(v complex128, offset int) int
- func (e *Encoder) WriteComplex64(v complex64, offset int) int
- func (e *Encoder) WriteFloat32(v float32, offset int) int
- func (e *Encoder) WriteFloat64(v float64, offset int) int
- func (e *Encoder) WriteInt(v int, offset int) int
- func (e *Encoder) WriteInt16(v int16, offset int) int
- func (e *Encoder) WriteInt32(v int32, offset int) int
- func (e *Encoder) WriteInt64(v int64, offset int) int
- func (e *Encoder) WriteInt8(v int8, offset int) int
- func (e *Encoder) WriteMapLength(l int, offset int) int
- func (e *Encoder) WriteNil(offset int) int
- func (e *Encoder) WriteRune(v rune, offset int) int
- func (e *Encoder) WriteSliceLength(l int, offset int, isChildTypeByte bool) int
- func (e *Encoder) WriteString(str string, offset int) int
- func (e *Encoder) WriteString16(str string, length, offset int) int
- func (e *Encoder) WriteString32(str string, length, offset int) int
- func (e *Encoder) WriteString8(str string, length, offset int) int
- func (e *Encoder) WriteStringFix(str string, length, offset int) int
- func (e *Encoder) WriteStructHeader16AsArray(fieldNum, offset int) int
- func (e *Encoder) WriteStructHeader16AsMap(fieldNum, offset int) int
- func (e *Encoder) WriteStructHeader32AsArray(fieldNum, offset int) int
- func (e *Encoder) WriteStructHeader32AsMap(fieldNum, offset int) int
- func (e *Encoder) WriteStructHeaderFixAsArray(fieldNum, offset int) int
- func (e *Encoder) WriteStructHeaderFixAsMap(fieldNum, offset int) int
- func (e *Encoder) WriteTime(t time.Time, offset int) int
- func (e *Encoder) WriteUint(v uint, offset int) int
- func (e *Encoder) WriteUint16(v uint16, offset int) int
- func (e *Encoder) WriteUint32(v uint32, offset int) int
- func (e *Encoder) WriteUint64(v uint64, offset int) int
- func (e *Encoder) WriteUint8(v uint8, offset int) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
A Encoder calculates and writes the required byte size.
func (*Encoder) CalcComplex128 ¶
func (e *Encoder) CalcComplex128(v complex128) int
CalcComplex128 returns data size that need.
func (*Encoder) CalcComplex64 ¶
CalcComplex64 returns data size that need.
func (*Encoder) CalcFloat32 ¶
CalcFloat32 returns data size that need.
func (*Encoder) CalcFloat64 ¶
CalcFloat64 returns data size that need.
func (*Encoder) CalcMapLength ¶
CalcMapLength checks value and returns data size that need.
func (*Encoder) CalcSliceLength ¶
CalcSliceLength checks values and returns data size that need.
func (*Encoder) CalcString ¶
CalcString check value and returns data size that need.
func (*Encoder) CalcString16 ¶
CalcString16 returns data size that need.
func (*Encoder) CalcString32 ¶
CalcString32 returns data size that need.
func (*Encoder) CalcString8 ¶
CalcString8 returns data size that need.
func (*Encoder) CalcStringFix ¶
CalcStringFix returns data size that need.
func (*Encoder) CalcStructHeader16 ¶
CalcStructHeader16 returns data size that need.
func (*Encoder) CalcStructHeader32 ¶
CalcStructHeader32 returns data size that need.
func (*Encoder) CalcStructHeaderFix ¶
CalcStructHeaderFix returns data size that need.
func (*Encoder) CalcUint16 ¶
CalcUint16 check value and returns data size that need.
func (*Encoder) CalcUint32 ¶
CalcUint32 check value and returns data size that need.
func (*Encoder) CalcUint64 ¶
CalcUint64 check value and returns data size that need.
func (*Encoder) EncodedBytes ¶
EncodedBytes gets encoded bytes.
func (*Encoder) WriteComplex128 ¶
func (e *Encoder) WriteComplex128(v complex128, offset int) int
WriteComplex128 sets the contents of v to the buffer.
func (*Encoder) WriteComplex64 ¶
WriteComplex64 sets the contents of v to the buffer.
func (*Encoder) WriteFloat32 ¶
WriteFloat32 sets the contents of v to the buffer.
func (*Encoder) WriteFloat64 ¶
WriteFloat64 sets the contents of v to the buffer.
func (*Encoder) WriteInt16 ¶
WriteInt16 sets the contents of v to the buffer.
func (*Encoder) WriteInt32 ¶
WriteInt32 sets the contents of v to the buffer.
func (*Encoder) WriteInt64 ¶
WriteInt64 sets the contents of v to the buffer.
func (*Encoder) WriteMapLength ¶
WriteMapLength sets the contents of l to the buffer.
func (*Encoder) WriteSliceLength ¶
WriteSliceLength sets the contents of l to the buffer.
func (*Encoder) WriteString ¶
WriteString sets the contents of str to the buffer.
func (*Encoder) WriteString16 ¶
WriteString16 sets the contents of str to the buffer.
func (*Encoder) WriteString32 ¶
WriteString32 sets the contents of str to the buffer.
func (*Encoder) WriteString8 ¶
WriteString8 sets the contents of str to the buffer.
func (*Encoder) WriteStringFix ¶
WriteStringFix sets the contents of str to the buffer.
func (*Encoder) WriteStructHeader16AsArray ¶
WriteStructHeader16AsArray sets num of fields to the buffer as array type.
func (*Encoder) WriteStructHeader16AsMap ¶
WriteStructHeader16AsMap sets num of fields to the buffer as map type.
func (*Encoder) WriteStructHeader32AsArray ¶
WriteStructHeader32AsArray sets num of fields to the buffer as array type.
func (*Encoder) WriteStructHeader32AsMap ¶
WriteStructHeader32AsMap sets num of fields to the buffer as map type.
func (*Encoder) WriteStructHeaderFixAsArray ¶
WriteStructHeaderFixAsArray sets num of fields to the buffer as array type.
func (*Encoder) WriteStructHeaderFixAsMap ¶
WriteStructHeaderFixAsMap sets num of fields to the buffer as map type.
func (*Encoder) WriteUint16 ¶
WriteUint16 sets the contents of v to the buffer.
func (*Encoder) WriteUint32 ¶
WriteUint32 sets the contents of v to the buffer.
func (*Encoder) WriteUint64 ¶
WriteUint64 sets the contents of v to the buffer.