dnscontrol/models/provider.go
Tom Limoncelli 752e25471d
NEW PROVIDER: CSCGLOBAL as DNS Service Provider (#1516)
* Move the registrar features to a separate file

* Prepare the testing framework

* Roughed out functions

* Fix up structs

* WIP!

* First tests pass

* wip!

* Flesh out remaining rTypes, get nameservers, etc

* Fix TXT records

* Clean up code

* More cleanups. Fix CAA/SRV

* Linting

* Cleanups/linting

* Fix CAA [more] and more cleanups

* CSC does not like very long txt records

* Use timer only when interactive

* Disable CAA for now

* Update docs

* Remove debug printf

* add go-isatty

* cleanups
2022-06-12 16:01:08 -04:00

34 lines
816 B
Go

package models
// DNSProvider is an interface for DNS Provider plug-ins.
type DNSProvider interface {
GetNameservers(domain string) ([]*Nameserver, error)
GetZoneRecords(domain string) (Records, 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
}