mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-01-11 09:59:59 +08:00
NS1: Added support for ALIAS, PTR, and TXTMuli (#776)
This commit is contained in:
parent
541bb805da
commit
f7d39b578a
1 changed files with 8 additions and 0 deletions
|
@ -15,6 +15,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var docNotes = providers.DocumentationNotes{
|
var docNotes = providers.DocumentationNotes{
|
||||||
|
providers.CanUseAlias: providers.Can(),
|
||||||
|
providers.CanUsePTR: providers.Can(),
|
||||||
|
providers.CanUseTXTMulti: providers.Can(),
|
||||||
providers.DocCreateDomains: providers.Cannot(),
|
providers.DocCreateDomains: providers.Cannot(),
|
||||||
providers.DocOfficiallySupported: providers.Cannot(),
|
providers.DocOfficiallySupported: providers.Cannot(),
|
||||||
providers.DocDualHost: providers.Can(),
|
providers.DocDualHost: providers.Can(),
|
||||||
|
@ -150,6 +153,11 @@ func convert(zr *dns.ZoneRecord, domain string) ([]*models.RecordConfig, error)
|
||||||
}
|
}
|
||||||
rec.SetLabelFromFQDN(zr.Domain, domain)
|
rec.SetLabelFromFQDN(zr.Domain, domain)
|
||||||
switch rtype := zr.Type; rtype {
|
switch rtype := zr.Type; rtype {
|
||||||
|
case "ALIAS":
|
||||||
|
rec.Type = rtype
|
||||||
|
if err := rec.SetTarget(ans); err != nil {
|
||||||
|
panic(fmt.Errorf("unparsable ALIAS record received from ns1: %w", err))
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
if err := rec.PopulateFromString(rtype, ans, domain); err != nil {
|
if err := rec.PopulateFromString(rtype, ans, domain); err != nil {
|
||||||
panic(fmt.Errorf("unparsable record received from ns1: %w", err))
|
panic(fmt.Errorf("unparsable record received from ns1: %w", err))
|
||||||
|
|
Loading…
Reference in a new issue