package
Version:
v0.2.6
Opens a new window with list of versions in this module.
Published: Apr 1, 2024
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func LoadConfig(configFile string)
loadConfig opens & attempts to parse configuration file
type Alerts struct {
General General `fig:"general"`
Zones Zones `fig:"zones"`
Discord Discord `fig:"discord"`
Gotify Gotify `fig:"gotify"`
SMTP SMTP `fig:"smtp"`
Telegram Telegram `fig:"telegram"`
Pushover Pushover `fig:"pushover"`
}
type Cameras struct {
Exclude []string `fig:"exclude" default:[]`
}
type Config struct {
Frigate Frigate `fig:"frigate"`
Alerts Alerts `fig:"alerts"`
Monitor Monitor `fig:"monitor"`
}
type Discord struct {
Enabled bool `fig:"enabled" default:false`
Webhook string `fig:"webhook" default:""`
}
type Frigate struct {
Server string `fig:"server" validate:"required"`
Insecure bool `fig:"ignoressl" default:false`
WebAPI WebAPI `fig:"webapi"`
MQTT MQTT `fig:"mqtt"`
Cameras Cameras `fig:"cameras"`
}
type General struct {
Title string `fig:"title" default:"Frigate Alert"`
TimeFormat string `fig:"timeformat" default: ""`
}
type Gotify struct {
Enabled bool `fig:"enabled" default:false`
Server string `fig:"server" default:""`
Token string `fig:"token" default:""`
Insecure bool `fig:"ignoressl" default:false`
}
type MQTT struct {
Enabled bool `fig:"enabled" default:false`
Server string `fig:"server" default:""`
Port int `fig:"port" default:1883`
ClientID string `fig:"clientid" default:"frigate-notify"`
Username string `fig:"username" default:""`
Password string `fig:"password" default:""`
}
type Monitor struct {
Enabled bool `fig:"enabled" default:false`
URL string `fig:"url" default:""`
Interval int `fig:"interval" default:60`
Insecure bool `fig:"ignoressl" default:false`
}
type Pushover struct {
Enabled bool `fig:"enabled" default:false`
Token string `fig:"token" default:""`
Userkey string `fig:"userkey" default:""`
Devices string `fig:"devices" default:""`
Priority int `fig:"priority" default:0`
Retry int `fig:"retry" default:0`
Expire int `fig:"expire" default:0`
TTL int `fig:"ttl" default:0`
}
type SMTP struct {
Enabled bool `fig:"enabled" default:false`
Server string `fig:"server" default:""`
Port int `fig:"port" default:25`
TLS bool `fig:"tls" default:false`
User string `fig:"user" default:""`
Password string `fig:"password" default:""`
Recipient string `fig:"recipient" default:""`
}
type Telegram struct {
Enabled bool `fig:"enabled" default:false`
ChatID int64 `fig:"chatid" default:0`
Token string `fig:"token" default:""`
}
type WebAPI struct {
Enabled bool `fig:"enabled" default:false`
Interval int `fig:"interval" default:30`
TestMode bool `fig:"testmode" default:false`
}
type Zones struct {
Unzoned string `fig:"unzoned" default:"allow"`
Allow []string `fig:"allow" default:[]`
Block []string `fig:"block" default:[]`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.