Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyDefaults ¶
func ApplyDefaults(cc *CoreConfig)
ApplyDefaults sets reasonable default config values on a CoreConfig if no value is set.
Port defaults to 5301. Forward.Addresses defaults to [1.1.1.1, 1.0.0.1] (cloudflare dns servers) Forward.ServerName defaults to cloudflare-dns.com (cloudflare dns servers)
func Lockdown ¶ added in v0.3.0
func Lockdown(cc *CoreConfig) error
Types ¶
type CoreConfig ¶
type CoreConfig struct { Port int NoDebug bool NoLog bool Allows []string AllowFile string AllowDir string Blocks []string BlockFile string BlockDir string Suffix []string SuffixFile string SuffixDir string NoDefaults bool Forward *Forward }
CoreConfig contains donutdns configuration. It is used to generate CoreDNS (Caddy) style configuration blocks.
func ConfigFromEnv ¶
func ConfigFromEnv(e env.Environment) *CoreConfig
ConfigFromEnv parses environment variables from e and creates a CoreConfig.
func (*CoreConfig) Generate ¶
func (cc *CoreConfig) Generate() string
Generate a CoreDNS (Caddy) style configuration block as a string.
Click to show internal directories.
Click to hide internal directories.