Documentation ¶
Index ¶
- Constants
- func IsStructParsed(src reflect.Type, parsed *map[string]bool) (bool, *map[string]bool)
- type ArrayHeader
- type Cbool
- type Cdouble
- type Cint
- type Cunsigned
- type Decoder
- type Encoder
- type Logger
- type PStringHeader
- type Serializer
- func (s *Serializer) Append(s2 Serializer)
- func (s *Serializer) Bytes() []byte
- func (s *Serializer) Close()
- func (s *Serializer) Eof() bool
- func (s *Serializer) GetBytes() (v []byte)
- func (s *Serializer) GetDouble() (v float64)
- func (s *Serializer) GetUInt16() (v uint16)
- func (s *Serializer) GetUInt32() (v uint32)
- func (s *Serializer) GetUInt64() (v uint64)
- func (s *Serializer) GetVBytes() (v []byte)
- func (s *Serializer) GetVString() (v string)
- func (s *Serializer) GetVarInt() int64
- func (s *Serializer) GetVarUInt() uint64
- func (s *Serializer) Pos() int
- func (s *Serializer) PutDouble(v float64) *Serializer
- func (s *Serializer) PutUInt16(v uint16) *Serializer
- func (s *Serializer) PutUInt32(v uint32) *Serializer
- func (s *Serializer) PutVBytes(v []byte) *Serializer
- func (s *Serializer) PutVString(v string) *Serializer
- func (s *Serializer) PutVarCUInt(v int) *Serializer
- func (s *Serializer) PutVarInt(v int64)
- func (s *Serializer) PutVarUInt(v uint64) *Serializer
- func (s *Serializer) Truncate(pos int)
- func (s *Serializer) TruncateStart(pos int)
- func (s *Serializer) Write(v []byte) (n int, err error)
- func (s *Serializer) WriteString(vx string) *Serializer
- type State
- type StateData
- type Validator
Constants ¶
View Source
const ( TAG_VARINT = 0 TAG_DOUBLE = 1 TAG_STRING = 2 TAG_BOOL = 3 TAG_NULL = 4 TAG_ARRAY = 5 TAG_OBJECT = 6 TAG_END = 7 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArrayHeader ¶ added in v1.9.2
type ArrayHeader struct {
// contains filtered or unexported fields
}
type Cdouble ¶ added in v1.9.2
type Cdouble float64
to avoid gcc toolchain requirement types from C. Danger expectation about go struct packing is like C struct packing
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
func (*Encoder) Encode ¶
func (enc *Encoder) Encode(src interface{}, wrser *Serializer) (stateToken int, err error)
func (*Encoder) EncodeRaw ¶ added in v1.5.0
func (enc *Encoder) EncodeRaw(src interface{}, wrser *Serializer) error
type PStringHeader ¶ added in v1.9.2
type PStringHeader struct {
// contains filtered or unexported fields
}
type Serializer ¶
type Serializer struct {
// contains filtered or unexported fields
}
func NewPoolSerializer ¶
func NewPoolSerializer() *Serializer
func NewSerializer ¶
func NewSerializer(buf []byte) Serializer
func (*Serializer) Append ¶
func (s *Serializer) Append(s2 Serializer)
func (*Serializer) Bytes ¶
func (s *Serializer) Bytes() []byte
func (*Serializer) Close ¶
func (s *Serializer) Close()
func (*Serializer) Eof ¶
func (s *Serializer) Eof() bool
func (*Serializer) GetBytes ¶
func (s *Serializer) GetBytes() (v []byte)
func (*Serializer) GetDouble ¶
func (s *Serializer) GetDouble() (v float64)
func (*Serializer) GetUInt16 ¶ added in v1.10.0
func (s *Serializer) GetUInt16() (v uint16)
func (*Serializer) GetUInt32 ¶
func (s *Serializer) GetUInt32() (v uint32)
func (*Serializer) GetUInt64 ¶
func (s *Serializer) GetUInt64() (v uint64)
func (*Serializer) GetVBytes ¶
func (s *Serializer) GetVBytes() (v []byte)
func (*Serializer) GetVString ¶
func (s *Serializer) GetVString() (v string)
func (*Serializer) GetVarInt ¶
func (s *Serializer) GetVarInt() int64
func (*Serializer) GetVarUInt ¶
func (s *Serializer) GetVarUInt() uint64
func (*Serializer) Pos ¶
func (s *Serializer) Pos() int
func (*Serializer) PutDouble ¶
func (s *Serializer) PutDouble(v float64) *Serializer
func (*Serializer) PutUInt16 ¶ added in v1.10.0
func (s *Serializer) PutUInt16(v uint16) *Serializer
func (*Serializer) PutUInt32 ¶
func (s *Serializer) PutUInt32(v uint32) *Serializer
func (*Serializer) PutVBytes ¶
func (s *Serializer) PutVBytes(v []byte) *Serializer
func (*Serializer) PutVString ¶
func (s *Serializer) PutVString(v string) *Serializer
func (*Serializer) PutVarCUInt ¶
func (s *Serializer) PutVarCUInt(v int) *Serializer
func (*Serializer) PutVarInt ¶
func (s *Serializer) PutVarInt(v int64)
func (*Serializer) PutVarUInt ¶
func (s *Serializer) PutVarUInt(v uint64) *Serializer
func (*Serializer) Truncate ¶ added in v1.5.0
func (s *Serializer) Truncate(pos int)
func (*Serializer) TruncateStart ¶ added in v1.10.0
func (s *Serializer) TruncateStart(pos int)
func (*Serializer) WriteString ¶
func (s *Serializer) WriteString(vx string) *Serializer
type State ¶
type State struct { *StateData // contains filtered or unexported fields }
func (*State) NewDecoder ¶
func (*State) NewEncoder ¶
func (*State) ReadPayloadType ¶
func (state *State) ReadPayloadType(s *Serializer) State
Click to show internal directories.
Click to hide internal directories.