mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-01-11 01:47:53 +08:00
752e25471d
* Move the registrar features to a separate file * Prepare the testing framework * Roughed out functions * Fix up structs * WIP! * First tests pass * wip! * Flesh out remaining rTypes, get nameservers, etc * Fix TXT records * Clean up code * More cleanups. Fix CAA/SRV * Linting * Cleanups/linting * Fix CAA [more] and more cleanups * CSC does not like very long txt records * Use timer only when interactive * Disable CAA for now * Update docs * Remove debug printf * add go-isatty * cleanups
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)
|
|
GetZoneRecords(domain string) (Records, error)
|
|
GetDomainCorrections(dc *DomainConfig) ([]*Correction, 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
|
|
}
|