use DAO
This commit is contained in:
@@ -32,13 +32,17 @@ func (Record) TableName() string {
|
||||
return "coredns_record"
|
||||
}
|
||||
|
||||
func (r *Record) CheckZone() error {
|
||||
func (r Record) CheckZone() error {
|
||||
if strings.HasSuffix(r.Zone, ".") {
|
||||
return fmt.Errorf("zone should end with '.'")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r Record) WithOutDotTail() string {
|
||||
return strings.TrimRight(r.Zone, ".")
|
||||
}
|
||||
|
||||
type RecordContentTypes interface {
|
||||
dns.ARecord | dns.AAAARecord | dns.CNAMERecord | dns.CAARecord | dns.NSRecord | dns.MXRecord | dns.SOARecord | dns.SRVRecord | dns.TXTRecord
|
||||
}
|
||||
|
Reference in New Issue
Block a user