storage

package
v1.0.0-beta.34 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PackageConfig configType = "package"
	EngineConfig  configType = "engine"
	UserConfig    configType = "user"
)

config types

Variables

View Source
var ErrorNotFound = fmt.Errorf("not found")

Functions

This section is empty.

Types

type Cache

type Cache interface {
	SetActiveEngine(engine string) error
	GetActiveEngine() (string, error)
	GetMachineInfo() (*types.HwInfo, error)
}

func NewCache

func NewCache() Cache

func NewMockCache

func NewMockCache() Cache

type Config

type Config interface {
	Set(key, value string, confType configType) error
	SetDocument(key string, value any, confType configType) error
	Get(key string) (map[string]any, error)
	GetAll() (map[string]any, error)
	Unset(key string, confType configType) error
}

func NewConfig

func NewConfig() Config

type SnapctlStorage

type SnapctlStorage struct{}

func NewSnapctlStorage

func NewSnapctlStorage() *SnapctlStorage

func (*SnapctlStorage) Get

func (s *SnapctlStorage) Get(key string) (map[string]any, error)

func (*SnapctlStorage) Set

func (s *SnapctlStorage) Set(key, value string) error

func (*SnapctlStorage) SetDocument

func (s *SnapctlStorage) SetDocument(key string, value any) error

func (*SnapctlStorage) Unset

func (s *SnapctlStorage) Unset(key string) error

Jump to

Keyboard shortcuts

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