hook2xmpp/runtime/config.go

35 lines
947 B
Go
Raw Normal View History

2019-02-13 03:24:38 +01:00
package runtime
2017-06-09 10:55:47 +02:00
2019-02-14 01:32:27 +01:00
import "github.com/bdlm/std/logger"
2017-06-09 10:55:47 +02:00
type Config struct {
2019-02-14 01:32:27 +01:00
LogLevel logger.Level `toml:"log_level"`
WebserverBind string `toml:"webserver_bind"`
2017-06-09 10:55:47 +02:00
XMPP struct {
Host string `toml:"host"`
Username string `toml:"username"`
2019-02-13 04:52:00 +01:00
Resource string `toml:"resource"`
2017-06-09 10:55:47 +02:00
Password string `toml:"password"`
Debug bool `toml:"debug"`
2017-06-09 15:51:04 +02:00
NoTLS bool `toml:"no_tls"`
2019-02-13 04:52:00 +01:00
StartTLS bool `toml:"start_tls"`
2017-06-09 15:51:04 +02:00
Session bool `toml:"session"`
Status string `toml:"status"`
StatusMessage string `toml:"status_message"`
2017-06-09 10:55:47 +02:00
} `toml:"xmpp"`
2019-02-13 04:52:00 +01:00
2019-02-13 03:55:07 +01:00
Nickname string `toml:"nickname"`
2017-06-09 10:55:47 +02:00
2019-02-13 03:24:38 +01:00
StartupNotifyUser []string `toml:"startup_notify_user"`
StartupNotifyMuc []string `toml:"startup_notify_muc"`
Hooks map[string][]Hook `toml:"hooks"`
2017-06-09 10:55:47 +02:00
}
type Hook struct {
Secret string `toml:"secret"`
2017-06-09 10:55:47 +02:00
NotifyUser []string `toml:"notify_user"`
NotifyMuc []string `toml:"notify_muc"`
}