mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Refactor RecordConfig: Add getters/setters (#314)
* Replace RecordConfig.Name and .NameFQDN with getters and setters. * Replace RecordConfig.Target with getters and setters. * Eliminate the CombinedTarget concept. * Add RecordConfig.PopulateFromString to reduce code in all providers. * encode and decode name.com txt records (#315) * Replace fmt.Errorf with errors.Errorf
This commit is contained in:
@@ -114,7 +114,7 @@ func (c *ovhProvider) createRecordFunc(rc *models.RecordConfig, fqdn string) fun
|
||||
record := Record{
|
||||
SubDomain: dnsutil.TrimDomainName(rc.NameFQDN, fqdn),
|
||||
FieldType: rc.Type,
|
||||
Target: rc.Content(),
|
||||
Target: rc.GetTargetCombined(),
|
||||
TTL: rc.TTL,
|
||||
}
|
||||
if record.SubDomain == "@" {
|
||||
@@ -132,7 +132,7 @@ func (c *ovhProvider) updateRecordFunc(old *Record, rc *models.RecordConfig, fqd
|
||||
record := Record{
|
||||
SubDomain: dnsutil.TrimDomainName(rc.NameFQDN, fqdn),
|
||||
FieldType: rc.Type,
|
||||
Target: rc.Content(),
|
||||
Target: rc.GetTargetCombined(),
|
||||
TTL: rc.TTL,
|
||||
Zone: fqdn,
|
||||
ID: old.ID,
|
||||
|
Reference in New Issue
Block a user