1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Be more consistent in API handle variable names (#911)

This commit is contained in:
Tom Limoncelli
2020-10-25 12:58:43 -04:00
committed by GitHub
parent 2b50af0cbc
commit d56a8307f3
21 changed files with 183 additions and 183 deletions

View File

@ -43,8 +43,8 @@ var allowedTTLValues = []uint32{
var srvRegexp = regexp.MustCompile(`^_(?P<Service>\w+)\.\_(?P<Protocol>\w+)$`)
// LinodeAPI is the handle for this provider.
type LinodeAPI struct {
// linodeAPI is the handle for this provider.
type linodeAPI struct {
client *http.Client
baseURL *url.URL
domainIndex map[string]int
@ -75,7 +75,7 @@ func NewLinode(m map[string]string, metadata json.RawMessage) (providers.DNSServ
return nil, fmt.Errorf("invalid base URL for Linode")
}
api := &LinodeAPI{client: client, baseURL: baseURL}
api := &linodeAPI{client: client, baseURL: baseURL}
// Get a domain to validate the token
if err := api.fetchDomainList(); err != nil {
@ -97,12 +97,12 @@ func init() {
}
// GetNameservers returns the nameservers for a domain.
func (api *LinodeAPI) GetNameservers(domain string) ([]*models.Nameserver, error) {
func (api *linodeAPI) GetNameservers(domain string) ([]*models.Nameserver, error) {
return models.ToNameservers(defaultNameServerNames)
}
// GetZoneRecords gets the records of a zone and returns them in RecordConfig format.
func (api *LinodeAPI) GetZoneRecords(domain string) (models.Records, error) {
func (api *linodeAPI) GetZoneRecords(domain string) (models.Records, error) {
return nil, fmt.Errorf("not implemented")
// This enables the get-zones subcommand.
// Implement this by extracting the code from GetDomainCorrections into
@ -110,7 +110,7 @@ func (api *LinodeAPI) GetZoneRecords(domain string) (models.Records, error) {
}
// GetDomainCorrections returns the corrections for a domain.
func (api *LinodeAPI) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
func (api *linodeAPI) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
dc, err := dc.Copy()
if err != nil {
return nil, err