Versions in this module Expand all Collapse all v1 v1.1.0 Apr 1, 2023 v1.0.0 Apr 1, 2023 Changes in this version + type Config struct + func New(storages []Storage) (*Config, error) + func NewOrPanic(storages []Storage) *Config + func (c *Config) Close() + func (c *Config) Get(path string, object interface{}) error + func (c *Config) RegisterCallback(paths []string, callback func(c *Config, modified, added, removed []string)) int + func (c *Config) Reset(path string) error + func (c *Config) Set(path string, object interface{}) error + func (c *Config) UnregisterCallback(id int) + type DummyStorage struct + func (f *DummyStorage) Read() (tree.Node, error) + func (f *DummyStorage) RegisterWatcher(changeChan chan<- struct{}) error + func (f *DummyStorage) Write(t tree.Node) error + type JSONFile struct + func (f *JSONFile) Read() (tree.Node, error) + func (f *JSONFile) RegisterWatcher(changeChan chan<- struct{}) error + func (f *JSONFile) Write(t tree.Node) error + type Storage interface + Read func() (tree.Node, error) + RegisterWatcher func(changeChan chan<- struct{}) error + Write func(t tree.Node) error + func UseDummyStorage(initPath string, initData interface{}) Storage + func UseJSONFile(path string) Storage + func UseYAMLFile(path string) Storage + type YAMLFile struct + func (f *YAMLFile) Read() (tree.Node, error) + func (f *YAMLFile) RegisterWatcher(changeChan chan<- struct{}) error + func (f *YAMLFile) Write(t tree.Node) error