persistence

package
v0.0.0-...-f5bf215 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.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 LocalNamedSaver

type LocalNamedSaver struct {
	// contains filtered or unexported fields
}

LocalNamedSaver is a generic saver interface for persisting to/from JSON objects.

func NewLocalNamedSaver

func NewLocalNamedSaver(name string) *LocalNamedSaver

NewLocalNamedSaver creates a new LocalNamedSaver that saves results to the given file name.

func (*LocalNamedSaver) Load

func (ls *LocalNamedSaver) Load(v any) error

Load deserializes previously saved JSON content into the given object.

func (*LocalNamedSaver) Save

func (ls *LocalNamedSaver) Save(v any) error

Save serializes the given object as JSON and saves result.

Jump to

Keyboard shortcuts

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