From f37bb2e7dcc253134ab4105e8938fd7bad5a02f4 Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Wed, 1 Jun 2022 12:09:35 +0400 Subject: [PATCH] dns_da --- backend/internal/dnsproviders/common.go | 1 + backend/internal/dnsproviders/dns_da.go | 42 +++++++++++++++++++++++++ frontend/src/locale/src/en.json | 3 ++ 3 files changed, 46 insertions(+) create mode 100644 backend/internal/dnsproviders/dns_da.go diff --git a/backend/internal/dnsproviders/common.go b/backend/internal/dnsproviders/common.go index cab6187d..116036bc 100644 --- a/backend/internal/dnsproviders/common.go +++ b/backend/internal/dnsproviders/common.go @@ -47,6 +47,7 @@ func List() []Provider { getDNSCyon(), getDNSDgon(), getDNSDNSimple(), + getDNSDa(), getDNSDp(), getDNSDreamhost(), getDNSDuckDNS(), diff --git a/backend/internal/dnsproviders/dns_da.go b/backend/internal/dnsproviders/dns_da.go new file mode 100644 index 00000000..91fc73c0 --- /dev/null +++ b/backend/internal/dnsproviders/dns_da.go @@ -0,0 +1,42 @@ +package dnsproviders + +const daSchema = ` +{ + "type": "object", + "required": [ + "api_url" + ], + "additionalProperties": false, + "properties": { + "api_url": { + "type": "string", + "minLength": 4 + }, + "insecure": { + "type": "boolean" + } + } +} +` + +func getDNSDa() Provider { + return Provider{ + AcmeshName: "dns_da", + Schema: daSchema, + Fields: []providerField{ + { + Name: "API URL", + Type: "text", + MetaKey: "api_url", + EnvKey: "DA_Api", + IsRequired: true, + }, + { + Name: "Insecure", + Type: "boolean", + MetaKey: "insecure", + EnvKey: "DA_Api_Insecure", + }, + }, + } +} diff --git a/frontend/src/locale/src/en.json b/frontend/src/locale/src/en.json index 9882cfff..b193b18c 100644 --- a/frontend/src/locale/src/en.json +++ b/frontend/src/locale/src/en.json @@ -29,6 +29,9 @@ "acmesh.dns_cyon": { "defaultMessage": "Cyon.ch" }, + "acmesh.dns_da": { + "defaultMessage": "DirectAdmin" + }, "acmesh.dns_dgon": { "defaultMessage": "DigitalOcean" },