config

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigFile string

Functions

func Load added in v0.4.0

func Load()

Load opens & attempts to parse configuration file

func Save added in v0.4.0

func Save(skipBackup bool)

Types

type Config

type Config struct {
	App     models.App     `koanf:"app" json:"app" required:"false"`
	Frigate models.Frigate `koanf:"frigate" json:"frigate" required:"true"`
	Alerts  models.Alerts  `koanf:"alerts" json:"alerts" required:"true"`
	Monitor models.Monitor `koanf:"monitor" json:"monitor" required:"false"`
}
var ConfigData Config
var DefaultConfig Config = Config{
	App: models.App{
		Mode: "reviews",
		API: models.API{
			Enabled: false,
			Port:    8000},
		Internal: models.Internal{
			HTTP: models.HTTP{
				Timeout:  10,
				Attempts: 6,
			},
		},
	},
	Frigate: models.Frigate{
		Server:    "",
		Insecure:  false,
		PublicURL: "",
		Headers:   nil,
		StartupCheck: models.StartupCheck{
			Attempts: 5,
			Interval: 30,
		},
		WebAPI: models.WebAPI{
			Enabled:  false,
			Interval: 30,
			TestMode: false,
		},
		MQTT: models.MQTT{
			Enabled:     false,
			Server:      "",
			Port:        1883,
			ClientID:    "frigate-notify",
			Username:    "",
			Password:    "",
			TopicPrefix: "frigate",
		},
		Cameras: models.Cameras{
			Exclude: nil,
		},
	},
	Alerts: models.Alerts{
		General: models.General{
			Title:            "Frigate Alert",
			TimeFormat:       "",
			NoSnap:           "allow",
			SnapBbox:         false,
			SnapTimestamp:    false,
			SnapCrop:         false,
			MaxSnapRetry:     10,
			NotifyOnce:       false,
			NotifyDetections: false,
			RecheckDelay:     0,
			AudioOnly:        "allow",
		},
		Quiet: models.Quiet{
			Start: "",
			End:   "",
		},
		Zones: models.Zones{
			Unzoned: "allow",
			Allow:   nil,
			Block:   nil,
		},
		Labels: models.Labels{
			MinScore: 0,
			Allow:    nil,
			Block:    nil,
		},
		SubLabels: models.Labels{
			MinScore: 0,
			Allow:    nil,
			Block:    nil,
		},
		LicensePlate: models.LicensePlate{
			Enabled: false,
			Allow:   nil,
			Block:   nil,
		},
	},
	Monitor: models.Monitor{
		Enabled:  false,
		URL:      "",
		Interval: 60,
		Insecure: false,
	},
}

Default config values

func (*Config) Validate added in v0.4.0

func (c *Config) Validate() []string

Directories

Path Synopsis
providers
env
Custom environment variable provider Needed in order to support multiple notification provider profiles config via env vars Thanks to https://github.com/knadh/koanf/issues/74#issuecomment-1778885434
Custom environment variable provider Needed in order to support multiple notification provider profiles config via env vars Thanks to https://github.com/knadh/koanf/issues/74#issuecomment-1778885434
secrets
Custom docker secrets provider
Custom docker secrets provider

Jump to

Keyboard shortcuts

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