1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Refactor: Prelink providers to domains (#305)

This commit is contained in:
Craig Peterson
2018-02-01 11:45:53 -05:00
committed by Tom Limoncelli
parent b7c6efaa53
commit 7a4dca5ad5
9 changed files with 181 additions and 131 deletions

27
models/provider.go Normal file
View File

@@ -0,0 +1,27 @@
package models
type DNSProvider interface {
GetNameservers(domain string) ([]*Nameserver, error)
GetDomainCorrections(dc *DomainConfig) ([]*Correction, error)
}
type Registrar interface {
GetRegistrarCorrections(dc *DomainConfig) ([]*Correction, error)
}
type ProviderBase struct {
Name string
IsDefault bool
ProviderType string
}
type RegistrarInstance struct {
ProviderBase
Driver Registrar
}
type DNSProviderInstance struct {
ProviderBase
Driver DNSProvider
NumberOfNameservers int
}