Documentation
¶
Index ¶
- func Compress(data []byte) ([]byte, error)
- func Decompress(data []byte) ([]byte, error)
- func GetBytes(ndata []byte) ([]byte, error)
- func GetValue(value reflect.Value) reflect.Value
- type Serializer
- func (s *Serializer) CheckTag(dataType reflect.Type, field reflect.Value, i int) bool
- func (s *Serializer) Deserialize(data []byte, out interface{}) error
- func (s *Serializer) Serialize(data interface{}) ([]byte, error)
- func (s *Serializer) SetCompress(compress bool) *Serializer
- func (s *Serializer) SetData(data []byte) *Serializer
- func (s *Serializer) WriteField(field reflect.Value, kind reflect.Kind) error
- func (s *Serializer) WriteStruct(value reflect.Value, dataType reflect.Type) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decompress ¶
Types ¶
type Serializer ¶
type Serializer struct {
// contains filtered or unexported fields
}
Serializer is a struct that can serialize and deserialize data
func (*Serializer) Deserialize ¶
func (s *Serializer) Deserialize(data []byte, out interface{}) error
Deserialize deserializes the given data
func (*Serializer) Serialize ¶
func (s *Serializer) Serialize(data interface{}) ([]byte, error)
Serialize serializes the given data
func (*Serializer) SetCompress ¶
func (s *Serializer) SetCompress(compress bool) *Serializer
func (*Serializer) SetData ¶
func (s *Serializer) SetData(data []byte) *Serializer
func (*Serializer) WriteField ¶
func (*Serializer) WriteStruct ¶
Click to show internal directories.
Click to hide internal directories.