serialize

package
v0.0.0-...-e56df46 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ISerializer

type ISerializer interface {
	Encode(toEncode any) ([]byte, error)
	Decode(byteArr []byte, a any) error
}

type Serializer

type Serializer struct {
	Buf     *bytes.Buffer
	Encoder *gob.Encoder
	Decoder *gob.Decoder
}

func NewSerializer

func NewSerializer() *Serializer

func (*Serializer) Decode

func (s *Serializer) Decode(byteArr []byte, toReturn any) error

func (*Serializer) Encode

func (s *Serializer) Encode(toEncode any) ([]byte, error)

Jump to

Keyboard shortcuts

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