Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoBlocklistsProvided = errors.New("no blocklists provided")
Functions ¶
Types ¶
type Blocklist ¶
type Blocklist struct {
Target string `yaml:"target"`
}
Blocklist is a structure that represents where all these domains that needs to be blocked are located.
type Config ¶
type Config struct {
Blocklists []Blocklist `yaml:"blocklists"`
Whitelists []Whitelist `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.
Click to show internal directories.
Click to hide internal directories.