config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupTargetConfig

type BackupTargetConfig struct {
	Macro string `mapstructure:"macro,"`
}

BackupTargetConfig represents a target configuration block

type Config

type Config struct {
	ConfigDir     string
	ConfigName    string
	Preferences   *PreferencesConfig
	AuthProviders map[string]auth_providers.AuthProviderConfig
	DeviceClasses map[string]*DeviceClassConfig
	DeviceGroups  map[string]*DeviceGroupConfig
}

func LoadFile

func LoadFile(filePath string) (*Config, error)

LoadFile reads the contents of a file and parses it into a Config object

func LoadString

func LoadString(cfg_str string) (*Config, error)

LoadString reads the contents of cfg_str and parses it into a Config object

type DeviceClassConfig

type DeviceClassConfig struct {
	BackupTargets map[string]*BackupTargetConfig
}

type DeviceConfig

type DeviceConfig struct {
	Name         string
	ClassName    string
	Address      string
	AuthProvider string
	AuthPath     string
}

DeviceConfig represents a device configuration block

type DeviceGroupConfig

type DeviceGroupConfig struct {
	Devices map[string]*DeviceConfig
}

type PreferencesConfig

type PreferencesConfig struct {
	BackupDir string `mapstructure:"backup_dir,"`
	HostIP    string `mapstructure:"host_ip,"`
}

PreferencesConfig represents a preferences configuration block

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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