store

package
v16.12.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONConfig

type JSONConfig struct {
	Filesystem fs.Filesystem
	Filepath   string // Full path to the database file
	Logger     log.Logger
}

type Store

type Store interface {
	// Load data from the store
	Load() (StoreData, error)

	// Save data to the store
	Store(data StoreData) error
}

func NewJSON added in v16.12.0

func NewJSON(config JSONConfig) (Store, error)

type StoreData

type StoreData struct {
	Version uint64 `json:"version"`

	Process  map[string]*app.Process `json:"process"`
	Metadata struct {
		System  map[string]interface{}            `json:"system"`
		Process map[string]map[string]interface{} `json:"process"`
	} `json:"metadata"`
}

func NewStoreData

func NewStoreData() StoreData

func (*StoreData) IsEmpty

func (c *StoreData) IsEmpty() bool

Jump to

Keyboard shortcuts

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