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:
@ -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
|
||||
|
Reference in New Issue
Block a user