func (p *DigitalOceanProvider) Records() ([]*endpoint.Endpoint, error) {
	zones, err := p.Zones()
	if err != nil {
		return nil, err
	}
	endpoints := []*endpoint.Endpoint{}
	for _, zone := range zones {
		records, err := p.fetchRecords(zone.Name)
		if err != nil {
			return nil, err
		}

		for _, r := range records {
			if supportedRecordType(r.Type) {
				name := r.Name + "." + zone.Name

				// root name is identified by @ and should be
				// translated to zone name for the endpoint entry.
				if r.Name == "@" {
					name = zone.Name
				}

				endpoints = append(endpoints, endpoint.NewEndpoint(name, r.Type, r.Data))
			}
		}
	}

	return endpoints, nil
}
func (p *DigitalOceanProvider) Records() ([]*endpoint.Endpoint, error) {
	zones, err := p.Zones()
	if err != nil {
		return nil, err
	}
	endpoints := []*endpoint.Endpoint{}
	for _, zone := range zones {
		records, err := p.fetchRecords(zone.Name)
		if err != nil {
			return nil, err
		}

		for _, r := range records {
			if supportedRecordType(r.Type) {
				name := r.Name + "." + zone.Name

				
				
				if r.Name == "@" {
					name = zone.Name
				}

				endpoints = append(endpoints, endpoint.NewEndpoint(name, r.Type, r.Data))
			}
		}
	}

	return endpoints, nil
}
func ( p * DigitalOceanProvider ) Records ( ) ( [ ] * endpoint . Endpoint , error ) { zones , err := p . Zones ( ) if err != nil { return nil , err } endpoints := [ ] * endpoint . Endpoint { } for _ , zone := range zones { records , err := p . fetchRecords ( zone . Name ) if err != nil { return nil , err } for _ , r := range records { if supportedRecordType ( r . Type ) { name := r . Name + " " + zone . Name // root name is identified by @ and should be // translated to zone name for the endpoint entry. if r . Name == " " { name = zone . Name } endpoints = append ( endpoints , endpoint . NewEndpoint ( name , r . Type , r . Data ) ) } } } return endpoints , nil }
// Records returns the list of records in a given zone.
Records returns the list of records in a given zone .