directadmin: update documentation

This commit is contained in:
Fernandez Ludovic 2024-07-21 21:19:57 +02:00
parent 5bea70766f
commit 13b5cb57f0
6 changed files with 29 additions and 24 deletions

View file

@ -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/) | | [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/) | | [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/) | | [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/) | | [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/) | | [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/) | | [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/) |

View file

@ -736,9 +736,9 @@ func displayDNSHelp(w io.Writer, name string) error {
case "directadmin": case "directadmin":
// generated from: providers/dns/directadmin/directadmin.toml // generated from: providers/dns/directadmin/directadmin.toml
ew.writeln(`Configuration for directadmin.`) ew.writeln(`Configuration for DirectAdmin.`)
ew.writeln(`Code: 'directadmin'`) ew.writeln(`Code: 'directadmin'`)
ew.writeln(`Since: ''`) ew.writeln(`Since: 'v4.18.0'`)
ew.writeln() ew.writeln()
ew.writeln(`Credentials:`) ew.writeln(`Credentials:`)
@ -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_POLLING_INTERVAL": Time between DNS propagation check`)
ew.writeln(` - "DIRECTADMIN_PROPAGATION_TIMEOUT": Maximum waiting time for DNS propagation`) 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_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()
ew.writeln(`More information: https://go-acme.github.io/lego/dns/directadmin`) ew.writeln(`More information: https://go-acme.github.io/lego/dns/directadmin`)

View file

@ -1,34 +1,35 @@
--- ---
title: "directadmin" title: "DirectAdmin"
date: 2019-03-03T16:39:46+01:00 date: 2019-03-03T16:39:46+01:00
draft: false draft: false
slug: directadmin slug: directadmin
dnsprovider: dnsprovider:
since: "" since: "v4.18.0"
code: "directadmin" code: "directadmin"
url: "directadmin" url: "https://www.directadmin.com"
--- ---
<!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. --> <!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. -->
<!-- providers/dns/directadmin/directadmin.toml --> <!-- providers/dns/directadmin/directadmin.toml -->
<!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. --> <!-- THIS DOCUMENTATION IS AUTO-GENERATED. PLEASE DO NOT EDIT. -->
directadmin api
Configuration for [DirectAdmin](https://www.directadmin.com).
<!--more--> <!--more-->
- Code: `directadmin` - 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 ```bash
DIRECTADMIN_API_URL="http://example.com:2222" \ DIRECTADMIN_API_URL="http://example.com:2222" \
DIRECTADMIN_USERNAME=xxxx \ DIRECTADMIN_USERNAME=xxxx \
DIRECTADMIN_PASSWORD=yyy \ 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
``` ```
@ -54,7 +55,7 @@ More information [here]({{< ref "dns#configuration-and-credentials" >}}).
| `DIRECTADMIN_POLLING_INTERVAL` | Time between DNS propagation check | | `DIRECTADMIN_POLLING_INTERVAL` | Time between DNS propagation check |
| `DIRECTADMIN_PROPAGATION_TIMEOUT` | Maximum waiting time for DNS propagation | | `DIRECTADMIN_PROPAGATION_TIMEOUT` | Maximum waiting time for DNS propagation |
| `DIRECTADMIN_TTL` | The TTL of the TXT record used for the DNS challenge | | `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. 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" >}}). More information [here]({{< ref "dns#configuration-and-credentials" >}}).

View file

@ -92,6 +92,10 @@ func NewDNSProviderConfig(config *Config) (*DNSProvider, error) {
return nil, fmt.Errorf("directadmin: %w", err) return nil, fmt.Errorf("directadmin: %w", err)
} }
if config.HTTPClient != nil {
client.HTTPClient = config.HTTPClient
}
return &DNSProvider{client: client, config: config}, nil return &DNSProvider{client: client, config: config}, nil
} }

View file

@ -1,14 +1,14 @@
Name = "directadmin" Name = "DirectAdmin"
Description = '''directadmin api''' Description = ''''''
URL = "directadmin" URL = "https://www.directadmin.com"
Code = "directadmin" Code = "directadmin"
Since = "v4.18.0"
Example = ''' Example = '''
DIRECTADMIN_API_URL="http://example.com:2222" \ DIRECTADMIN_API_URL="http://example.com:2222" \
DIRECTADMIN_USERNAME=xxxx \ DIRECTADMIN_USERNAME=xxxx \
DIRECTADMIN_PASSWORD=yyy \ 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] [Configuration]
@ -17,7 +17,7 @@ lego --email you@example.com --dns directadmin -d "my.example.org" -d "*.example
DIRECTADMIN_USERNAME = "API username" DIRECTADMIN_USERNAME = "API username"
DIRECTADMIN_PASSWORD = "API password" DIRECTADMIN_PASSWORD = "API password"
[Configuration.Additional] [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_POLLING_INTERVAL = "Time between DNS propagation check"
DIRECTADMIN_PROPAGATION_TIMEOUT = "Maximum waiting time for DNS propagation" DIRECTADMIN_PROPAGATION_TIMEOUT = "Maximum waiting time for DNS propagation"
DIRECTADMIN_TTL = "The TTL of the TXT record used for the DNS challenge" DIRECTADMIN_TTL = "The TTL of the TXT record used for the DNS challenge"

View file

@ -20,7 +20,7 @@ func TestNewDNSProvider(t *testing.T) {
{ {
desc: "success", desc: "success",
envVars: map[string]string{ envVars: map[string]string{
EnvAPIURL: "https://exmaple.com:2222", EnvAPIURL: "https://example.com:2222",
EnvUsername: "test", EnvUsername: "test",
EnvPassword: "secret", EnvPassword: "secret",
}, },
@ -41,7 +41,7 @@ func TestNewDNSProvider(t *testing.T) {
{ {
desc: "missing username", desc: "missing username",
envVars: map[string]string{ envVars: map[string]string{
EnvAPIURL: "https://exmaple.com:2222", EnvAPIURL: "https://example.com:2222",
EnvPassword: "secret", EnvPassword: "secret",
}, },
expected: "directadmin: some credentials information are missing: DIRECTADMIN_USERNAME", expected: "directadmin: some credentials information are missing: DIRECTADMIN_USERNAME",
@ -49,7 +49,7 @@ func TestNewDNSProvider(t *testing.T) {
{ {
desc: "missing password", desc: "missing password",
envVars: map[string]string{ envVars: map[string]string{
EnvAPIURL: "https://exmaple.com:2222", EnvAPIURL: "https://example.com:2222",
EnvUsername: "test", EnvUsername: "test",
}, },
expected: "directadmin: some credentials information are missing: DIRECTADMIN_PASSWORD", expected: "directadmin: some credentials information are missing: DIRECTADMIN_PASSWORD",
@ -87,7 +87,7 @@ func TestNewDNSProviderConfig(t *testing.T) {
}{ }{
{ {
desc: "success", desc: "success",
baseURL: "https://api.directadmin.com", baseURL: "https://example.com",
username: "test", username: "test",
password: "secret", password: "secret",
}, },
@ -97,12 +97,12 @@ func TestNewDNSProviderConfig(t *testing.T) {
}, },
{ {
desc: "missing username", desc: "missing username",
baseURL: "https://api.directadmin.com", baseURL: "https://example.com",
expected: "directadmin: some credentials information are missing", expected: "directadmin: some credentials information are missing",
}, },
{ {
desc: "missing password", desc: "missing password",
baseURL: "https://api.directadmin.com", baseURL: "https://example.com",
username: "test", username: "test",
expected: "directadmin: some credentials information are missing", expected: "directadmin: some credentials information are missing",
}, },