provider/designate.go
func (p designateProvider) Records() ([]*endpoint.Endpoint, error) {
	var result []*endpoint.Endpoint
	managedZones, err := p.getZones()
	if err != nil {
		return nil, err
	}
	for zoneID := range managedZones {
		err = p.client.ForEachRecordSet(zoneID,
			func(recordSet *recordsets.RecordSet) error {
				if recordSet.Type != endpoint.RecordTypeA && recordSet.Type != endpoint.RecordTypeTXT && recordSet.Type != endpoint.RecordTypeCNAME {
					return nil
				}
				for _, record := range recordSet.Records {
					ep := endpoint.NewEndpoint(recordSet.Name, recordSet.Type, record)
					ep.Labels[designateRecordSetID] = recordSet.ID
					ep.Labels[designateZoneID] = recordSet.ZoneID
					ep.Labels[designateOriginalRecords] = strings.Join(recordSet.Records, "\000")
					result = append(result, ep)
				}
				return nil
			},
		)
		if err != nil {
			return nil, err
		}
	}

	return result, nil
}
func (p designateProvider) Records() ([]*endpoint.Endpoint, error) {
	var result []*endpoint.Endpoint
	managedZones, err := p.getZones()
	if err != nil {
		return nil, err
	}
	for zoneID := range managedZones {
		err = p.client.ForEachRecordSet(zoneID,
			func(recordSet *recordsets.RecordSet) error {
				if recordSet.Type != endpoint.RecordTypeA && recordSet.Type != endpoint.RecordTypeTXT && recordSet.Type != endpoint.RecordTypeCNAME {
					return nil
				}
				for _, record := range recordSet.Records {
					ep := endpoint.NewEndpoint(recordSet.Name, recordSet.Type, record)
					ep.Labels[designateRecordSetID] = recordSet.ID
					ep.Labels[designateZoneID] = recordSet.ZoneID
					ep.Labels[designateOriginalRecords] = strings.Join(recordSet.Records, "\000")
					result = append(result, ep)
				}
				return nil
			},
		)
		if err != nil {
			return nil, err
		}
	}

	return result, nil
}
// Records returns the list of records.