mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-01-11 01:47:53 +08:00
87ad01d194
* Add GetZoneRecords to DNSProvider interface * dnscontrol now uses ufave/cli/v2 * NEW: get-zones.md * HasRecordTypeName should be a method on models.Records not models.DomainConfig * Implement BIND's GetZoneRecords * new WriteZoneFile implemented * go mod vendor * Update docs to use get-zone instead of convertzone * Add CanGetZone capability and update all providers. * Get all zones for a provider at once (#626) * implement GetZoneRecords for cloudflare * munge cloudflare ttls * Implement GetZoneRecords for cloudflare (#625) Co-authored-by: Craig Peterson <192540+captncraig@users.noreply.github.com>
33 lines
816 B
Go
33 lines
816 B
Go
package models
|
|
|
|
// DNSProvider is an interface for DNS Provider plug-ins.
|
|
type DNSProvider interface {
|
|
GetNameservers(domain string) ([]*Nameserver, error)
|
|
GetDomainCorrections(dc *DomainConfig) ([]*Correction, error)
|
|
GetZoneRecords(domain string) (Records, error)
|
|
}
|
|
|
|
// Registrar is an interface for Registrar plug-ins.
|
|
type Registrar interface {
|
|
GetRegistrarCorrections(dc *DomainConfig) ([]*Correction, error)
|
|
}
|
|
|
|
// ProviderBase describes providers.
|
|
type ProviderBase struct {
|
|
Name string
|
|
IsDefault bool
|
|
ProviderType string
|
|
}
|
|
|
|
// RegistrarInstance is a single registrar.
|
|
type RegistrarInstance struct {
|
|
ProviderBase
|
|
Driver Registrar
|
|
}
|
|
|
|
// DNSProviderInstance is a single DNS provider.
|
|
type DNSProviderInstance struct {
|
|
ProviderBase
|
|
Driver DNSProvider
|
|
NumberOfNameservers int
|
|
}
|