Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultTTL = uint32(300)
Variables ¶
This section is empty.
Functions ¶
func InterfaceToIP ¶
Types ¶
type Correction ¶
Correction is anything that can be run. Implementation is up to the specific provider.
type DNSConfig ¶
type DNSConfig struct { Registrars []*RegistrarConfig `json:"registrars"` DNSProviders []*DNSProviderConfig `json:"dns_providers"` Domains []*DomainConfig `json:"domains"` }
func (*DNSConfig) FindDomain ¶
func (config *DNSConfig) FindDomain(query string) *DomainConfig
type DNSProviderConfig ¶
type DNSProviderConfig struct { Name string `json:"name"` Type string `json:"type"` Metadata json.RawMessage `json:"meta,omitempty"` }
type DomainConfig ¶
type DomainConfig struct { Name string `json:"name"` // NO trailing "." Registrar string `json:"registrar"` DNSProviders map[string]int `json:"dnsProviders"` Metadata map[string]string `json:"meta,omitempty"` Records []*RecordConfig `json:"records"` Nameservers []*Nameserver `json:"nameservers,omitempty"` KeepUnknown bool `json:"keepunknown"` }
func (*DomainConfig) Copy ¶
func (dc *DomainConfig) Copy() (*DomainConfig, error)
func (*DomainConfig) HasRecordTypeName ¶
func (dc *DomainConfig) HasRecordTypeName(rtype, name string) bool
type Nameserver ¶
type Nameserver struct { Name string `json:"name"` // Normalized to a FQDN with NO trailing "." Target string `json:"target"` }
func StringsToNameservers ¶
func StringsToNameservers(nss []string) []*Nameserver
type RecordConfig ¶
type RecordConfig struct { Type string `json:"type"` Name string `json:"name"` // The short name. See below. Target string `json:"target"` // If a name, must end with "." TTL uint32 `json:"ttl,omitempty"` Metadata map[string]string `json:"meta,omitempty"` NameFQDN string `json:"-"` // Must end with ".$origin". See below. Priority uint16 `json:"priority,omitempty"` Original interface{} `json:"-"` // Store pointer to provider-specific record object. Used in diffing. }
RecordConfig stores a DNS record. Providers are responsible for validating or normalizing the data that goes into a RecordConfig. If you update Name, you have to update NameFQDN and vice-versa.
Name:
This is the shortname i.e. the NameFQDN without the origin suffix. It should never have a trailing "." It should never be null. It should store It "@", not the apex domain, not null, etc. It shouldn't end with the domain origin. If the origin is "foo.com." then if Name == "foo.com" then that literally means "foo.com.foo.com." is the intended FQDN.
NameFQDN:
This is the FQDN version of Name. It should never have a trailiing ".".
func (*RecordConfig) Copy ¶
func (r *RecordConfig) Copy() (*RecordConfig, error)
func (*RecordConfig) String ¶
func (r *RecordConfig) String() string
type RegistrarConfig ¶
type RegistrarConfig struct { Name string `json:"name"` Type string `json:"type"` Metadata json.RawMessage `json:"meta,omitempty"` }
Click to show internal directories.
Click to hide internal directories.