Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,34 +245,34 @@ Detailed documentation is available [here](https://go-acme.github.io/lego/dns).
<td><a href="https://go-acme.github.io/lego/dns/safedns/">UKFast SafeDNS</a></td>
</tr><tr>
<td><a href="https://go-acme.github.io/lego/dns/ultradns/">Ultradns</a></td>
<td><a href="https://go-acme.github.io/lego/dns/uniteddomains/">United-Domains</a></td>
<td><a href="https://go-acme.github.io/lego/dns/variomedia/">Variomedia</a></td>
<td><a href="https://go-acme.github.io/lego/dns/vegadns/">VegaDNS</a></td>
<td><a href="https://go-acme.github.io/lego/dns/vercel/">Vercel</a></td>
</tr><tr>
<td><a href="https://go-acme.github.io/lego/dns/vercel/">Vercel</a></td>
<td><a href="https://go-acme.github.io/lego/dns/versio/">Versio.[nl|eu|uk]</a></td>
<td><a href="https://go-acme.github.io/lego/dns/vinyldns/">VinylDNS</a></td>
<td><a href="https://go-acme.github.io/lego/dns/vkcloud/">VK Cloud</a></td>
<td><a href="https://go-acme.github.io/lego/dns/volcengine/">Volcano Engine/火山引擎</a></td>
</tr><tr>
<td><a href="https://go-acme.github.io/lego/dns/volcengine/">Volcano Engine/火山引擎</a></td>
<td><a href="https://go-acme.github.io/lego/dns/vscale/">Vscale</a></td>
<td><a href="https://go-acme.github.io/lego/dns/vultr/">Vultr</a></td>
<td><a href="https://go-acme.github.io/lego/dns/webnamesca/">webnames.ca</a></td>
<td><a href="https://go-acme.github.io/lego/dns/webnames/">webnames.ru</a></td>
</tr><tr>
<td><a href="https://go-acme.github.io/lego/dns/webnames/">webnames.ru</a></td>
<td><a href="https://go-acme.github.io/lego/dns/websupport/">Websupport</a></td>
<td><a href="https://go-acme.github.io/lego/dns/wedos/">WEDOS</a></td>
<td><a href="https://go-acme.github.io/lego/dns/westcn/">West.cn/西部数码</a></td>
<td><a href="https://go-acme.github.io/lego/dns/yandex360/">Yandex 360</a></td>
</tr><tr>
<td><a href="https://go-acme.github.io/lego/dns/yandex360/">Yandex 360</a></td>
<td><a href="https://go-acme.github.io/lego/dns/yandexcloud/">Yandex Cloud</a></td>
<td><a href="https://go-acme.github.io/lego/dns/yandex/">Yandex PDD</a></td>
<td><a href="https://go-acme.github.io/lego/dns/zoneee/">Zone.ee</a></td>
<td><a href="https://go-acme.github.io/lego/dns/zoneedit/">ZoneEdit</a></td>
</tr><tr>
<td><a href="https://go-acme.github.io/lego/dns/zoneedit/">ZoneEdit</a></td>
<td><a href="https://go-acme.github.io/lego/dns/zonomi/">Zonomi</a></td>
<td></td>
<td></td>
<td></td>
</tr></table>

<!-- END DNS PROVIDERS LIST -->
Expand Down
21 changes: 21 additions & 0 deletions cmd/zz_gen_cmd_dnshelp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

67 changes: 67 additions & 0 deletions docs/content/dns/zz_gen_uniteddomains.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/data/zz_cli_help.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package internal
package ionos

import (
"bytes"
Expand All @@ -14,8 +14,10 @@ import (
querystring "github.com/google/go-querystring/query"
)

// defaultBaseURL represents the API endpoint to call.
const defaultBaseURL = "https://api.hosting.ionos.com/dns"
const (
DefaultIonosBaseURL = "https://api.hosting.ionos.com/dns"
DefaultUnitedDomainsBaseURL = "https://dnsapi.united-domains.de/dns"
)

// APIKeyHeader API key header.
const APIKeyHeader = "X-Api-Key"
Expand All @@ -30,7 +32,7 @@ type Client struct {

// NewClient creates a new Client.
func NewClient(apiKey string) (*Client, error) {
baseURL, err := url.Parse(defaultBaseURL)
baseURL, err := url.Parse(DefaultIonosBaseURL)
if err != nil {
return nil, err
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package internal
package ionos

import (
"net/http"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package internal
package ionos

import (
"fmt"
Expand Down
16 changes: 8 additions & 8 deletions providers/dns/ionos/ionos.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/internal/clientdebug"
"github.com/go-acme/lego/v4/providers/dns/ionos/internal"
"github.com/go-acme/lego/v4/providers/dns/internal/ionos"
)

// Environment variables names.
Expand Down Expand Up @@ -57,7 +57,7 @@ func NewDefaultConfig() *Config {
// DNSProvider implements the challenge.Provider interface.
type DNSProvider struct {
config *Config
client *internal.Client
client *ionos.Client
}

// NewDNSProvider returns a DNSProvider instance configured for Ionos.
Expand Down Expand Up @@ -88,7 +88,7 @@ func NewDNSProviderConfig(config *Config) (*DNSProvider, error) {
return nil, fmt.Errorf("ionos: invalid TTL, TTL (%d) must be greater than %d", config.TTL, minTTL)
}

client, err := internal.NewClient(config.APIKey)
client, err := ionos.NewClient(config.APIKey)
if err != nil {
return nil, fmt.Errorf("ionos: %w", err)
}
Expand Down Expand Up @@ -126,7 +126,7 @@ func (d *DNSProvider) Present(domain, _, keyAuth string) error {
return errors.New("ionos: no matching zone found for domain")
}

filter := &internal.RecordsFilter{
filter := &ionos.RecordsFilter{
Suffix: name,
RecordType: "TXT",
}
Expand All @@ -136,7 +136,7 @@ func (d *DNSProvider) Present(domain, _, keyAuth string) error {
return fmt.Errorf("ionos: failed to get records (zone=%s): %w", zone.ID, err)
}

records = append(records, internal.Record{
records = append(records, ionos.Record{
Name: name,
Content: info.Value,
TTL: d.config.TTL,
Expand Down Expand Up @@ -169,7 +169,7 @@ func (d *DNSProvider) CleanUp(domain, _, keyAuth string) error {
return errors.New("ionos: no matching zone found for domain")
}

filter := &internal.RecordsFilter{
filter := &ionos.RecordsFilter{
Suffix: name,
RecordType: "TXT",
}
Expand All @@ -193,8 +193,8 @@ func (d *DNSProvider) CleanUp(domain, _, keyAuth string) error {
return fmt.Errorf("ionos: failed to remove record, record not found (zone=%s, domain=%s, fqdn=%s, value=%s)", zone.ID, domain, info.EffectiveFQDN, info.Value)
}

func findZone(zones []internal.Zone, domain string) *internal.Zone {
var result *internal.Zone
func findZone(zones []ionos.Zone, domain string) *ionos.Zone {
var result *ionos.Zone

for _, zone := range zones {
if zone.Name != "" && strings.HasSuffix(domain, zone.Name) {
Expand Down
Loading