Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrMarshallingProto = errors.New("can not serialize the object")
ErrMarshallingProto is raised when the object does not implement proto.Message
var ErrUnmarshallingProto = errors.New("obj does not implement proto.Message")
ErrUnmarshallingProto is raised when the object that needs to be unmarshaled does not implement proto.Message
Functions ¶
This section is empty.
Types ¶
type GogoProtoMarshalizer ¶
type GogoProtoMarshalizer struct { }
GogoProtoMarshalizer implements marshaling with protobuf
func (*GogoProtoMarshalizer) IsInterfaceNil ¶
func (gpm *GogoProtoMarshalizer) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*GogoProtoMarshalizer) Marshal ¶
func (gpm *GogoProtoMarshalizer) Marshal(obj interface{}) ([]byte, error)
Marshal does the actual serialization of an object The object to be serialized must implement the gogoProtoObj interface
func (*GogoProtoMarshalizer) Unmarshal ¶
func (gpm *GogoProtoMarshalizer) Unmarshal(obj interface{}, buff []byte) error
Unmarshal does the actual deserialization of an object The object to be deserialized must implement the gogoProtoObj interface
type GogoProtoObj ¶
GogoProtoObj groups the necessary of a gogo protobuf marshalizeble object
type JSONMarshalizer ¶
type JSONMarshalizer struct { }
JSONMarshalizer -
func (*JSONMarshalizer) IsInterfaceNil ¶
func (marshalizer *JSONMarshalizer) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*JSONMarshalizer) Marshal ¶
func (marshalizer *JSONMarshalizer) Marshal(obj interface{}) ([]byte, error)
Marshal does the actual serialization of an object
func (*JSONMarshalizer) Unmarshal ¶
func (marshalizer *JSONMarshalizer) Unmarshal(obj interface{}, buff []byte) error
Unmarshal does the actual deserialization of an object