2021-03-07 13:19:22 -05:00
|
|
|
package vultr
|
|
|
|
|
|
|
|
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 {
|
|
|
|
|
|
|
|
// TODO(tlim) Needs investigation. Could be a dnscontrol issue or
|
|
|
|
// the provider doesn't support double quotes.
|
|
|
|
if err := recordaudit.TxtNoDoubleQuotes(records); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
// Still needed as of 2021-03-02
|
|
|
|
|
2021-08-17 15:58:10 -04:00
|
|
|
if err := recordaudit.TxtNoMultipleStrings(records); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
2021-11-23 20:35:01 +01:00
|
|
|
if err := recordaudit.TxtNoLongStrings(records); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
2021-03-07 13:19:22 -05:00
|
|
|
return nil
|
|
|
|
}
|