func (p *AlibabaCloudProvider) recordsForDNS() (endpoints []*endpoint.Endpoint, _ error) {

	records, err := p.records()
	if err != nil {
		return nil, err
	}
	for _, recordList := range p.groupRecords(records) {
		name := p.getDNSName(recordList[0].RR, recordList[0].DomainName)
		recordType := recordList[0].Type
		ttl := recordList[0].TTL

		if ttl == defaultAlibabaCloudRecordTTL {
			ttl = 0
		}

		var targets []string
		for _, record := range recordList {
			target := record.Value
			if recordType == "TXT" {
				target = p.unescapeTXTRecordValue(target)
			}
			targets = append(targets, target)
		}
		ep := endpoint.NewEndpointWithTTL(name, recordType, endpoint.TTL(ttl), targets...)
		endpoints = append(endpoints, ep)
	}
	return endpoints, nil
}
func (p *AlibabaCloudProvider) recordsForDNS() (endpoints []*endpoint.Endpoint, _ error) {

	records, err := p.records()
	if err != nil {
		return nil, err
	}
	for _, recordList := range p.groupRecords(records) {
		name := p.getDNSName(recordList[0].RR, recordList[0].DomainName)
		recordType := recordList[0].Type
		ttl := recordList[0].TTL

		if ttl == defaultAlibabaCloudRecordTTL {
			ttl = 0
		}

		var targets []string
		for _, record := range recordList {
			target := record.Value
			if recordType == "TXT" {
				target = p.unescapeTXTRecordValue(target)
			}
			targets = append(targets, target)
		}
		ep := endpoint.NewEndpointWithTTL(name, recordType, endpoint.TTL(ttl), targets...)
		endpoints = append(endpoints, ep)
	}
	return endpoints, nil
}
func ( p * AlibabaCloudProvider ) recordsForDNS ( ) ( endpoints [ ] * endpoint . Endpoint , _ error ) { records , err := p . records ( ) if err != nil { return nil , err } for _ , recordList := range p . groupRecords ( records ) { name := p . getDNSName ( recordList [ 0 ] . RR , recordList [ 0 ] . DomainName ) recordType := recordList [ 0 ] . Type ttl := recordList [ 0 ] . TTL if ttl == defaultAlibabaCloudRecordTTL { ttl = 0 } var targets [ ] string for _ , record := range recordList { target := record . Value if recordType == " " { target = p . unescapeTXTRecordValue ( target ) } targets = append ( targets , target ) } ep := endpoint . NewEndpointWithTTL ( name , recordType , endpoint . TTL ( ttl ) , targets ... ) endpoints = append ( endpoints , ep ) } return endpoints , nil }
// recordsForDNS gets the current records.
//
// Returns the current records or an error if the operation failed.
recordsForDNS gets the current records . Returns the current records or an error if the operation failed .