Documentation ¶
Index ¶
Constants ¶
View Source
const ( MarshallerTypeJSON = "json" MarshallerTypeJSONNum = 1 MarshallerTypeProtoBuf = "protobuf" MarshallerTypeProtoBufNum = 2 MarshallerTypeProtoBufComp = "protobufcomp" MarshallerTypeProtoBufCompNum = 3 )
View Source
const ( ProtoCompressLengthLimit = 512 ProtoCompressFlagZstd = byte(1)<<6 | 7 // 01000111 )
Variables ¶
View Source
var ( ErrCanNotMarshalAsProtobufMsg = errors.New("ERR_CAN_NOT_MARSHAL_AS_PROTOBUF_MSG") ErrCanNotUnmarshalAsProtobufMsg = errors.New("ERR_CAN_NOT_UNMARSHAL_AS_PROTOBUF_MSG") ErrCompressFailed = errors.New("ERR_COMPRESS_FAILED") ErrDecompressFailed = errors.New("ERR_DECOMPRESS_FAILED") ErrMarshalFailed = errors.New("ERR_DB_MARSHAL_FAILED") ErrUnmarshalFailed = errors.New("ERR_DB_UNMARSHAL_FAILED") )
Functions ¶
This section is empty.
Types ¶
type JsonMarshaller ¶
type JsonMarshaller struct{}
func (*JsonMarshaller) Marshal ¶
func (jm *JsonMarshaller) Marshal(v interface{}) ([]byte, error)
func (*JsonMarshaller) Unmarshal ¶
func (jm *JsonMarshaller) Unmarshal(data []byte, v interface{}) error
type Marshaller ¶
type ProtoCompressMarshaller ¶
type ProtoCompressMarshaller struct{}
func (*ProtoCompressMarshaller) Marshal ¶
func (pcm *ProtoCompressMarshaller) Marshal(v interface{}) ([]byte, error)
func (*ProtoCompressMarshaller) Unmarshal ¶
func (pcm *ProtoCompressMarshaller) Unmarshal(data []byte, v interface{}) error
type ProtoMarshaller ¶
type ProtoMarshaller struct{}
func (*ProtoMarshaller) Marshal ¶
func (pm *ProtoMarshaller) Marshal(v interface{}) ([]byte, error)
func (*ProtoMarshaller) Unmarshal ¶
func (pm *ProtoMarshaller) Unmarshal(data []byte, v interface{}) error
Click to show internal directories.
Click to hide internal directories.