store

package
v3.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoadError

type LoadError struct {
	Err error
}

LoadError wraps errors yielded by Store.Load and Store.LoadFrom methods

func (LoadError) Error

func (e LoadError) Error() string

Error implements error interface

func (LoadError) Unwrap

func (e LoadError) Unwrap() error

Unwrap implements Wrapper interface

type SaveError

type SaveError struct {
	Err error
}

SaveError wraps errors yielded by Store.Save and Store.SaveTo methods

func (SaveError) Error

func (e SaveError) Error() string

Error implements error interface

func (SaveError) Unwrap

func (e SaveError) Unwrap() error

Unwrap implements Wrapper interface

type Store

type Store interface {
	// New creates a new config.Config to store
	New(config.Version) error
	// Load retrieves the config.Config from the persistence backend
	Load() error
	// LoadFrom retrieves the config.Config from the persistence backend at the specified key
	LoadFrom(string) error
	// Save stores the config.Config into the persistence backend
	Save() error
	// SaveTo stores the config.Config into the persistence backend at the specified key
	SaveTo(string) error

	// Config returns the stored config.Config
	Config() config.Config
}

Store represents a persistence backend for config.Config

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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