logmania/lib/config.go

31 lines
773 B
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 dev.sum7.eu/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 {
JID string `toml:"jid"`
Password string `toml:"password"`
2017-06-16 10:33:35 +02:00
} `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
}