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

	zones, err := p.getPrivateZones()
	if err != nil {
		return nil, err
	}

	for _, zone := range zones {
		recordMap := p.groupPrivateZoneRecords(zone)
		for _, recordList := range recordMap {
			name := p.getDNSName(recordList[0].Rr, zone.ZoneName)
			recordType := recordList[0].Type
			ttl := recordList[0].Ttl
			if ttl == defaultAlibabaCloudPrivateZoneRecordTTL {
				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) privateZoneRecords() (endpoints []*endpoint.Endpoint, _ error) {

	zones, err := p.getPrivateZones()
	if err != nil {
		return nil, err
	}

	for _, zone := range zones {
		recordMap := p.groupPrivateZoneRecords(zone)
		for _, recordList := range recordMap {
			name := p.getDNSName(recordList[0].Rr, zone.ZoneName)
			recordType := recordList[0].Type
			ttl := recordList[0].Ttl
			if ttl == defaultAlibabaCloudPrivateZoneRecordTTL {
				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 ) privateZoneRecords ( ) ( endpoints [ ] * endpoint . Endpoint , _ error ) { zones , err := p . getPrivateZones ( ) if err != nil { return nil , err } for _ , zone := range zones { recordMap := p . groupPrivateZoneRecords ( zone ) for _ , recordList := range recordMap { name := p . getDNSName ( recordList [ 0 ] . Rr , zone . ZoneName ) recordType := recordList [ 0 ] . Type ttl := recordList [ 0 ] . Ttl if ttl == defaultAlibabaCloudPrivateZoneRecordTTL { 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 }
// recordsForPrivateZone gets the current records.
//
// Returns the current records or an error if the operation failed.
recordsForPrivateZone gets the current records . Returns the current records or an error if the operation failed .