Skip to content

Commit 13b5cb5

Browse files
committed
directadmin: update documentation
1 parent 5bea707 commit 13b5cb5

File tree

6 files changed

+29
-24
lines changed

6 files changed

+29
-24
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Detailed documentation is available [here](https://go-acme.github.io/lego/dns).
6060
| [Cloud.ru](https://go-acme.github.io/lego/dns/cloudru/) | [CloudDNS](https://go-acme.github.io/lego/dns/clouddns/) | [Cloudflare](https://go-acme.github.io/lego/dns/cloudflare/) | [ClouDNS](https://go-acme.github.io/lego/dns/cloudns/) |
6161
| [CloudXNS](https://go-acme.github.io/lego/dns/cloudxns/) | [ConoHa](https://go-acme.github.io/lego/dns/conoha/) | [Constellix](https://go-acme.github.io/lego/dns/constellix/) | [CPanel/WHM](https://go-acme.github.io/lego/dns/cpanel/) |
6262
| [Derak Cloud](https://go-acme.github.io/lego/dns/derak/) | [deSEC.io](https://go-acme.github.io/lego/dns/desec/) | [Designate DNSaaS for Openstack](https://go-acme.github.io/lego/dns/designate/) | [Digital Ocean](https://go-acme.github.io/lego/dns/digitalocean/) |
63-
| [directadmin](https://go-acme.github.io/lego/dns/directadmin/) | [DNS Made Easy](https://go-acme.github.io/lego/dns/dnsmadeeasy/) | [dnsHome.de](https://go-acme.github.io/lego/dns/dnshomede/) | [DNSimple](https://go-acme.github.io/lego/dns/dnsimple/) |
63+
| [DirectAdmin](https://go-acme.github.io/lego/dns/directadmin/) | [DNS Made Easy](https://go-acme.github.io/lego/dns/dnsmadeeasy/) | [dnsHome.de](https://go-acme.github.io/lego/dns/dnshomede/) | [DNSimple](https://go-acme.github.io/lego/dns/dnsimple/) |
6464
| [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/) |
6565
| [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/) |
6666
| [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/) |

cmd/zz_gen_cmd_dnshelp.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -736,9 +736,9 @@ func displayDNSHelp(w io.Writer, name string) error {
736736

737737
case "directadmin":
738738
// generated from: providers/dns/directadmin/directadmin.toml
739-
ew.writeln(`Configuration for directadmin.`)
739+
ew.writeln(`Configuration for DirectAdmin.`)
740740
ew.writeln(`Code: 'directadmin'`)
741-
ew.writeln(`Since: ''`)
741+
ew.writeln(`Since: 'v4.18.0'`)
742742
ew.writeln()
743743

744744
ew.writeln(`Credentials:`)
@@ -752,7 +752,7 @@ func displayDNSHelp(w io.Writer, name string) error {
752752
ew.writeln(` - "DIRECTADMIN_POLLING_INTERVAL": Time between DNS propagation check`)
753753
ew.writeln(` - "DIRECTADMIN_PROPAGATION_TIMEOUT": Maximum waiting time for DNS propagation`)
754754
ew.writeln(` - "DIRECTADMIN_TTL": The TTL of the TXT record used for the DNS challenge`)
755-
ew.writeln(` - "DIRECTADMIN_ZONE_NAME": API password`)
755+
ew.writeln(` - "DIRECTADMIN_ZONE_NAME": Zone name used to add the TXT record`)
756756

757757
ew.writeln()
758758
ew.writeln(`More information: https://go-acme.github.io/lego/dns/directadmin`)

docs/content/dns/zz_gen_directadmin.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
11
---
2-
title: "directadmin"
2+
title: "DirectAdmin"
33
date: 2019-03-03T16:39:46+01:00
44
draft: false
55
slug: directadmin
66
dnsprovider:
7-
since: ""
7+
since: "v4.18.0"
88
code: "directadmin"
9-
url: "directadmin"
9+
url: "https://www.directadmin.com"
1010
---
1111

1212
<!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. -->
1313
<!-- providers/dns/directadmin/directadmin.toml -->
1414
<!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. -->
1515

16-
directadmin api
16+
17+
Configuration for [DirectAdmin](https://www.directadmin.com).
1718

1819

1920
<!--more-->
2021

2122
- Code: `directadmin`
22-
- Since:
23+
- Since: v4.18.0
2324

2425

25-
Here is an example bash command using the directadmin provider:
26+
Here is an example bash command using the DirectAdmin provider:
2627

2728
```bash
2829
DIRECTADMIN_API_URL="http://example.com:2222" \
2930
DIRECTADMIN_USERNAME=xxxx \
3031
DIRECTADMIN_PASSWORD=yyy \
31-
lego --email [email protected] --dns directadmin -d "my.example.org" -d "*.example.org" run
32+
lego --email [email protected] --dns directadmin --domains my.example.org run
3233
```
3334

3435

@@ -54,7 +55,7 @@ More information [here]({{< ref "dns#configuration-and-credentials" >}}).
5455
| `DIRECTADMIN_POLLING_INTERVAL` | Time between DNS propagation check |
5556
| `DIRECTADMIN_PROPAGATION_TIMEOUT` | Maximum waiting time for DNS propagation |
5657
| `DIRECTADMIN_TTL` | The TTL of the TXT record used for the DNS challenge |
57-
| `DIRECTADMIN_ZONE_NAME` | API password |
58+
| `DIRECTADMIN_ZONE_NAME` | Zone name used to add the TXT record |
5859

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

providers/dns/directadmin/directadmin.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ func NewDNSProviderConfig(config *Config) (*DNSProvider, error) {
9292
return nil, fmt.Errorf("directadmin: %w", err)
9393
}
9494

95+
if config.HTTPClient != nil {
96+
client.HTTPClient = config.HTTPClient
97+
}
98+
9599
return &DNSProvider{client: client, config: config}, nil
96100
}
97101

providers/dns/directadmin/directadmin.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
Name = "directadmin"
2-
Description = '''directadmin api'''
3-
URL = "directadmin"
1+
Name = "DirectAdmin"
2+
Description = ''''''
3+
URL = "https://www.directadmin.com"
44
Code = "directadmin"
5-
5+
Since = "v4.18.0"
66

77
Example = '''
88
DIRECTADMIN_API_URL="http://example.com:2222" \
99
DIRECTADMIN_USERNAME=xxxx \
1010
DIRECTADMIN_PASSWORD=yyy \
11-
lego --email [email protected] --dns directadmin -d "my.example.org" -d "*.example.org" run
11+
lego --email [email protected] --dns directadmin --domains my.example.org run
1212
'''
1313

1414
[Configuration]
@@ -17,7 +17,7 @@ lego --email [email protected] --dns directadmin -d "my.example.org" -d "*.example
1717
DIRECTADMIN_USERNAME = "API username"
1818
DIRECTADMIN_PASSWORD = "API password"
1919
[Configuration.Additional]
20-
DIRECTADMIN_ZONE_NAME = "API password"
20+
DIRECTADMIN_ZONE_NAME = "Zone name used to add the TXT record"
2121
DIRECTADMIN_POLLING_INTERVAL = "Time between DNS propagation check"
2222
DIRECTADMIN_PROPAGATION_TIMEOUT = "Maximum waiting time for DNS propagation"
2323
DIRECTADMIN_TTL = "The TTL of the TXT record used for the DNS challenge"

providers/dns/directadmin/directadmin_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func TestNewDNSProvider(t *testing.T) {
2020
{
2121
desc: "success",
2222
envVars: map[string]string{
23-
EnvAPIURL: "https://exmaple.com:2222",
23+
EnvAPIURL: "https://example.com:2222",
2424
EnvUsername: "test",
2525
EnvPassword: "secret",
2626
},
@@ -41,15 +41,15 @@ func TestNewDNSProvider(t *testing.T) {
4141
{
4242
desc: "missing username",
4343
envVars: map[string]string{
44-
EnvAPIURL: "https://exmaple.com:2222",
44+
EnvAPIURL: "https://example.com:2222",
4545
EnvPassword: "secret",
4646
},
4747
expected: "directadmin: some credentials information are missing: DIRECTADMIN_USERNAME",
4848
},
4949
{
5050
desc: "missing password",
5151
envVars: map[string]string{
52-
EnvAPIURL: "https://exmaple.com:2222",
52+
EnvAPIURL: "https://example.com:2222",
5353
EnvUsername: "test",
5454
},
5555
expected: "directadmin: some credentials information are missing: DIRECTADMIN_PASSWORD",
@@ -87,7 +87,7 @@ func TestNewDNSProviderConfig(t *testing.T) {
8787
}{
8888
{
8989
desc: "success",
90-
baseURL: "https://api.directadmin.com",
90+
baseURL: "https://example.com",
9191
username: "test",
9292
password: "secret",
9393
},
@@ -97,12 +97,12 @@ func TestNewDNSProviderConfig(t *testing.T) {
9797
},
9898
{
9999
desc: "missing username",
100-
baseURL: "https://api.directadmin.com",
100+
baseURL: "https://example.com",
101101
expected: "directadmin: some credentials information are missing",
102102
},
103103
{
104104
desc: "missing password",
105-
baseURL: "https://api.directadmin.com",
105+
baseURL: "https://example.com",
106106
username: "test",
107107
expected: "directadmin: some credentials information are missing",
108108
},

0 commit comments

Comments
 (0)