2021-03-07 13:19:22 -05:00
|
|
|
package dnsimple
|
|
|
|
|
|
|
|
import (
|
2023-05-20 19:21:45 +02:00
|
|
|
"github.com/StackExchange/dnscontrol/v4/models"
|
|
|
|
"github.com/StackExchange/dnscontrol/v4/pkg/rejectif"
|
2021-03-07 13:19:22 -05:00
|
|
|
)
|
|
|
|
|
2022-08-11 17:24:47 -04:00
|
|
|
// AuditRecords returns a list of errors corresponding to the records
|
|
|
|
// that aren't supported by this provider. If all records are
|
|
|
|
// supported, an empty list is returned.
|
|
|
|
func AuditRecords(records []*models.RecordConfig) []error {
|
|
|
|
a := rejectif.Auditor{}
|
|
|
|
|
2023-03-30 10:19:34 -07:00
|
|
|
a.Add("MX", rejectif.MxNull) // Last verified 2023-03
|
2022-09-07 14:08:06 -04:00
|
|
|
|
2024-01-02 21:54:13 +01:00
|
|
|
a.Add("TXT", rejectif.TxtLongerThan(1000)) // Last verified 2023-12
|
2022-09-07 14:08:06 -04:00
|
|
|
|
2023-03-30 10:19:34 -07:00
|
|
|
a.Add("TXT", rejectif.TxtHasTrailingSpace) // Last verified 2023-03
|
2022-07-22 06:36:28 -07:00
|
|
|
|
2023-03-30 10:19:34 -07:00
|
|
|
a.Add("TXT", rejectif.TxtHasUnpairedDoubleQuotes) // Last verified 2023-03
|
2022-07-22 06:36:28 -07:00
|
|
|
|
2023-03-30 10:19:34 -07:00
|
|
|
a.Add("TXT", rejectif.TxtIsEmpty) // Last verified 2023-03
|
2022-09-07 14:08:06 -04:00
|
|
|
|
2022-08-11 17:24:47 -04:00
|
|
|
return a.Audit(records)
|
2021-03-07 13:19:22 -05:00
|
|
|
}
|