Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Calendar ¶
type Calendar struct {
Name string `toml:"name"`
}
Calendar struct hold Google Calendar configuration.
type Mail ¶
type Mail struct {
Server string `toml:"server"`
Port string `toml:"port"`
Username string `toml:"username"`
Password string `toml:"password"`
From string `toml:"from"`
Subject string `toml:"subject"`
To []string `toml:"to"`
}
Mail struct hold mail messenger configuration.
type TomlConfig ¶
type TomlConfig struct {
Calendar Calendar `toml:"calendar"`
Mail Mail `toml:"mail"`
Telegram Telegram `toml:"telegram"`
Discord Discord `toml:"discord"`
Slack Slack `toml:"slack"`
User []User `toml:"user"`
WhatsApp WhatsApp `toml:"whatsapp"`
TelegramEnabled bool `toml:"telegram_enabled"`
DiscordEnabled bool `toml:"discord_enabled"`
SlackEnabled bool `toml:"slack_enabled"`
MailEnabled bool `toml:"mail_enabled"`
CalendarEnabled bool `toml:"calendar_enabled"`
WhatsAppEnabled bool `toml:"whatsapp_enabled"`
}
TomlConfig struct holds all other configuration structures.
func LoadConfig ¶
func LoadConfig(file string) (TomlConfig, error)
LoadConfig attempts to load and decode configuration file in TOML format, doing a minimal sanity checking and optionally returning an error.
Click to show internal directories.
Click to hide internal directories.