Versions in this module Expand all Collapse all v1 v1.0.0 Dec 8, 2024 Changes in this version + var ErrNotAPointer = errors.New("v argument must be a pointer") + func GzipDecode(in []byte) ([]byte, error) + func GzipEncode(in []byte) ([]byte, error) + func Marshal(e Encoding, v interface{}) (data []byte, err error) + func RegisterCodec(codec Codec) + func Unmarshal(e Encoding, data []byte, v interface{}) (err error) + type Codec interface + Marshal func(v interface{}) ([]byte, error) + Name func() string + Unmarshal func(data []byte, v interface{}) error + func GetCodec(contentSubtype string) Codec + type Encoding interface + Marshal func(v interface{}) ([]byte, error) + Unmarshal func(data []byte, v interface{}) error + type GobEncoding struct + func (g GobEncoding) Marshal(v interface{}) ([]byte, error) + func (g GobEncoding) Unmarshal(data []byte, value interface{}) error + type JSONEncoding struct + func (j JSONEncoding) Marshal(v interface{}) ([]byte, error) + func (j JSONEncoding) Unmarshal(data []byte, value interface{}) error + type JSONGzipEncoding struct + func (jz JSONGzipEncoding) Marshal(v interface{}) ([]byte, error) + func (jz JSONGzipEncoding) Unmarshal(data []byte, value interface{}) error + type JSONSnappyEncoding struct + func (s JSONSnappyEncoding) Marshal(v interface{}) (data []byte, err error) + func (s JSONSnappyEncoding) Unmarshal(data []byte, value interface{}) error + type MsgPackEncoding struct + func (mp MsgPackEncoding) Marshal(v interface{}) ([]byte, error) + func (mp MsgPackEncoding) Unmarshal(data []byte, value interface{}) error