mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-11-10 17:26:10 +08:00
489be2e3dc
Co-authored-by: Tom Limoncelli <tal@whatexit.org>
33 lines
863 B
Go
33 lines
863 B
Go
package models
|
|
|
|
// DNSProvider is an interface for DNS Provider plug-ins.
|
|
type DNSProvider interface {
|
|
GetNameservers(domain string) ([]*Nameserver, error)
|
|
GetZoneRecords(domain string, meta map[string]string) (Records, error)
|
|
GetZoneRecordsCorrections(dc *DomainConfig, existing Records) ([]*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
|
|
}
|