gob

package
v0.2.1-alpha Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidCurve = errors.New("trying to deserialize an object serialized with another curve")
)

Functions

func Deserialize

func Deserialize(f io.Reader, into interface{}, expectedCurveID gurvy.ID) error

Deserialize f into object into uses gob + gzip

func PeekCurveID

func PeekCurveID(file string) (gurvy.ID, error)

PeekCurveID reads the first bytes of the file and tries to decode and return the curveID

func Read

func Read(path string, into interface{}, expectedCurveID gurvy.ID) error

Read read and deserialize input into object provided interface must be a pointer uses gob + gzip

func Serialize

func Serialize(f io.Writer, from interface{}, curveID gurvy.ID) error

Serialize object from into f uses gob + gzip

func Write

func Write(path string, from interface{}, curveID gurvy.ID) error

Write serialize object into file uses gob + gzip

Types

This section is empty.

Jump to

Keyboard shortcuts

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