serializer

package
v0.0.0-...-aeec266 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: BSD-3-Clause 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

DeserializeSlice reads an entity slice of Deserializer 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)

SerializeSlice 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