serialization

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoProtobufPayload     = errors.New("payload is not protobuf serializable")
	ErrNoProtobufDestination = errors.New("destination is not protobuf deserializable")
)

Functions

This section is empty.

Types

type JSON

type JSON struct{}

func NewJSONSerializer

func NewJSONSerializer() *JSON

func (*JSON) Deserialize

func (p *JSON) Deserialize(input []byte, dst interface{}) error

func (*JSON) Serialize

func (p *JSON) Serialize(input interface{}) ([]byte, error)

type ProtoJSON

type ProtoJSON struct{}

func NewProtoJSONSerializer

func NewProtoJSONSerializer() *ProtoJSON

func (*ProtoJSON) Deserialize

func (p *ProtoJSON) Deserialize(input []byte, dst interface{}) error

func (*ProtoJSON) Serialize

func (p *ProtoJSON) Serialize(input interface{}) ([]byte, error)

type Protobuf

type Protobuf struct{}

func NewProtobufSerializer

func NewProtobufSerializer() *Protobuf

func (*Protobuf) Deserialize

func (p *Protobuf) Deserialize(input []byte, dst interface{}) error

func (*Protobuf) Serialize

func (p *Protobuf) Serialize(input interface{}) ([]byte, error)

type Serializer

type Serializer interface {
	Serialize(input interface{}) ([]byte, error)
	Deserialize(input []byte, dst interface{}) error
}

Jump to

Keyboard shortcuts

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