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

Rename DomainCreator to the more accurate ZoneCreator (#2038)

Co-authored-by: Yannik Sembritzki <yannik@sembritzki.org>
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
Yannik Sembritzki
2023-02-07 17:52:49 +05:30
committed by GitHub
parent e8ae619f89
commit 5e06c249d6
23 changed files with 52 additions and 53 deletions

View File

@@ -399,8 +399,8 @@ func (api *inwxAPI) fetchNameserverDomains() error {
return nil
}
// EnsureDomainExists returns an error if domain does not exist.
func (api *inwxAPI) EnsureDomainExists(domain string) error {
// EnsureZoneExists creates a zone if it does not exist
func (api *inwxAPI) EnsureZoneExists(domain string) error {
if api.domainIndex == nil { // only pull the data once.
if err := api.fetchNameserverDomains(); err != nil {
return err
@@ -408,10 +408,10 @@ func (api *inwxAPI) EnsureDomainExists(domain string) error {
}
if _, ok := api.domainIndex[domain]; ok {
return nil // domain exists.
return nil // zone exists.
}
// creating the domain.
// creating the zone.
request := &goinwx.NameserverCreateRequest{
Domain: domain,
Type: "MASTER",