Documentation
¶
Overview ¶
config provides flag and configuration file reading for satinv
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
API struct {
BaseURL string `yaml:"baseurl"`
CertFile string `yaml:"certfile"`
Password string `yaml:"password"`
User string `yaml:"user"`
} `yaml:"api"`
Cache struct {
Dir string `yaml:"dir"`
Validity int64 `yaml:"validity"`
InventoryValidity int64 `yaml:"inventory_validity"`
} `yaml:"cache"`
CIDRs map[string]string `yaml:"cidrs"`
InventoryPrefix string `yaml:"inventory_prefix"`
Valid struct {
Days int `yaml:"days"`
ExcludeHosts []string `yaml:"exclude_hosts"`
ExcludeRegex []string `yaml:"exclude_regex"`
} `yaml:"valid"`
}
Config contains all the configuration settings
func ParseConfig ¶
ParseConfig expects a YAML formatted config file and populates a Config struct
func (*Config) WriteConfig ¶
WriteConfig will create a YAML formatted config file from a Config struct