Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CBORSerializer ¶
type CBORSerializer struct { EncMode cbor.EncMode DecMode cbor.DecMode }
func (*CBORSerializer) Deserialize ¶
func (c *CBORSerializer) Deserialize(b []byte, i interface{}) error
func (*CBORSerializer) Serialize ¶
func (c *CBORSerializer) Serialize(i interface{}) ([]byte, error)
func (*CBORSerializer) SerializeFuncWithBuffer ¶
type JsonSerializer ¶
type JsonSerializer struct { }
func (*JsonSerializer) Deserialize ¶
func (s *JsonSerializer) Deserialize(b []byte, i interface{}) error
func (*JsonSerializer) Serialize ¶
func (s *JsonSerializer) Serialize(i interface{}) ([]byte, error)
type MsgpackGenSerializer ¶
func (*MsgpackGenSerializer) Deserialize ¶
func (m *MsgpackGenSerializer) Deserialize(b []byte, i interface{}) error
func (*MsgpackGenSerializer) Serialize ¶
func (m *MsgpackGenSerializer) Serialize(i interface{}) ([]byte, error)
func (*MsgpackGenSerializer) SerializerWithCloseable ¶
func (m *MsgpackGenSerializer) SerializerWithCloseable(i interface{}) ([]byte, func(), error)
type MsgpackSerializer ¶
type MsgpackSerializer struct { Encoder utils.SyncPool[*msgpack.Encoder] Decoder utils.SyncPool[*msgpack.Decoder] Buffer utils.SyncPool[bytes.Buffer] }
func (*MsgpackSerializer) Deserialize ¶
func (m *MsgpackSerializer) Deserialize(b []byte, i interface{}) error
func (*MsgpackSerializer) Serialize ¶
func (m *MsgpackSerializer) Serialize(i interface{}) ([]byte, error)
func (*MsgpackSerializer) SerializerWithCloseable ¶
func (m *MsgpackSerializer) SerializerWithCloseable(i interface{}) ([]byte, func(), error)
type ProtobufMarshaler ¶ added in v0.1.44
type ProtobufMarshaler interface {
Marshal(m ProtobufMessageV1) ([]byte, error)
}
type ProtobufMessageV1 ¶ added in v0.1.44
type ProtobufMessageV1 interface { Reset() String() string ProtoMessage() }
type ProtobufSerializer ¶ added in v0.1.44
type ProtobufSerializer struct { Encoder ProtobufMarshaler Decoder ProtobufUnmarshaler }
ProtobufSerializer with support for vtproto (code-gen'd) protobuf, and standard protobuf (github.com/golang/protobuf/proto).
To use standard protobuf, set the Encoder and Decoder to proto.Marshal and proto.Unmarshal respectively. You can leave them unset if you use vtproto.
func (*ProtobufSerializer) Deserialize ¶ added in v0.1.44
func (s *ProtobufSerializer) Deserialize(b []byte, i interface{}) error
func (*ProtobufSerializer) Serialize ¶ added in v0.1.44
func (s *ProtobufSerializer) Serialize(i interface{}) ([]byte, error)
type ProtobufUnmarshaler ¶ added in v0.1.44
type ProtobufUnmarshaler interface {
Unmarshal(b []byte, m ProtobufMessageV1) error
}
type ProtobufVTMmarshaler ¶ added in v0.1.44
type ProtobufVTUnmarshaler ¶ added in v0.1.44
Click to show internal directories.
Click to hide internal directories.