config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 5 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 {
	App      ConfigApp
	Feeds    []ConfigFeed
	Webhooks []ConfigWebhook
}

func FromFile

func FromFile(path string) (Config, error)

func (*Config) EnabledFeeds

func (mc *Config) EnabledFeeds() []ConfigFeed

type ConfigApp

type ConfigApp struct {
	BrandingDisabled bool   `toml:"branding_disabled"`
	DBPath           string `toml:"db_path"`
	LogLevel         string `toml:"loglevel"`
	Oldest           int    `toml:"oldest"`
	Ticker           int    `toml:"ticker"`
	Timeout          int    `toml:"timeout"`
}

func (ConfigApp) LoggerLevel

func (ca ConfigApp) LoggerLevel() slog.Level

type ConfigFeed

type ConfigFeed struct {
	Name     string   `toml:"name"`
	URL      string   `toml:"url"`
	Webhooks []string `toml:"webhooks"`
	Disabled bool     `toml:"disabled"`
}

type ConfigWebhook

type ConfigWebhook struct {
	Name string `toml:"name"`
	URL  string `toml:"url"`
}

Jump to

Keyboard shortcuts

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