Back to

Package config

Latest Go to latest

The latest major version is .

Published: Feb 21, 2019 | License: MIT | Module:


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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier