Skip to content

Commit

Permalink
directadmin: update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Jul 21, 2024
1 parent 5bea707 commit 13b5cb5
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Detailed documentation is available [here](https://go-acme.github.io/lego/dns).
| [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/) |
| [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/) |
| [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/) |
| [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/) |
| [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/) |
| [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/) |
Expand Down
6 changes: 3 additions & 3 deletions cmd/zz_gen_cmd_dnshelp.go
Original file line number Diff line number Diff line change
Expand Up @@ -736,9 +736,9 @@ func displayDNSHelp(w io.Writer, name string) error {

case "directadmin":
// generated from: providers/dns/directadmin/directadmin.toml
ew.writeln(`Configuration for directadmin.`)
ew.writeln(`Configuration for DirectAdmin.`)
ew.writeln(`Code: 'directadmin'`)
ew.writeln(`Since: ''`)
ew.writeln(`Since: 'v4.18.0'`)
ew.writeln()

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

ew.writeln()
ew.writeln(`More information: https://go-acme.github.io/lego/dns/directadmin`)
Expand Down
17 changes: 9 additions & 8 deletions docs/content/dns/zz_gen_directadmin.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@
---
title: "directadmin"
title: "DirectAdmin"
date: 2019-03-03T16:39:46+01:00
draft: false
slug: directadmin
dnsprovider:
since: ""
since: "v4.18.0"
code: "directadmin"
url: "directadmin"
url: "https://www.directadmin.com"
---

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

directadmin api

Configuration for [DirectAdmin](https://www.directadmin.com).


<!--more-->

- Code: `directadmin`
- Since:
- Since: v4.18.0


Here is an example bash command using the directadmin provider:
Here is an example bash command using the DirectAdmin provider:

```bash
DIRECTADMIN_API_URL="http://example.com:2222" \
DIRECTADMIN_USERNAME=xxxx \
DIRECTADMIN_PASSWORD=yyy \
lego --email you@example.com --dns directadmin -d "my.example.org" -d "*.example.org" run
lego --email you@example.com --dns directadmin --domains my.example.org run
```


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

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 Down
4 changes: 4 additions & 0 deletions providers/dns/directadmin/directadmin.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ func NewDNSProviderConfig(config *Config) (*DNSProvider, error) {
return nil, fmt.Errorf("directadmin: %w", err)
}

if config.HTTPClient != nil {
client.HTTPClient = config.HTTPClient
}

return &DNSProvider{client: client, config: config}, nil
}

Expand Down
12 changes: 6 additions & 6 deletions providers/dns/directadmin/directadmin.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Name = "directadmin"
Description = '''directadmin api'''
URL = "directadmin"
Name = "DirectAdmin"
Description = ''''''
URL = "https://www.directadmin.com"
Code = "directadmin"

Since = "v4.18.0"

Example = '''
DIRECTADMIN_API_URL="http://example.com:2222" \
DIRECTADMIN_USERNAME=xxxx \
DIRECTADMIN_PASSWORD=yyy \
lego --email you@example.com --dns directadmin -d "my.example.org" -d "*.example.org" run
lego --email you@example.com --dns directadmin --domains my.example.org run
'''

[Configuration]
Expand All @@ -17,7 +17,7 @@ lego --email you@example.com --dns directadmin -d "my.example.org" -d "*.example
DIRECTADMIN_USERNAME = "API username"
DIRECTADMIN_PASSWORD = "API password"
[Configuration.Additional]
DIRECTADMIN_ZONE_NAME = "API password"
DIRECTADMIN_ZONE_NAME = "Zone name used to add the TXT record"
DIRECTADMIN_POLLING_INTERVAL = "Time between DNS propagation check"
DIRECTADMIN_PROPAGATION_TIMEOUT = "Maximum waiting time for DNS propagation"
DIRECTADMIN_TTL = "The TTL of the TXT record used for the DNS challenge"
Expand Down
12 changes: 6 additions & 6 deletions providers/dns/directadmin/directadmin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func TestNewDNSProvider(t *testing.T) {
{
desc: "success",
envVars: map[string]string{
EnvAPIURL: "https://exmaple.com:2222",
EnvAPIURL: "https://example.com:2222",
EnvUsername: "test",
EnvPassword: "secret",
},
Expand All @@ -41,15 +41,15 @@ func TestNewDNSProvider(t *testing.T) {
{
desc: "missing username",
envVars: map[string]string{
EnvAPIURL: "https://exmaple.com:2222",
EnvAPIURL: "https://example.com:2222",
EnvPassword: "secret",
},
expected: "directadmin: some credentials information are missing: DIRECTADMIN_USERNAME",
},
{
desc: "missing password",
envVars: map[string]string{
EnvAPIURL: "https://exmaple.com:2222",
EnvAPIURL: "https://example.com:2222",
EnvUsername: "test",
},
expected: "directadmin: some credentials information are missing: DIRECTADMIN_PASSWORD",
Expand Down Expand Up @@ -87,7 +87,7 @@ func TestNewDNSProviderConfig(t *testing.T) {
}{
{
desc: "success",
baseURL: "https://api.directadmin.com",
baseURL: "https://example.com",
username: "test",
password: "secret",
},
Expand All @@ -97,12 +97,12 @@ func TestNewDNSProviderConfig(t *testing.T) {
},
{
desc: "missing username",
baseURL: "https://api.directadmin.com",
baseURL: "https://example.com",
expected: "directadmin: some credentials information are missing",
},
{
desc: "missing password",
baseURL: "https://api.directadmin.com",
baseURL: "https://example.com",
username: "test",
expected: "directadmin: some credentials information are missing",
},
Expand Down

0 comments on commit 13b5cb5

Please sign in to comment.