Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoBlocklistsProvided = errors.New("no blocklists provided")
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Blocklist is a structure that represents where all these domains that needs
// to be blocked are located.
Blocklists []Domainlist `yaml:"blocklists"`
// Whitelists contains domains that must not be blocked.
// Adding some domains to whitelist may fix many problems like YouTube
// watch history, videos on news sites and so on.
Whitelists []Domainlist `yaml:"whitelists"`
}
Config represents the entire configuration structure.
func Load ¶
Load loads config file. If config file is located at filesystem, it merges its options with default one and returns the result. If config file simply doesn't present at filesystem, it returns default one.
func LoadByUser ¶
LoadByUser loads config file at the location that was provided by the user via config-file CLI flag.
type Domainlist ¶ added in v1.0.4
type Domainlist struct {
Target string `yaml:"target"`
}
Click to show internal directories.
Click to hide internal directories.