Documentation ¶
Overview ¶
Package config holds the definition of the configuration file and some methods to load and validate it
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCatalogEntryNotFound = errors.New("catalog entry not found")
ErrCatalogEntryNotFound signalizes a catalog entry with the given name was not found
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct { Catalog []database.CatalogEntry `yaml:"catalog"` CheckInterval time.Duration `yaml:"check_interval"` }
File represents the configuration file content
func (File) CatalogEntryByTag ¶
func (f File) CatalogEntryByTag(name, tag string) (database.CatalogEntry, error)
CatalogEntryByTag retrieves a catalog entry by its name or returns and ErrCatalogEntryNotFound if it does not exist
func (*File) Load ¶
Load loads the contents of the configuration file in the filesystem into the File object
func (File) ValidateCatalog ¶
ValidateCatalog checks whether invalid fetchers are used or the configuration of the fetcher is not suitable for the given fetcher
Click to show internal directories.
Click to hide internal directories.