mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-11-14 12:15:06 +08:00
de4455942b
* Replace RecordConfig.Name and .NameFQDN with getters and setters. * Replace RecordConfig.Target with getters and setters. * Eliminate the CombinedTarget concept. * Add RecordConfig.PopulateFromString to reduce code in all providers. * encode and decode name.com txt records (#315) * Replace fmt.Errorf with errors.Errorf
32 lines
768 B
Go
32 lines
768 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)
|
|
}
|
|
|
|
// 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
|
|
}
|