config

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Ns     string
	Email  string
	Serial uint32
}

type Config

type Config struct {
	Settings Settings
	Zone     []Zone
	Records  map[string]Record
	Rule     []Rule
	Plugin   []Plugin
	Monitor  []string
	Secret   secret.Secret
}

func GetConfig

func GetConfig() *Config

type Mailer

type Mailer struct {
	Host     string
	Priority uint16
	TTL      uint32
	NoMailer bool
}

type NameServer added in v0.0.6

type NameServer struct {
	Host   string
	Target string
	TTL    uint32
}

type Parent

type Parent struct {
	// May be suffixed with [:port]
	Address string
}

type Plugin

type Plugin struct {
	Enabled     bool
	Path        string
	PreHandler  string
	PostHandler string
	Arguments   []string
	Monitor     []string
}

type Record

type Record struct {
	Type uint16

	Host string

	// A
	IPv4  string
	IPv4s []string

	// AAAA
	IPv6  string
	IPv6s []string

	// CNAME
	Aliased string

	// SRV
	Service   string
	Priority  uint16
	Proto     string
	Weight    uint16
	Port      uint16
	Target    string
	NoService bool

	// TXT
	Text string

	Origin string
	TTL    uint32
	Auth   Auth
}

type Rule

type Rule struct {
	Condition string
	Action    string
}

type Settings

type Settings struct {
	DebugLevel uint8
	AutoReload bool
	// ["ip:port", ...]
	// Each instance should identify a working ip address from this list
	Listeners []string
	// If true, when multiple records are found for a domain, only one is returned
	// A different one every time.
	// If false, all records are returned.
	LoadBalance bool
	// In lazy mode, when a CNAME is found, the CNAME is returned and the
	// target is not resolved.
	Lazy bool
	// A caching DNS will not refresh its knowledge until Ttl value expires
	Cache bool
	// If true, CNAME chains will be merged into a single record
	Flatten bool
	// Disabling the rule engine speeds up simple DNS lookups
	DisableRuleEngine bool

	// DNS to recurse to when an authoritative answer does not exist.
	Parent Parent
}

type Zone

type Zone struct {
	Origin     string
	TTL        uint32
	Auth       Auth
	Record     []Record
	Mailer     []Mailer
	NameServer []NameServer
}

Jump to

Keyboard shortcuts

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