provider/cloudflare.go
func (p *CloudFlareProvider) Records() ([]*endpoint.Endpoint, error) {
	zones, err := p.Zones()
	if err != nil {
		return nil, err
	}

	endpoints := []*endpoint.Endpoint{}
	for _, zone := range zones {
		records, err := p.Client.DNSRecords(zone.ID, cloudflare.DNSRecord{})
		if err != nil {
			return nil, err
		}

		for _, r := range records {
			if supportedRecordType(r.Type) {
				endpoints = append(endpoints, endpoint.NewEndpointWithTTL(r.Name, r.Type, endpoint.TTL(r.TTL), r.Content).WithProviderSpecific(source.CloudflareProxiedKey, strconv.FormatBool(r.Proxied)))
			}
		}
	}

	return endpoints, nil
}
func (p *CloudFlareProvider) Records() ([]*endpoint.Endpoint, error) {
	zones, err := p.Zones()
	if err != nil {
		return nil, err
	}

	endpoints := []*endpoint.Endpoint{}
	for _, zone := range zones {
		records, err := p.Client.DNSRecords(zone.ID, cloudflare.DNSRecord{})
		if err != nil {
			return nil, err
		}

		for _, r := range records {
			if supportedRecordType(r.Type) {
				endpoints = append(endpoints, endpoint.NewEndpointWithTTL(r.Name, r.Type, endpoint.TTL(r.TTL), r.Content).WithProviderSpecific(source.CloudflareProxiedKey, strconv.FormatBool(r.Proxied)))
			}
		}
	}

	return endpoints, nil
}
func ( p * CloudFlareProvider ) Records ( ) ( [ ] * endpoint . Endpoint , error ) { zones , err := p . Zones ( ) if err != nil { return nil , err } endpoints := [ ] * endpoint . Endpoint { } for _ , zone := range zones { records , err := p . Client . DNSRecords ( zone . ID , cloudflare . DNSRecord { } ) if err != nil { return nil , err } for _ , r := range records { if supportedRecordType ( r . Type ) { endpoints = append ( endpoints , endpoint . NewEndpointWithTTL ( r . Name , r . Type , endpoint . TTL ( r . TTL ) , r . Content ) . WithProviderSpecific ( source . CloudflareProxiedKey , strconv . FormatBool ( r . Proxied ) ) ) } } } return endpoints , nil }
// Records returns the list of records.
Records returns the list of records .