config

package
v0.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(configFile string)

loadConfig opens & attempts to parse configuration file

Types

type Alerts

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

type Cameras struct {
	Exclude []string `fig:"exclude" default:[]`
}

type Config

type Config struct {
	Frigate Frigate `fig:"frigate"`
	Alerts  Alerts  `fig:"alerts"`
	Monitor Monitor `fig:"monitor"`
}
var ConfigData Config

type Discord

type Discord struct {
	Enabled bool   `fig:"enabled" default:false`
	Webhook string `fig:"webhook" default:""`
}

type Frigate

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

type General struct {
	Title      string `fig:"title" default:"Frigate Alert"`
	TimeFormat string `fig:"timeformat" default: ""`
}

type Gotify

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

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

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 added in v0.2.6

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

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 added in v0.2.6

type Telegram struct {
	Enabled bool   `fig:"enabled" default:false`
	ChatID  int64  `fig:"chatid" default:0`
	Token   string `fig:"token" default:""`
}

type WebAPI

type WebAPI struct {
	Enabled  bool `fig:"enabled" default:false`
	Interval int  `fig:"interval" default:30`
	TestMode bool `fig:"testmode" default:false`
}

type Zones

type Zones struct {
	Unzoned string   `fig:"unzoned" default:"allow"`
	Allow   []string `fig:"allow" default:[]`
	Block   []string `fig:"block" default:[]`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL