save

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigurationMapper

type ConfigurationMapper interface {
	ToMap() map[string]interface{}
}

ConfigurationMapper interface is an interface to map a configuration

type ConfigurationSaver

type ConfigurationSaver interface {
	Save(w ConfigurationWriter, fs afero.Fs, config ConfigurationMapper, configFile string) error
}

ConfigurationSaver interface is an interface to save a configuration

type ConfigurationWriter

type ConfigurationWriter interface {
	Configurer
	WriteConfig() error
	WriteConfigAs(file string) error
	SafeWriteConfig() error
	SafeWriteConfigAs(file string) error
}

ConfigurationWriter interface is an interface to write a configuration

type Configurer

type Configurer interface {
	SetConfigFile(file string)
	MergeConfigMap(cfg map[string]interface{}) error
}

Configurer interface is an interface to configure a configuration

type SafeSave

type SafeSave struct{}

SafeSave struct is a struct to save a configuration safely, withouth overwriting the configuration file

func (*SafeSave) Save

func (s *SafeSave) Save(w ConfigurationWriter, fs afero.Fs, config ConfigurationMapper, configFile string) error

Save method is responsible to save a configuration safely

type Save

type Save struct{}

Save struct is a struct to save a configuration

func (*Save) Save

func (s *Save) Save(w ConfigurationWriter, fs afero.Fs, config ConfigurationMapper, configFile string) error

Save method is responsible to save a configuration

Jump to

Keyboard shortcuts

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