logmania/lib/config.go

34 lines
822 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 {
2018-04-26 21:05:27 +02:00
Notify NotifyConfig `toml:"notify"`
Receive ReceiveConfig `toml:"receive"`
DB string `toml:"database"`
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"`
2018-04-26 21:05:27 +02:00
Websocket struct {
Address string `toml:"address"`
Webroot string `toml:"webroot"`
} `toml:"websocket"`
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
}