github.com/teknogeek/dnscontrol@v0.2.8/models/provider.go (about) 1 package models 2 3 // DNSProvider is an interface for DNS Provider plug-ins. 4 type DNSProvider interface { 5 GetNameservers(domain string) ([]*Nameserver, error) 6 GetDomainCorrections(dc *DomainConfig) ([]*Correction, error) 7 } 8 9 // Registrar is an interface for Registrar plug-ins. 10 type Registrar interface { 11 GetRegistrarCorrections(dc *DomainConfig) ([]*Correction, error) 12 } 13 14 // ProviderBase describes providers. 15 type ProviderBase struct { 16 Name string 17 IsDefault bool 18 ProviderType string 19 } 20 21 // RegistrarInstance is a single registrar. 22 type RegistrarInstance struct { 23 ProviderBase 24 Driver Registrar 25 } 26 27 // DNSProviderInstance is a single DNS provider. 28 type DNSProviderInstance struct { 29 ProviderBase 30 Driver DNSProvider 31 NumberOfNameservers int 32 }