config

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ZettelkastenDirectory    string        `koanf:"zettelkasten_directory" validate:"requiredWithout:ZettelkastenGitURL"`
	ZettelkastenGitURL       string        `koanf:"zettelkasten_git_url" validate:"requiredWithout:ZettelkastenDirectory|url"`
	ZettelkastenGitBranch    string        `koanf:"zettelkasten_git_branch"`
	ZettelkastenGitToken     string        `koanf:"zettelkasten_git_token"`
	LogLevel                 slog.Level    `koanf:"log_level"`
	IgnoreFiles              []string      `koanf:"ignore_files"`
	CollectionInterval       time.Duration `koanf:"collection_interval"`
	CollectHistoricalMetrics bool          `koanf:"collect_historical_metrics"`
	VictoriaMetricsURL       string        `koanf:"victoriametrics_url" validate:"fullUrl"`
	InfluxDBURL              string        `koanf:"influxdb_url" validate:"fullUrl"`
	InfluxDBToken            string        `koanf:"influxdb_token" validate:"requiredWith:InfluxDBURL"`
	InfluxDBOrg              string        `koanf:"influxdb_org" validate:"requiredWith:InfluxDBURL"`
	InfluxDBBucket           string        `koanf:"influxdb_bucket" validate:"requiredWith:InfluxDBURL"`
}

func LoadConfig

func LoadConfig() (Config, error)

func (Config) LogValue

func (c Config) LogValue() slog.Value

Jump to

Keyboard shortcuts

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