config

package
v0.0.0-...-7b59e1e Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: MIT Imports: 6 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 {
	Version      string         `yaml:"-"`
	DbConnString string         `yaml:"db"`
	ListenAddr   string         `yaml:"listen_addr"`
	Sources      []SourceConfig `yaml:"sources,flow"`
}

func Get

func Get(filename string, appVersion string) (Config, error)

func (Config) GetAllTags

func (c Config) GetAllTags() map[string][]string

func (Config) GetResourcesWithTags

func (c Config) GetResourcesWithTags(tagStrings []string) ([]string, error)

type SourceConfig

type SourceConfig struct {
	Name         string              `yaml:"name"`
	FeedUrl      string              `yaml:"url"`
	Timeout      time.Duration       `yaml:"timeout"`
	UpdatePeriod time.Duration       `yaml:"update"`
	Tags         map[string][]string `yaml:"tags"`
}

Jump to

Keyboard shortcuts

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