forked from StackExchange/dnscontrol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
provider.go
32 lines (27 loc) · 768 Bytes
/
provider.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
}