1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00
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

41 lines
1.1 KiB
Go

package cscglobal
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 {
// Each test should be encapsulated in a function that can be tested
// individually. If the test is of general use, add it to the
// recordaudit module.
// Each test should document the last time we verified the test was
// still needed. Sometimes companies change their API.
if err := recordaudit.TxtNoDoubleQuotes(records); err != nil {
return err
} // Needed as of 2022-06-10
if err := recordaudit.TxtNoStringsLen256orLonger(records); err != nil {
return err
} // Needed as of 2022-06-10
if err := recordaudit.TxtNoMultipleStrings(records); err != nil {
return err
} // Needed as of 2022-06-10
if err := recordaudit.TxtNoTrailingSpace(records); err != nil {
return err
} // Needed as of 2022-06-10
if err := recordaudit.TxtNotEmpty(records); err != nil {
return err
} // Needed as of 2022-06-10
return nil
}