dnscontrol/providers/msdns/auditrecords.go
Tom Limoncelli 959f721c04
MAINT: Update TXT docs, suggest not using TxtNoLen255 (#1548)
* suggest not using TxtNoLen255

* Rename functions

* wip!

* fixing!
2022-06-20 11:34:05 -04:00

42 lines
955 B
Go

package msdns
import (
"github.com/StackExchange/dnscontrol/v3/models"
"github.com/StackExchange/dnscontrol/v3/pkg/recordaudit"
)
// AuditRecords returns an error if any records are not
// supportable by this provider.
func AuditRecords(records []*models.RecordConfig) error {
if err := recordaudit.TxtNoMultipleStrings(records); err != nil {
return err
}
// Still needed as of 2021-03-01
if err := recordaudit.TxtNoStringsLen256orLonger(records); err != nil {
return err
}
if err := recordaudit.TxtNotEmpty(records); err != nil {
return err
}
// Still needed as of 2021-03-01
if err := recordaudit.TxtNoBackticks(records); err != nil {
return err
}
// Still needed as of 2021-03-01
if err := recordaudit.TxtNoDoubleQuotes(records); err != nil {
return err
}
// Still needed as of 2021-03-01
if err := recordaudit.TxtNoSingleQuotes(records); err != nil {
return err
}
// Still needed as of 2021-03-01
return nil
}