logmania/lib/config.go

38 lines
1.0 KiB
Go
Raw Normal View History

2017-06-11 03:34:11 +02:00
package lib
2017-06-13 00:21:19 +02:00
// Struct of the configuration
// e.g. under github.com/genofire/logmania/logmania_example.conf
2017-06-11 03:34:11 +02:00
type Config struct {
Notify NotifyConfig `toml:"notify"`
Receive ReceiveConfig `toml:"receive"`
DB string `toml:"database"`
HTTPAddress string `toml:"http_address"`
2017-06-11 03:34:11 +02:00
}
2017-06-16 10:33:35 +02:00
type NotifyConfig struct {
2017-08-13 12:12:46 +02:00
AlertCheck Duration `toml:"alert_check"`
2017-08-17 21:45:58 +02:00
Console bool `toml:"debug"`
2017-08-13 12:12:46 +02:00
XMPP struct {
2017-06-16 10:33:35 +02:00
Host string `toml:"host"`
Username string `toml:"username"`
Password string `toml:"password"`
Debug bool `toml:"debug"`
NoTLS bool `toml:"no_tls"`
Session bool `toml:"session"`
Status string `toml:"status"`
StatusMessage string `toml:"status_message"`
StartupNotify string `toml:"startup_notify"`
} `toml:"xmpp"`
2017-08-09 08:45:45 +02:00
}
type ReceiveConfig struct {
Syslog struct {
Type string `toml:"type"`
Address string `toml:"address"`
2017-08-09 08:45:45 +02:00
} `toml:"syslog"`
2017-08-17 21:45:58 +02:00
JournaldJSON struct {
Type string `toml:"type"`
Address string `toml:"address"`
} `toml:"journald_json"`
2017-06-16 10:33:35 +02:00
}