Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GobSerializer ¶
type GobSerializer struct{}
GobSerializer - gob based serializer
func (*GobSerializer) Decode ¶
func (s *GobSerializer) Decode(data []byte, target interface{}) error
Decode - decodes given bytes into target struct
func (*GobSerializer) Encode ¶
func (s *GobSerializer) Encode(source interface{}) ([]byte, error)
Encode - encodes source into bytes using Gob encoder
type JSONSerializer ¶
type JSONSerializer struct{}
JSONSerializer - JSON based serializer
func (*JSONSerializer) Decode ¶
func (s *JSONSerializer) Decode(data []byte, target interface{}) error
Decode - decodes given bytes into target struct
func (*JSONSerializer) Encode ¶
func (s *JSONSerializer) Encode(source interface{}) ([]byte, error)
Encode - encodes source into bytes using JSON encoder
type Serializer ¶
type Serializer interface { Encode(source interface{}) ([]byte, error) Decode(data []byte, target interface{}) error }
Serializer - generic serializer interface
func DefaultSerializer ¶
func DefaultSerializer() Serializer
DefaultSerializer - returns default serializer
Click to show internal directories.
Click to hide internal directories.