serializer

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GobSerializer

type GobSerializer struct {
}

func NewGobSerializer

func NewGobSerializer() *GobSerializer

func (*GobSerializer) Deserialize

func (s *GobSerializer) Deserialize(bs []byte, tar any) error

func (*GobSerializer) Serialize

func (s *GobSerializer) Serialize(data any) ([]byte, error)

type JSONSerializer

type JSONSerializer struct {
}

func NewJSONSerializer

func NewJSONSerializer() *JSONSerializer

func (*JSONSerializer) Deserialize

func (s *JSONSerializer) Deserialize(bs []byte, tar any) error

func (*JSONSerializer) Serialize

func (s *JSONSerializer) Serialize(data any) ([]byte, error)

type Serializer

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

Jump to

Keyboard shortcuts

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