codec

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 26, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HashicorpMsgpackCodec

type HashicorpMsgpackCodec struct {
	// contains filtered or unexported fields
}

func NewHashicorpMsgpackCodec

func NewHashicorpMsgpackCodec() *HashicorpMsgpackCodec

func (*HashicorpMsgpackCodec) Marshal

func (mp *HashicorpMsgpackCodec) Marshal(v interface{}) ([]byte, error)

func (*HashicorpMsgpackCodec) Name added in v0.8.0

func (mp *HashicorpMsgpackCodec) Name() string

func (*HashicorpMsgpackCodec) Unmarshal

func (mp *HashicorpMsgpackCodec) Unmarshal(data []byte, v interface{}) error

type JsonCodec

type JsonCodec struct{}

func NewJsonCodec

func NewJsonCodec() *JsonCodec

func (*JsonCodec) Marshal

func (mp *JsonCodec) Marshal(v interface{}) ([]byte, error)

func (*JsonCodec) Name added in v0.8.0

func (mp *JsonCodec) Name() string

func (*JsonCodec) Unmarshal

func (mp *JsonCodec) Unmarshal(data []byte, v interface{}) error

type Serializer

type Serializer interface {
	Name() string
	Marshal(v interface{}) ([]byte, error)
	Unmarshal(data []byte, v interface{}) error
}

Interface for decoupling the message serialization and deserialization

type ShamatonMsgpackCodec

type ShamatonMsgpackCodec struct{}

func NewShamatonMsgpackCodec

func NewShamatonMsgpackCodec() *ShamatonMsgpackCodec

func (*ShamatonMsgpackCodec) Marshal

func (mp *ShamatonMsgpackCodec) Marshal(v interface{}) ([]byte, error)

func (*ShamatonMsgpackCodec) Name added in v0.8.0

func (mp *ShamatonMsgpackCodec) Name() string

func (*ShamatonMsgpackCodec) Unmarshal

func (mp *ShamatonMsgpackCodec) Unmarshal(data []byte, v interface{}) error

type VmihailencoMsgpackCodec

type VmihailencoMsgpackCodec struct{}

func NewVmihailencoMsgpackCodec

func NewVmihailencoMsgpackCodec() *VmihailencoMsgpackCodec

func (*VmihailencoMsgpackCodec) Marshal

func (mp *VmihailencoMsgpackCodec) Marshal(v interface{}) ([]byte, error)

func (*VmihailencoMsgpackCodec) Name added in v0.8.0

func (mp *VmihailencoMsgpackCodec) Name() string

func (*VmihailencoMsgpackCodec) Unmarshal

func (mp *VmihailencoMsgpackCodec) Unmarshal(data []byte, v interface{}) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL