serializer

package
v0.0.0-...-854a178 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NotImplementProtoMessageError = errors.New("param does not implement proto.Message")

Functions

This section is empty.

Types

type GobSerializer

type GobSerializer struct {
}

func (GobSerializer) Deserialize

func (gs GobSerializer) Deserialize(data []byte, obj any) error

func (GobSerializer) Serialize

func (gs GobSerializer) Serialize(obj any) ([]byte, error)

type ProtoSerializer

type ProtoSerializer struct {
}

func (ProtoSerializer) Deserialize

func (serializer ProtoSerializer) Deserialize(data []byte, obj any) error

func (ProtoSerializer) Serialize

func (serializer ProtoSerializer) Serialize(obj any) ([]byte, error)

type Serializer

type Serializer interface {
	Serialize(obj any) ([]byte, error)
	Deserialize(data []byte, obj any) error
}

Jump to

Keyboard shortcuts

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