provider/exoscale.go
func (ep *ExoscaleProvider) Records() ([]*endpoint.Endpoint, error) {
	endpoints := make([]*endpoint.Endpoint, 0)

	domains, err := ep.client.GetDomains()
	if err != nil {
		return nil, err
	}

	for _, d := range domains {
		record, err := ep.client.GetRecords(d.Name)
		if err != nil {
			return nil, err
		}
		for _, r := range record {
			switch r.RecordType {
			case egoscale.A.String(), egoscale.CNAME.String(), egoscale.TXT.String():
				break
			default:
				continue
			}
			ep := endpoint.NewEndpointWithTTL(r.Name+"."+d.Name, r.RecordType, endpoint.TTL(r.TTL), r.Content)
			endpoints = append(endpoints, ep)
		}
	}

	log.Infof("called Records() with %d items", len(endpoints))
	return endpoints, nil
}
func (ep *ExoscaleProvider) Records() ([]*endpoint.Endpoint, error) {
	endpoints := make([]*endpoint.Endpoint, 0)

	domains, err := ep.client.GetDomains()
	if err != nil {
		return nil, err
	}

	for _, d := range domains {
		record, err := ep.client.GetRecords(d.Name)
		if err != nil {
			return nil, err
		}
		for _, r := range record {
			switch r.RecordType {
			case egoscale.A.String(), egoscale.CNAME.String(), egoscale.TXT.String():
				break
			default:
				continue
			}
			ep := endpoint.NewEndpointWithTTL(r.Name+"."+d.Name, r.RecordType, endpoint.TTL(r.TTL), r.Content)
			endpoints = append(endpoints, ep)
		}
	}

	log.Infof("called Records() with %d items", len(endpoints))
	return endpoints, nil
}
func ( ep * ExoscaleProvider ) Records ( ) ( [ ] * endpoint . Endpoint , error ) { endpoints := make ( [ ] * endpoint . Endpoint , 0 ) domains , err := ep . client . GetDomains ( ) if err != nil { return nil , err } for _ , d := range domains { record , err := ep . client . GetRecords ( d . Name ) if err != nil { return nil , err } for _ , r := range record { switch r . RecordType { case egoscale . A . String ( ) , egoscale . CNAME . String ( ) , egoscale . TXT . String ( ) : break default : continue } ep := endpoint . NewEndpointWithTTL ( r . Name + " " + d . Name , r . RecordType , endpoint . TTL ( r . TTL ) , r . Content ) endpoints = append ( endpoints , ep ) } } log . Infof ( " " , len ( endpoints ) ) return endpoints , nil }
// Records returns the list of endpoints
Records returns the list of endpoints