2017-09-21 08:38:05 +00:00
|
|
|
package config
|
|
|
|
|
2017-09-22 09:20:07 +00:00
|
|
|
const (
|
|
|
|
ConfigFileName = "config.json"
|
|
|
|
)
|
|
|
|
|
2017-09-28 10:09:33 +00:00
|
|
|
var ConfigDir *string
|
|
|
|
var ConfigFilePath *string
|
|
|
|
var CFG *Config
|
2017-09-21 08:38:05 +00:00
|
|
|
|
2017-09-28 10:09:33 +00:00
|
|
|
type Config struct {
|
2017-09-21 08:38:05 +00:00
|
|
|
Central CentralConfig `json:"central" yaml:"central" toml:"central"`
|
2017-09-28 10:09:33 +00:00
|
|
|
Probe ProbeConfig `json:"probe" yaml:"probe" toml:"probe"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type CentralConfig struct {
|
|
|
|
URL *string `json:"url" yaml:"url" toml:"url"`
|
|
|
|
APIKey *string `json:"apiKey" yaml:"apiKey" toml:"apiKey"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type ProbeConfig struct {
|
|
|
|
Key *string `json:"key,omitempty" yaml:"key" toml:"key"`
|
2017-09-21 08:38:05 +00:00
|
|
|
}
|