Skip to content

Commit

Permalink
Merge branch 'master' into feature/s3-as-http-provider
Browse files Browse the repository at this point in the history
  • Loading branch information
kingcdavid authored Jul 25, 2023
2 parents 5b6f3c2 + f6aad43 commit f130bd6
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Detailed documentation is available [here](https://go-acme.github.io/lego/dns).
| [DNSimple](https://go-acme.github.io/lego/dns/dnsimple/) | [DNSPod (deprecated)](https://go-acme.github.io/lego/dns/dnspod/) | [Domain Offensive (do.de)](https://go-acme.github.io/lego/dns/dode/) | [Domeneshop](https://go-acme.github.io/lego/dns/domeneshop/) |
| [DreamHost](https://go-acme.github.io/lego/dns/dreamhost/) | [Duck DNS](https://go-acme.github.io/lego/dns/duckdns/) | [Dyn](https://go-acme.github.io/lego/dns/dyn/) | [Dynu](https://go-acme.github.io/lego/dns/dynu/) |
| [EasyDNS](https://go-acme.github.io/lego/dns/easydns/) | [Efficient IP](https://go-acme.github.io/lego/dns/efficientip/) | [Epik](https://go-acme.github.io/lego/dns/epik/) | [Exoscale](https://go-acme.github.io/lego/dns/exoscale/) |
| [External program](https://go-acme.github.io/lego/dns/exec/) | [freemyip.com](https://go-acme.github.io/lego/dns/freemyip/) | [G-Core Labs](https://go-acme.github.io/lego/dns/gcore/) | [Gandi Live DNS (v5)](https://go-acme.github.io/lego/dns/gandiv5/) |
| [External program](https://go-acme.github.io/lego/dns/exec/) | [freemyip.com](https://go-acme.github.io/lego/dns/freemyip/) | [G-Core](https://go-acme.github.io/lego/dns/gcore/) | [Gandi Live DNS (v5)](https://go-acme.github.io/lego/dns/gandiv5/) |
| [Gandi](https://go-acme.github.io/lego/dns/gandi/) | [Glesys](https://go-acme.github.io/lego/dns/glesys/) | [Go Daddy](https://go-acme.github.io/lego/dns/godaddy/) | [Google Cloud](https://go-acme.github.io/lego/dns/gcloud/) |
| [Google Domains](https://go-acme.github.io/lego/dns/googledomains/) | [Hetzner](https://go-acme.github.io/lego/dns/hetzner/) | [Hosting.de](https://go-acme.github.io/lego/dns/hostingde/) | [Hosttech](https://go-acme.github.io/lego/dns/hosttech/) |
| [HTTP request](https://go-acme.github.io/lego/dns/httpreq/) | [Hurricane Electric DNS](https://go-acme.github.io/lego/dns/hurricane/) | [HyperOne](https://go-acme.github.io/lego/dns/hyperone/) | [IBM Cloud (SoftLayer)](https://go-acme.github.io/lego/dns/ibmcloud/) |
Expand Down
4 changes: 2 additions & 2 deletions cmd/zz_gen_cmd_dnshelp.go
Original file line number Diff line number Diff line change
Expand Up @@ -1082,13 +1082,13 @@ func displayDNSHelp(w io.Writer, name string) error {

case "gcore":
// generated from: providers/dns/gcore/gcore.toml
ew.writeln(`Configuration for G-Core Labs.`)
ew.writeln(`Configuration for G-Core.`)
ew.writeln(`Code: 'gcore'`)
ew.writeln(`Since: 'v4.5.0'`)
ew.writeln()

ew.writeln(`Credentials:`)
ew.writeln(` - "GCORE_PERMANENT_API_TOKEN": Permanent API tokene (https://gcorelabs.com/blog/permanent-api-token-explained/)`)
ew.writeln(` - "GCORE_PERMANENT_API_TOKEN": Permanent API token (https://gcore.com/blog/permanent-api-token-explained/)`)
ew.writeln()

ew.writeln(`Additional Configuration:`)
Expand Down
12 changes: 6 additions & 6 deletions docs/content/dns/zz_gen_gcore.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
---
title: "G-Core Labs"
title: "G-Core"
date: 2019-03-03T16:39:46+01:00
draft: false
slug: gcore
dnsprovider:
since: "v4.5.0"
code: "gcore"
url: "https://gcorelabs.com/dns/"
url: "https://gcore.com/dns/"
---

<!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. -->
<!-- providers/dns/gcore/gcore.toml -->
<!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. -->


Configuration for [G-Core Labs](https://gcorelabs.com/dns/).
Configuration for [G-Core](https://gcore.com/dns/).


<!--more-->
Expand All @@ -23,7 +23,7 @@ Configuration for [G-Core Labs](https://gcorelabs.com/dns/).
- Since: v4.5.0


Here is an example bash command using the G-Core Labs provider:
Here is an example bash command using the G-Core provider:

```bash
GCORE_PERMANENT_API_TOKEN=xxxxx \
Expand All @@ -37,7 +37,7 @@ lego --email [email protected] --dns gcore --domains my.example.org run

| Environment Variable Name | Description |
|-----------------------|-------------|
| `GCORE_PERMANENT_API_TOKEN` | Permanent API tokene (https://gcorelabs.com/blog/permanent-api-token-explained/) |
| `GCORE_PERMANENT_API_TOKEN` | Permanent API token (https://gcore.com/blog/permanent-api-token-explained/) |

The environment variable names can be suffixed by `_FILE` to reference a file instead of a value.
More information [here]({{< ref "dns#configuration-and-credentials" >}}).
Expand All @@ -60,7 +60,7 @@ More information [here]({{< ref "dns#configuration-and-credentials" >}}).

## More information

- [API documentation](https://dnsapi.gcorelabs.com/docs#tag/zonesV2)
- [API documentation](https://api.gcore.com/docs/dns#tag/zones)

<!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. -->
<!-- providers/dns/gcore/gcore.toml -->
Expand Down
6 changes: 3 additions & 3 deletions providers/dns/azuredns/azuredns.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ func NewDNSProvider() (*DNSProvider, error) {
config.ResourceGroup = env.GetOrFile(EnvResourceGroup)
config.PrivateZone = env.GetOrDefaultBool(EnvPrivateZone, false)

config.ClientID = env.GetOrFile(EnvTenantID)
config.ClientSecret = env.GetOrFile(EnvClientID)
config.TenantID = env.GetOrFile(EnvClientSecret)
config.ClientID = env.GetOrFile(EnvClientID)
config.ClientSecret = env.GetOrFile(EnvClientSecret)
config.TenantID = env.GetOrFile(EnvTenantID)

return NewDNSProviderConfig(config)
}
Expand Down
4 changes: 2 additions & 2 deletions providers/dns/gcore/gcore.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ type DNSProvider struct {
client *internal.Client
}

// NewDNSProvider returns an instance of DNSProvider configured for G-Core Labs DNS API.
// NewDNSProvider returns an instance of DNSProvider configured for G-Core DNS API.
func NewDNSProvider() (*DNSProvider, error) {
values, err := env.Get(EnvPermanentAPIToken)
if err != nil {
Expand All @@ -70,7 +70,7 @@ func NewDNSProvider() (*DNSProvider, error) {
return NewDNSProviderConfig(config)
}

// NewDNSProviderConfig return a DNSProvider instance configured for G-Core Labs DNS API.
// NewDNSProviderConfig return a DNSProvider instance configured for G-Core DNS API.
func NewDNSProviderConfig(config *Config) (*DNSProvider, error) {
if config == nil {
return nil, errors.New("gcore: the configuration of the DNS provider is nil")
Expand Down
8 changes: 4 additions & 4 deletions providers/dns/gcore/gcore.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name = "G-Core Labs"
Name = "G-Core"
Description = ''''''
URL = "https://gcorelabs.com/dns/"
URL = "https://gcore.com/dns/"
Code = "gcore"
Since = "v4.5.0"

Expand All @@ -11,12 +11,12 @@ lego --email [email protected] --dns gcore --domains my.example.org run

[Configuration]
[Configuration.Credentials]
GCORE_PERMANENT_API_TOKEN = "Permanent API tokene (https://gcorelabs.com/blog/permanent-api-token-explained/)"
GCORE_PERMANENT_API_TOKEN = "Permanent API token (https://gcore.com/blog/permanent-api-token-explained/)"
[Configuration.Additional]
GCORE_POLLING_INTERVAL = "Time between DNS propagation check"
GCORE_PROPAGATION_TIMEOUT = "Maximum waiting time for DNS propagation"
GCORE_TTL = "The TTL of the TXT record used for the DNS challenge"
GCORE_HTTP_TIMEOUT = "API request timeout"

[Links]
API = "https://dnsapi.gcorelabs.com/docs#tag/zonesV2"
API = "https://api.gcore.com/docs/dns#tag/zones"
12 changes: 6 additions & 6 deletions providers/dns/gcore/internal/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/go-acme/lego/v4/providers/dns/internal/errutils"
)

const defaultBaseURL = "https://api.gcorelabs.com/dns"
const defaultBaseURL = "https://api.gcore.com/dns"

const (
authorizationHeader = "Authorization"
Expand Down Expand Up @@ -43,7 +43,7 @@ func NewClient(token string) *Client {
}

// GetZone gets zone information.
// https://dnsapi.gcorelabs.com/docs#operation/Zone
// https://api.gcore.com/docs/dns#tag/zones/operation/Zone
func (c *Client) GetZone(ctx context.Context, name string) (Zone, error) {
endpoint := c.baseURL.JoinPath("v2", "zones", name)

Expand All @@ -57,7 +57,7 @@ func (c *Client) GetZone(ctx context.Context, name string) (Zone, error) {
}

// GetRRSet gets RRSet item.
// https://dnsapi.gcorelabs.com/docs#operation/RRSet
// https://api.gcore.com/docs/dns#tag/rrsets/operation/RRSet
func (c *Client) GetRRSet(ctx context.Context, zone, name string) (RRSet, error) {
endpoint := c.baseURL.JoinPath("v2", "zones", zone, name, txtRecordType)

Expand All @@ -71,7 +71,7 @@ func (c *Client) GetRRSet(ctx context.Context, zone, name string) (RRSet, error)
}

// DeleteRRSet removes RRSet record.
// https://dnsapi.gcorelabs.com/docs#operation/DeleteRRSet
// https://api.gcore.com/docs/dns#tag/rrsets/operation/DeleteRRSet
func (c *Client) DeleteRRSet(ctx context.Context, zone, name string) error {
endpoint := c.baseURL.JoinPath("v2", "zones", zone, name, txtRecordType)

Expand Down Expand Up @@ -102,14 +102,14 @@ func (c *Client) AddRRSet(ctx context.Context, zone, recordName, value string, t
return c.createRRSet(ctx, zone, recordName, record)
}

// https://dnsapi.gcorelabs.com/docs#operation/CreateRRSet
// https://api.gcore.com/docs/dns#tag/rrsets/operation/CreateRRSet
func (c *Client) createRRSet(ctx context.Context, zone, name string, record RRSet) error {
endpoint := c.baseURL.JoinPath("v2", "zones", zone, name, txtRecordType)

return c.doRequest(ctx, http.MethodPost, endpoint, record, nil)
}

// https://dnsapi.gcorelabs.com/docs#operation/UpdateRRSet
// https://api.gcore.com/docs/dns#tag/rrsets/operation/UpdateRRSet
func (c *Client) updateRRSet(ctx context.Context, zone, name string, record RRSet) error {
endpoint := c.baseURL.JoinPath("v2", "zones", zone, name, txtRecordType)

Expand Down

0 comments on commit f130bd6

Please sign in to comment.