2021-07-07 23:43:10 +08:00
|
|
|
package transip
|
|
|
|
|
2023-01-30 02:03:31 +08:00
|
|
|
import (
|
2023-05-21 01:21:45 +08:00
|
|
|
"github.com/StackExchange/dnscontrol/v4/models"
|
|
|
|
"github.com/StackExchange/dnscontrol/v4/pkg/rejectif"
|
2023-01-30 02:03:31 +08:00
|
|
|
)
|
2021-07-07 23:43:10 +08:00
|
|
|
|
2022-08-12 05:24:47 +08: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 {
|
2023-01-30 02:03:31 +08:00
|
|
|
a := rejectif.Auditor{}
|
2023-11-20 02:44:49 +08:00
|
|
|
|
2023-12-05 06:45:25 +08:00
|
|
|
a.Add("MX", rejectif.MxNull) // Last verified 2023-12-04
|
2023-11-20 02:44:49 +08:00
|
|
|
|
2023-12-05 06:45:25 +08:00
|
|
|
a.Add("TXT", rejectif.TxtHasBackticks) // Last verified 2023-12-04
|
2023-11-20 02:44:49 +08:00
|
|
|
|
2023-12-05 06:45:25 +08:00
|
|
|
a.Add("TXT", rejectif.TxtHasDoubleQuotes) // Last verified 2023-12-04
|
2023-11-20 02:44:49 +08:00
|
|
|
|
2023-12-05 06:45:25 +08:00
|
|
|
a.Add("TXT", rejectif.TxtHasBackslash) // Last verified 2023-12-04
|
2023-01-30 02:03:31 +08:00
|
|
|
|
2023-12-11 09:47:44 +08:00
|
|
|
a.Add("TXT", rejectif.TxtStartsOrEndsWithSpaces) // Last verified 2023-12-10
|
|
|
|
|
|
|
|
a.Add("TXT", rejectif.TxtIsEmpty) // Last verified 2023-12-10
|
|
|
|
|
2023-12-16 04:03:07 +08:00
|
|
|
a.Add("TXT", rejectif.TxtLongerThan(1024)) // Last verified 2023-12-15
|
|
|
|
|
2023-01-30 02:03:31 +08:00
|
|
|
return a.Audit(records)
|
2021-07-07 23:43:10 +08:00
|
|
|
}
|