serializer

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deserialize

func Deserialize(b []byte, deserializer Deserializer) error

Deserialize reads an entity from its bytes representation.

func DeserializeSlice

func DeserializeSlice(b []byte, slice interface{}) error

Deserialize reads an entity slice of Deserilizer elements from its bytes representation.

func Serialize

func Serialize(serializer Serializer) ([]byte, error)

Serialize converts a serializable entity into its bytes representation.

func SerializeSlice

func SerializeSlice(slice interface{}) ([]byte, error)

Serialize converts an slice of Serializer elements into its bytes representation.

Types

type Deserializer

type Deserializer interface {
	FromBytes(buf *bytes.Buffer) error
}

Deserializer represents a Gob deserializable entity.

type Serializer

type Serializer interface {
	ToBytes(buf *bytes.Buffer) error
}

Serializer represents a Gob serializable entity.

Jump to

Keyboard shortcuts

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