store

package
v0.0.0-...-31c1c1e Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyConfig

type DummyConfig struct {
	Logger log.Logger
}

type JSONConfig

type JSONConfig struct {
	Dir    string
	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 NewDummyStore

func NewDummyStore(config DummyConfig) Store

func NewJSONStore

func NewJSONStore(config JSONConfig) Store

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