Refactor acme.sh dns providers

- updated chakra and typescript
- added locales for dns provider configs
This commit is contained in:
Jamie Curnow
2023-01-12 16:25:43 +10:00
parent 1d5d3ecd7a
commit 5d3bc0fabd
57 changed files with 2204 additions and 2161 deletions

View File

@ -1,36 +1,47 @@
package dnsproviders
import (
"encoding/json"
"errors"
"npm/internal/util"
)
// providerField should mimick jsonschema, so that
// the ui can render a field and validate it
// before we do.
// See: https://json-schema.org/draft/2020-12/json-schema-validation.html
type providerField struct {
Name string `json:"name"`
Type string `json:"type"`
IsRequired bool `json:"is_required"`
IsSecret bool `json:"is_secret"`
MetaKey string `json:"meta_key"`
EnvKey string `json:"-"` // not exposed in api
Title string `json:"title"`
Type string `json:"type"`
AdditionalProperties bool `json:"additionalProperties"`
Minimum int `json:"minimum,omitempty"`
Maximum int `json:"maximum,omitempty"`
MinLength int `json:"minLength,omitempty"`
MaxLength int `json:"maxLength,omitempty"`
Pattern string `json:"pattern,omitempty"`
IsSecret bool `json:"isSecret"` // Not valid jsonschema
}
// Provider is a simple struct
type Provider struct {
AcmeshName string `json:"acmesh_name"`
Schema string `json:"-"`
Fields []providerField `json:"fields"`
Title string `json:"title"`
Type string `json:"type"` // Should always be "object"
AdditionalProperties bool `json:"additionalProperties"`
MinProperties int `json:"minProperties,omitempty"`
Required []string `json:"required,omitempty"`
Properties map[string]providerField `json:"properties"`
}
// GetAcmeEnvVars will map the meta given to the env var required for
// acme.sh to use this dns provider
func (p *Provider) GetAcmeEnvVars(meta interface{}) map[string]string {
res := make(map[string]string)
for _, field := range p.Fields {
if acmeShEnvValue, found := util.FindItemInInterface(field.MetaKey, meta); found {
res[field.EnvKey] = acmeShEnvValue.(string)
}
}
return res
// GetJsonSchema encodes this object as JSON string
func (p *Provider) GetJsonSchema() (string, error) {
b, err := json.Marshal(p)
return string(b), err
}
// ConvertToUpdatable will manipulate this object so that it returns
// an updatable json schema
func (p *Provider) ConvertToUpdatable() {
p.MinProperties = 1
p.Required = nil
}
// List returns an array of providers
@ -89,7 +100,7 @@ func GetAll() map[string]Provider {
mp := make(map[string]Provider)
items := List()
for _, item := range items {
mp[item.AcmeshName] = item
mp[item.Title] = item
}
return mp
}
@ -102,51 +113,3 @@ func Get(provider string) (Provider, error) {
}
return Provider{}, errors.New("provider_not_found")
}
// GetAllSchemas returns a flat array with just the schemas
func GetAllSchemas() []string {
items := List()
mp := make([]string, 0)
for _, item := range items {
mp = append(mp, item.Schema)
}
return mp
}
const commonKeySchema = `
{
"type": "object",
"required": [
"api_key"
],
"additionalProperties": false,
"properties": {
"api_key": {
"type": "string",
"minLength": 1
}
}
}
`
// nolint: gosec
const commonKeySecretSchema = `
{
"type": "object",
"required": [
"api_key",
"secret"
],
"additionalProperties": false,
"properties": {
"api_key": {
"type": "string",
"minLength": 1
},
"secret": {
"type": "string",
"minLength": 1
}
}
}
`

View File

@ -1,68 +1,33 @@
package dnsproviders
const acmeDNSchema = `
{
"type": "object",
"required": [
"api_url",
"user",
"password"
],
"additionalProperties": false,
"properties": {
"api_url": {
"type": "string",
"minLength": 4
},
"subdomain": {
"type": "string",
"minLength": 1
},
"user": {
"type": "string",
"minLength": 1
},
"password": {
"type": "string",
"minLength": 1
}
}
}
`
func getDNSAcmeDNS() Provider {
return Provider{
AcmeshName: "dns_acmedns",
Schema: acmeDNSchema,
Fields: []providerField{
{
Name: "Base URL",
Type: "text",
MetaKey: "api_url",
EnvKey: "ACMEDNS_BASE_URL",
IsRequired: true,
Title: "dns_acmedns",
Type: "object",
AdditionalProperties: false,
Required: []string{
"ACMEDNS_BASE_URL",
"ACMEDNS_SUBDOMAIN",
"ACMEDNS_USERNAME",
"ACMEDNS_PASSWORD",
},
Properties: map[string]providerField{
"ACMEDNS_BASE_URL": {
Title: "base-url",
Type: "string",
},
{
Name: "Subdomain",
Type: "text",
MetaKey: "subdomain",
EnvKey: "ACMEDNS_SUBDOMAIN",
IsRequired: true,
"ACMEDNS_SUBDOMAIN": {
Title: "subdomain",
Type: "string",
},
{
Name: "User",
Type: "text",
MetaKey: "user",
EnvKey: "ACMEDNS_USERNAME",
IsRequired: true,
"ACMEDNS_USERNAME": {
Title: "username",
Type: "string",
},
{
Name: "Password",
Type: "password",
MetaKey: "password",
EnvKey: "ACMEDNS_PASSWORD",
IsRequired: true,
IsSecret: true,
"ACMEDNS_PASSWORD": {
Title: "password",
Type: "string",
IsSecret: true,
},
},
}

View File

@ -2,15 +2,17 @@ package dnsproviders
func getDNSAd() Provider {
return Provider{
AcmeshName: "dns_ad",
Schema: commonKeySchema,
Fields: []providerField{
{
Name: "API Key",
Type: "password",
MetaKey: "api_key",
EnvKey: "AD_API_KEY",
IsRequired: true,
Title: "dns_ad",
Type: "object",
AdditionalProperties: false,
Required: []string{
"AD_API_KEY",
},
Properties: map[string]providerField{
"AD_API_KEY": {
Title: "api-key",
Type: "string",
MinLength: 1,
},
},
}

View File

@ -2,23 +2,24 @@ package dnsproviders
func getDNSAli() Provider {
return Provider{
AcmeshName: "dns_ali",
Schema: commonKeySecretSchema,
Fields: []providerField{
{
Name: "Key",
Type: "text",
MetaKey: "api_key",
EnvKey: "Ali_Key",
IsRequired: true,
Title: "dns_ali",
Type: "object",
AdditionalProperties: false,
Required: []string{
"Ali_Key",
"Ali_Secret",
},
Properties: map[string]providerField{
"Ali_Key": {
Title: "api-key",
Type: "string",
MinLength: 1,
},
{
Name: "Secret",
Type: "password",
MetaKey: "secret",
EnvKey: "Ali_Secret",
IsRequired: true,
IsSecret: true,
"Ali_Secret": {
Title: "secret",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -1,57 +1,31 @@
package dnsproviders
const autoDNSSchema = `
{
"type": "object",
"required": [
"user",
"password",
"context"
],
"additionalProperties": false,
"properties": {
"user": {
"type": "string",
"minLength": 1
},
"password": {
"type": "string",
"minLength": 1
},
"context": {
"type": "string",
"minLength": 1
}
}
}
`
func getDNSAutoDNS() Provider {
return Provider{
AcmeshName: "dns_autodns",
Schema: autoDNSSchema,
Fields: []providerField{
{
Name: "User",
Type: "text",
MetaKey: "user",
EnvKey: "AUTODNS_USER",
IsRequired: true,
Title: "dns_autodns",
Type: "object",
AdditionalProperties: false,
Required: []string{
"AUTODNS_USER",
"AUTODNS_PASSWORD",
"AUTODNS_CONTEXT",
},
Properties: map[string]providerField{
"AUTODNS_USER": {
Title: "user",
Type: "string",
MinLength: 1,
},
{
Name: "Password",
Type: "password",
MetaKey: "password",
EnvKey: "AUTODNS_PASSWORD",
IsRequired: true,
IsSecret: true,
"AUTODNS_PASSWORD": {
Title: "password",
Type: "string",
MinLength: 1,
IsSecret: true,
},
{
Name: "Context",
Type: "text",
MetaKey: "context",
EnvKey: "AUTODNS_CONTEXT",
IsRequired: true,
"AUTODNS_CONTEXT": {
Title: "context",
Type: "string",
MinLength: 1,
},
},
}

View File

@ -1,55 +1,29 @@
package dnsproviders
const route53Schema = `
{
"type": "object",
"required": [
"access_key_id",
"access_key"
],
"additionalProperties": false,
"properties": {
"access_key_id": {
"type": "string",
"minLength": 10
},
"access_key": {
"type": "string",
"minLength": 10
},
"slow_rate": {
"type": "string",
"minLength": 1
}
}
}
`
func getDNSAws() Provider {
return Provider{
AcmeshName: "dns_aws",
Schema: route53Schema,
Fields: []providerField{
{
Name: "Access Key ID",
Type: "text",
MetaKey: "access_key_id",
EnvKey: "AWS_ACCESS_KEY_ID",
IsRequired: true,
Title: "dns_aws",
Type: "object",
AdditionalProperties: false,
Required: []string{
"AWS_ACCESS_KEY_ID",
"AWS_SECRET_ACCESS_KEY",
},
Properties: map[string]providerField{
"AWS_ACCESS_KEY_ID": {
Title: "access-key-id",
Type: "string",
MinLength: 10,
},
{
Name: "Secret Access Key",
Type: "password",
MetaKey: "access_key",
EnvKey: "AWS_SECRET_ACCESS_KEY",
IsRequired: true,
IsSecret: true,
"AWS_SECRET_ACCESS_KEY": {
Title: "secret-access-key",
Type: "string",
MinLength: 10,
IsSecret: true,
},
{
Name: "Slow Rate",
Type: "number",
MetaKey: "slow_rate",
EnvKey: "AWS_DNS_SLOWRATE",
"AWS_DNS_SLOWRATE": {
Title: "slow-rate",
Type: "integer",
},
},
}

View File

@ -1,69 +1,37 @@
package dnsproviders
const azureSchema = `
{
"type": "object",
"required": [
"subscription_id",
"tenant_id",
"app_id",
"client_secret"
],
"additionalProperties": false,
"properties": {
"subscription_id": {
"type": "string",
"minLength": 1
},
"tenant_id": {
"type": "string",
"minLength": 1
},
"app_id": {
"type": "string",
"minLength": 1
},
"client_secret": {
"type": "string",
"minLength": 1
}
}
}
`
func getDNSAzure() Provider {
return Provider{
AcmeshName: "dns_azure",
Schema: azureSchema,
Fields: []providerField{
{
Name: "Subscription ID",
Type: "text",
MetaKey: "subscription_id",
EnvKey: "AZUREDNS_SUBSCRIPTIONID",
IsRequired: true,
Title: "dns_azure",
Type: "object",
AdditionalProperties: false,
Required: []string{
"AZUREDNS_SUBSCRIPTIONID",
"AZUREDNS_TENANTID",
"AZUREDNS_APPID",
"AZUREDNS_CLIENTSECRET",
},
Properties: map[string]providerField{
"AZUREDNS_SUBSCRIPTIONID": {
Title: "subscription-id",
Type: "string",
MinLength: 1,
},
{
Name: "Tenant ID",
Type: "text",
MetaKey: "tenant_id",
EnvKey: "AZUREDNS_TENANTID",
IsRequired: true,
"AZUREDNS_TENANTID": {
Title: "tenant-id",
Type: "string",
MinLength: 1,
},
{
Name: "APP ID",
Type: "text",
MetaKey: "app_id",
EnvKey: "AZUREDNS_APPID",
IsRequired: true,
"AZUREDNS_APPID": {
Title: "app-id",
Type: "string",
MinLength: 1,
},
{
Name: "Client Secret",
Type: "password",
MetaKey: "client_secret",
EnvKey: "AZUREDNS_CLIENTSECRET",
IsRequired: true,
IsSecret: true,
"AZUREDNS_CLIENTSECRET": {
Title: "client-secret",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -1,79 +1,42 @@
package dnsproviders
const cloudflareSchema = `
{
"type": "object",
"required": [
"api_key",
"email",
"token",
"account_id"
],
"additionalProperties": false,
"properties": {
"api_key": {
"type": "string",
"minLength": 1
},
"email": {
"type": "string",
"minLength": 5
},
"token": {
"type": "string",
"minLength": 5
},
"account_id": {
"type": "string",
"minLength": 1
},
"zone_id": {
"type": "string",
"minLength": 1
}
}
}
`
func getDNSCf() Provider {
return Provider{
AcmeshName: "dns_cf",
Schema: cloudflareSchema,
Fields: []providerField{
{
Name: "API Key",
Type: "password",
MetaKey: "api_key",
EnvKey: "CF_Key",
IsRequired: true,
Title: "dns_cf",
Type: "object",
AdditionalProperties: false,
Required: []string{
"CF_Key",
"CF_Email",
"CF_Token",
"CF_Account_ID",
},
Properties: map[string]providerField{
"CF_Key": {
Title: "api-key",
Type: "string",
MinLength: 1,
},
{
Name: "Email",
Type: "text",
MetaKey: "email",
EnvKey: "CF_Email",
IsRequired: true,
"CF_Email": {
Title: "email",
Type: "string",
MinLength: 5,
},
{
Name: "Token",
Type: "text",
MetaKey: "token",
EnvKey: "CF_Token",
IsRequired: true,
IsSecret: true,
"CF_Token": {
Title: "token",
Type: "string",
MinLength: 5,
IsSecret: true,
},
{
Name: "Account ID",
Type: "text",
MetaKey: "account_id",
EnvKey: "CF_Account_ID",
IsRequired: true,
"CF_Account_ID": {
Title: "account-id",
Type: "string",
MinLength: 1,
},
{
Name: "Zone ID",
Type: "string",
MetaKey: "zone_id",
EnvKey: "CF_Zone_ID",
"CF_Zone_ID": {
Title: "zone-id",
Type: "string",
MinLength: 1,
},
},
}

View File

@ -1,53 +1,31 @@
package dnsproviders
const clouDNSNetSchema = `
{
"type": "object",
"required": [
"password"
],
"additionalProperties": false,
"properties": {
"auth_id": {
"type": "string",
"minLength": 1
},
"sub_auth_id": {
"type": "string",
"minLength": 1
},
"password": {
"type": "string",
"minLength": 1
}
}
}
`
func getDNSCloudns() Provider {
return Provider{
AcmeshName: "dns_cloudns",
Schema: clouDNSNetSchema,
Fields: []providerField{
{
Name: "Auth ID",
Type: "text",
MetaKey: "auth_id",
EnvKey: "CLOUDNS_AUTH_ID",
Title: "dns_cloudns",
Type: "object",
AdditionalProperties: false,
Required: []string{
"CLOUDNS_AUTH_ID",
"CLOUDNS_SUB_AUTH_ID",
"CLOUDNS_AUTH_PASSWORD",
},
Properties: map[string]providerField{
"CLOUDNS_AUTH_ID": {
Title: "auth-id",
Type: "string",
MinLength: 1,
},
{
Name: "Sub Auth ID",
Type: "text",
MetaKey: "sub_auth_id",
EnvKey: "CLOUDNS_SUB_AUTH_ID",
"CLOUDNS_SUB_AUTH_ID": {
Title: "sub-auth-id",
Type: "string",
MinLength: 1,
},
{
Name: "Password",
Type: "password",
MetaKey: "password",
EnvKey: "CLOUDNS_AUTH_PASSWORD",
IsRequired: true,
IsSecret: true,
"CLOUDNS_AUTH_PASSWORD": {
Title: "password",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -1,69 +1,37 @@
package dnsproviders
const conohaSchema = `
{
"type": "object",
"required": [
"subscription_id",
"tenant_id",
"app_id",
"client_secret"
],
"additionalProperties": false,
"properties": {
"api_url": {
"type": "string",
"minLength": 4
},
"user": {
"type": "string",
"minLength": 1
},
"pass": {
"type": "string",
"minLength": 1
},
"tenant_id": {
"type": "string",
"minLength": 1
}
}
}
`
func getDNSConoha() Provider {
return Provider{
AcmeshName: "dns_conoha",
Schema: conohaSchema,
Fields: []providerField{
{
Name: "API URL",
Type: "text",
MetaKey: "api_url",
EnvKey: "CONOHA_IdentityServiceApi",
IsRequired: true,
Title: "dns_conoha",
Type: "object",
AdditionalProperties: false,
Required: []string{
"CONOHA_IdentityServiceApi",
"CONOHA_Username",
"CONOHA_Password",
"CONOHA_TenantId",
},
Properties: map[string]providerField{
"CONOHA_IdentityServiceApi": {
Title: "api-url",
Type: "string",
MinLength: 4,
},
{
Name: "Username",
Type: "text",
MetaKey: "user",
EnvKey: "CONOHA_Username",
IsRequired: true,
"CONOHA_Username": {
Title: "username",
Type: "string",
MinLength: 1,
},
{
Name: "Password",
Type: "password",
MetaKey: "password",
EnvKey: "CONOHA_Password",
IsRequired: true,
IsSecret: true,
"CONOHA_Password": {
Title: "password",
Type: "string",
MinLength: 1,
IsSecret: true,
},
{
Name: "Tenant ID",
Type: "text",
MetaKey: "tenant_id",
EnvKey: "CONOHA_TenantId",
IsRequired: true,
"CONOHA_TenantId": {
Title: "tenant-id",
Type: "string",
MinLength: 1,
},
},
}

View File

@ -2,23 +2,22 @@ package dnsproviders
func getDNSCx() Provider {
return Provider{
AcmeshName: "dns_cx",
Schema: commonKeySecretSchema,
Fields: []providerField{
{
Name: "Key",
Type: "text",
MetaKey: "api_key",
EnvKey: "CX_Key",
IsRequired: true,
Title: "dns_cx",
Type: "object",
AdditionalProperties: false,
Required: []string{
"CX_Key",
"CX_Secret",
},
Properties: map[string]providerField{
"CX_Key": {
Title: "key",
Type: "string",
},
{
Name: "Secret",
Type: "password",
MetaKey: "secret",
EnvKey: "CX_Secret",
IsRequired: true,
IsSecret: true,
"CX_Secret": {
Title: "secret",
Type: "string",
IsSecret: true,
},
},
}

View File

@ -1,56 +1,32 @@
package dnsproviders
const cyonChSchema = `
{
"type": "object",
"required": [
"user",
"password"
],
"additionalProperties": false,
"properties": {
"user": {
"type": "string",
"minLength": 1
},
"password": {
"type": "string",
"minLength": 1
},
"otp_secret": {
"type": "string",
"minLength": 1
}
}
}
`
func getDNSCyon() Provider {
return Provider{
AcmeshName: "dns_cyon",
Schema: cyonChSchema,
Fields: []providerField{
{
Name: "User",
Type: "text",
MetaKey: "user",
EnvKey: "CY_Username",
IsRequired: true,
Title: "dns_cyon",
Type: "object",
AdditionalProperties: false,
Required: []string{
"CY_Username",
"CY_Password",
"CY_OTP_Secret",
},
Properties: map[string]providerField{
"CY_Username": {
Title: "user",
Type: "string",
MinLength: 1,
},
{
Name: "Password",
Type: "password",
MetaKey: "password",
EnvKey: "CY_Password",
IsRequired: true,
IsSecret: true,
"CY_Password": {
Title: "password",
Type: "string",
MinLength: 1,
IsSecret: true,
},
{
Name: "OTP Secret",
Type: "password",
MetaKey: "otp_secret",
EnvKey: "CY_OTP_Secret",
IsSecret: true,
"CY_OTP_Secret": {
Title: "otp-secret",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -1,41 +1,22 @@
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,
Title: "dns_da",
Type: "object",
AdditionalProperties: false,
Required: []string{
"DA_Api",
},
Properties: map[string]providerField{
"DA_Api": {
Title: "api-url",
Type: "string",
MinLength: 4,
},
{
Name: "Insecure",
Type: "bool",
MetaKey: "insecure",
EnvKey: "DA_Api_Insecure",
"DA_Api_Insecure": {
Title: "insecure",
Type: "boolean",
},
},
}

View File

@ -2,16 +2,17 @@ package dnsproviders
func getDNSDgon() Provider {
return Provider{
AcmeshName: "dns_dgon",
Schema: commonKeySchema,
Fields: []providerField{
{
Name: "API Key",
Type: "password",
MetaKey: "api_key",
EnvKey: "DO_API_KEY",
IsRequired: true,
IsSecret: true,
Title: "dns_dgon",
Type: "object",
AdditionalProperties: false,
Required: []string{
"DO_API_KEY",
},
Properties: map[string]providerField{
"DO_API_KEY": {
Title: "api-key",
Type: "string",
IsSecret: true,
},
},
}

View File

@ -2,16 +2,18 @@ package dnsproviders
func getDNSDNSimple() Provider {
return Provider{
AcmeshName: "dns_dnsimple",
Schema: commonKeySchema,
Fields: []providerField{
{
Name: "OAuth Token",
Type: "text",
MetaKey: "api_key",
EnvKey: "DNSimple_OAUTH_TOKEN",
IsRequired: true,
IsSecret: true,
Title: "dns_dnsimple",
Type: "object",
AdditionalProperties: false,
Required: []string{
"DNSimple_OAUTH_TOKEN",
},
Properties: map[string]providerField{
"DNSimple_OAUTH_TOKEN": {
Title: "oauth-token",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -1,45 +1,25 @@
package dnsproviders
const dnsPodCnSchema = `
{
"type": "object",
"required": [
"id",
"api_key"
],
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"api_key": {
"type": "string",
"minLength": 1
}
}
}
`
func getDNSDp() Provider {
return Provider{
AcmeshName: "dns_dp",
Schema: dnsPodCnSchema,
Fields: []providerField{
{
Name: "ID",
Type: "text",
MetaKey: "id",
EnvKey: "DP_Id",
IsRequired: true,
Title: "dns_dp",
Type: "object",
AdditionalProperties: false,
Required: []string{
"DP_Id",
"DP_Key",
},
Properties: map[string]providerField{
"DP_Id": {
Title: "id",
Type: "string",
MinLength: 1,
},
{
Name: "Key",
Type: "password",
MetaKey: "api_key",
EnvKey: "DP_Key",
IsRequired: true,
IsSecret: true,
"DP_Key": {
Title: "key",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -1,45 +1,25 @@
package dnsproviders
const dnsPodComSchema = `
{
"type": "object",
"required": [
"id",
"api_key"
],
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"api_key": {
"type": "string",
"minLength": 1
}
}
}
`
func getDNSDpi() Provider {
return Provider{
AcmeshName: "dns_dpi",
Schema: dnsPodComSchema,
Fields: []providerField{
{
Name: "ID",
Type: "text",
MetaKey: "id",
EnvKey: "DPI_Id",
IsRequired: true,
Title: "dns_dpi",
Type: "object",
AdditionalProperties: false,
Required: []string{
"DPI_Id",
"DPI_Key",
},
Properties: map[string]providerField{
"DPI_Id": {
Title: "id",
Type: "string",
MinLength: 1,
},
{
Name: "Key",
Type: "password",
MetaKey: "api_key",
EnvKey: "DPI_Key",
IsRequired: true,
IsSecret: true,
"DPI_Key": {
Title: "key",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -2,16 +2,18 @@ package dnsproviders
func getDNSDreamhost() Provider {
return Provider{
AcmeshName: "dns_dreamhost",
Schema: commonKeySchema,
Fields: []providerField{
{
Name: "API Key",
Type: "password",
MetaKey: "api_key",
EnvKey: "DH_API_KEY",
IsRequired: true,
IsSecret: true,
Title: "dns_dreamhost",
Type: "object",
AdditionalProperties: false,
Required: []string{
"DH_API_KEY",
},
Properties: map[string]providerField{
"DH_API_KEY": {
Title: "api-key",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -2,16 +2,18 @@ package dnsproviders
func getDNSDuckDNS() Provider {
return Provider{
AcmeshName: "dns_duckdns",
Schema: commonKeySchema,
Fields: []providerField{
{
Name: "Token",
Type: "password",
MetaKey: "api_key",
EnvKey: "DuckDNS_Token",
IsRequired: true,
IsSecret: true,
Title: "dns_duckdns",
Type: "object",
AdditionalProperties: false,
Required: []string{
"DuckDNS_Token",
},
Properties: map[string]providerField{
"DuckDNS_Token": {
Title: "token",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -1,57 +1,31 @@
package dnsproviders
const dynSchema = `
{
"type": "object",
"required": [
"customer",
"username",
"password"
],
"additionalProperties": false,
"properties": {
"customer": {
"type": "string",
"minLength": 1
},
"username": {
"type": "string",
"minLength": 1
},
"password": {
"type": "string",
"minLength": 1
}
}
}
`
func getDNSDyn() Provider {
return Provider{
AcmeshName: "dns_dyn",
Schema: dynSchema,
Fields: []providerField{
{
Name: "Customer",
Type: "text",
MetaKey: "customer",
EnvKey: "DYN_Customer",
IsRequired: true,
Title: "dns_dyn",
Type: "object",
AdditionalProperties: false,
Required: []string{
"DYN_Customer",
"DYN_Username",
"DYN_Password",
},
Properties: map[string]providerField{
"DYN_Customer": {
Title: "customer",
Type: "string",
MinLength: 1,
},
{
Name: "Username",
Type: "text",
MetaKey: "username",
EnvKey: "DYN_Username",
IsRequired: true,
"DYN_Username": {
Title: "username",
Type: "string",
MinLength: 1,
},
{
Name: "Password",
Type: "password",
MetaKey: "password",
EnvKey: "DYN_Password",
IsRequired: true,
IsSecret: true,
"DYN_Password": {
Title: "password",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -2,23 +2,23 @@ package dnsproviders
func getDNSDynu() Provider {
return Provider{
AcmeshName: "dns_dynu",
Schema: commonKeySecretSchema,
Fields: []providerField{
{
Name: "Client ID",
Type: "text",
MetaKey: "api_key",
EnvKey: "Dynu_ClientId",
IsRequired: true,
Title: "dns_dynu",
Type: "object",
AdditionalProperties: false,
Required: []string{
"Dynu_ClientId",
},
Properties: map[string]providerField{
"Dynu_ClientId": {
Title: "client-id",
Type: "string",
MinLength: 1,
},
{
Name: "Secret",
Type: "password",
MetaKey: "secret",
EnvKey: "Dynu_Secret",
IsRequired: true,
IsSecret: true,
"Dynu_Secret": {
Title: "secret",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -1,49 +1,25 @@
package dnsproviders
const euservSchema = `
{
"type": "object",
"required": [
"user",
"password"
],
"additionalProperties": false,
"properties": {
"user": {
"type": "string",
"minLength": 1
},
"password": {
"type": "string",
"minLength": 1
},
"otp_secret": {
"type": "string",
"minLength": 1
}
}
}
`
func getDNSEuserv() Provider {
return Provider{
AcmeshName: "dns_euserv",
Schema: euservSchema,
Fields: []providerField{
{
Name: "User",
Type: "text",
MetaKey: "user",
EnvKey: "EUSERV_Username",
IsRequired: true,
Title: "dns_euserv",
Type: "object",
AdditionalProperties: false,
Required: []string{
"EUSERV_Username",
"EUSERV_Password",
},
Properties: map[string]providerField{
"EUSERV_Username": {
Title: "user",
Type: "string",
MinLength: 1,
},
{
Name: "Password",
Type: "password",
MetaKey: "password",
EnvKey: "EUSERV_Password",
IsRequired: true,
IsSecret: true,
"EUSERV_Password": {
Title: "password",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -1,45 +1,25 @@
package dnsproviders
const freeDNSSchema = `
{
"type": "object",
"required": [
"user",
"password"
],
"additionalProperties": false,
"properties": {
"user": {
"type": "string",
"minLength": 1
},
"password": {
"type": "string",
"minLength": 1
}
}
}
`
func getDNSFreeDNS() Provider {
return Provider{
AcmeshName: "dns_freedns",
Schema: freeDNSSchema,
Fields: []providerField{
{
Name: "User",
Type: "text",
MetaKey: "user",
EnvKey: "FREEDNS_User",
IsRequired: true,
Title: "dns_freedns",
Type: "object",
AdditionalProperties: false,
Required: []string{
"FREEDNS_User",
"FREEDNS_Password",
},
Properties: map[string]providerField{
"FREEDNS_User": {
Title: "user",
Type: "string",
MinLength: 1,
},
{
Name: "Password",
Type: "password",
MetaKey: "password",
EnvKey: "FREEDNS_Password",
IsRequired: true,
IsSecret: true,
"FREEDNS_Password": {
Title: "password",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -2,15 +2,17 @@ package dnsproviders
func getDNSGandiLiveDNS() Provider {
return Provider{
AcmeshName: "dns_gandi_livedns",
Schema: commonKeySchema,
Fields: []providerField{
{
Name: "Key",
Type: "password",
MetaKey: "api_key",
EnvKey: "GANDI_LIVEDNS_KEY",
IsRequired: true,
Title: "dns_gandi_livedns",
Type: "object",
AdditionalProperties: false,
Required: []string{
"GANDI_LIVEDNS_KEY",
},
Properties: map[string]providerField{
"GANDI_LIVEDNS_KEY": {
Title: "key",
Type: "string",
MinLength: 1,
},
},
}

View File

@ -2,23 +2,24 @@ package dnsproviders
func getDNSGd() Provider {
return Provider{
AcmeshName: "dns_gd",
Schema: commonKeySecretSchema,
Fields: []providerField{
{
Name: "Key",
Type: "text",
MetaKey: "api_key",
EnvKey: "GD_Key",
IsRequired: true,
Title: "dns_gd",
Type: "object",
AdditionalProperties: false,
Required: []string{
"GD_Key",
"GD_Secret",
},
Properties: map[string]providerField{
"GD_Key": {
Title: "key",
Type: "string",
MinLength: 1,
},
{
Name: "Secret",
Type: "password",
MetaKey: "secret",
EnvKey: "GD_Secret",
IsRequired: true,
IsSecret: true,
"GD_Secret": {
Title: "secret",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -1,46 +1,25 @@
package dnsproviders
// nolint: gosec
const commonUserPassSchema = `
{
"type": "object",
"required": [
"username",
"password"
],
"additionalProperties": false,
"properties": {
"username": {
"type": "string",
"minLength": 1
},
"password": {
"type": "string",
"minLength": 1
}
}
}
`
func getDNSHe() Provider {
return Provider{
AcmeshName: "dns_he",
Schema: commonUserPassSchema,
Fields: []providerField{
{
Name: "Username",
Type: "text",
MetaKey: "username",
EnvKey: "HE_Username",
IsRequired: true,
Title: "dns_he",
Type: "object",
AdditionalProperties: false,
Required: []string{
"HE_Username",
"HE_Password",
},
Properties: map[string]providerField{
"HE_Username": {
Title: "username",
Type: "string",
MinLength: 1,
},
{
Name: "Password",
Type: "password",
MetaKey: "password",
EnvKey: "HE_Password",
IsRequired: true,
IsSecret: true,
"HE_Password": {
Title: "password",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -1,45 +1,25 @@
package dnsproviders
const infobloxSchema = `
{
"type": "object",
"required": [
"credentials",
"server"
],
"additionalProperties": false,
"properties": {
"credentials": {
"type": "string",
"minLength": 1
},
"server": {
"type": "string",
"minLength": 1
}
}
}
`
func getDNSInfoblox() Provider {
return Provider{
AcmeshName: "dns_infoblox",
Schema: infobloxSchema,
Fields: []providerField{
{
Name: "Credentials",
Type: "text",
MetaKey: "credentials",
EnvKey: "Infoblox_Creds",
IsRequired: true,
IsSecret: true,
Title: "dns_infoblox",
Type: "object",
AdditionalProperties: false,
Required: []string{
"Infoblox_Creds",
"Infoblox_Server",
},
Properties: map[string]providerField{
"Infoblox_Creds": {
Title: "credentials",
Type: "string",
MinLength: 1,
IsSecret: true,
},
{
Name: "Server",
Type: "text",
MetaKey: "server",
EnvKey: "Infoblox_Server",
IsRequired: true,
"Infoblox_Server": {
Title: "server",
Type: "string",
MinLength: 1,
},
},
}

View File

@ -1,45 +1,25 @@
package dnsproviders
const inwxSchema = `
{
"type": "object",
"required": [
"user",
"password"
],
"additionalProperties": false,
"properties": {
"user": {
"type": "string",
"minLength": 1
},
"password": {
"type": "string",
"minLength": 1
}
}
}
`
func getDNSInwx() Provider {
return Provider{
AcmeshName: "dns_inwx",
Schema: inwxSchema,
Fields: []providerField{
{
Name: "User",
Type: "text",
MetaKey: "user",
EnvKey: "INWX_User",
IsRequired: true,
Title: "dns_inwx",
Type: "object",
AdditionalProperties: false,
Required: []string{
"INWX_User",
"INWX_Password",
},
Properties: map[string]providerField{
"INWX_User": {
Title: "user",
Type: "string",
MinLength: 1,
},
{
Name: "Password",
Type: "password",
MetaKey: "password",
EnvKey: "INWX_Password",
IsRequired: true,
IsSecret: true,
"INWX_Password": {
Title: "password",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -1,66 +1,35 @@
package dnsproviders
const ispConfigSchema = `
{
"type": "object",
"required": [
"user",
"password",
"api_url"
],
"additionalProperties": false,
"properties": {
"user": {
"type": "string",
"minLength": 1
},
"password": {
"type": "string",
"minLength": 1
},
"api_url": {
"type": "string",
"minLength": 1
},
"insecure": {
"type": "string"
}
}
}
`
func getDNSIspconfig() Provider {
return Provider{
AcmeshName: "dns_ispconfig",
Schema: ispConfigSchema,
Fields: []providerField{
{
Name: "User",
Type: "text",
MetaKey: "user",
EnvKey: "ISPC_User",
IsRequired: true,
Title: "dns_ispconfig",
Type: "object",
AdditionalProperties: false,
Required: []string{
"ISPC_User",
"ISPC_Password",
"ISPC_Api",
},
Properties: map[string]providerField{
"ISPC_User": {
Title: "user",
Type: "string",
MinLength: 1,
},
{
Name: "Password",
Type: "password",
MetaKey: "password",
EnvKey: "ISPC_Password",
IsRequired: true,
IsSecret: true,
"ISPC_Password": {
Title: "password",
Type: "string",
MinLength: 1,
IsSecret: true,
},
{
Name: "API URL",
Type: "text",
MetaKey: "api_url",
EnvKey: "ISPC_Api",
IsRequired: true,
"ISPC_Api": {
Title: "api-url",
Type: "string",
MinLength: 1,
},
{
Name: "Insecure",
Type: "bool",
MetaKey: "insecure",
EnvKey: "ISPC_Api_Insecure",
"ISPC_Api_Insecure": {
Title: "insecure",
Type: "boolean",
},
},
}

View File

@ -1,45 +1,25 @@
package dnsproviders
const kinghostSchema = `
{
"type": "object",
"required": [
"user",
"password"
],
"additionalProperties": false,
"properties": {
"user": {
"type": "string",
"minLength": 1
},
"password": {
"type": "string",
"minLength": 1
}
}
}
`
func getDNSKinghost() Provider {
return Provider{
AcmeshName: "dns_kinghost",
Schema: kinghostSchema,
Fields: []providerField{
{
Name: "User",
Type: "text",
MetaKey: "user",
EnvKey: "KINGHOST_Username",
IsRequired: true,
Title: "dns_kinghost",
Type: "object",
AdditionalProperties: false,
Required: []string{
"KINGHOST_Username",
"KINGHOST_Password",
},
Properties: map[string]providerField{
"KINGHOST_Username": {
Title: "user",
Type: "string",
MinLength: 1,
},
{
Name: "Password",
Type: "password",
MetaKey: "password",
EnvKey: "KINGHOST_Password",
IsRequired: true,
IsSecret: true,
"KINGHOST_Password": {
Title: "password",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -4,16 +4,18 @@ package dnsproviders
// needs 15 minute sleep, not currently implemented
func getDNSLinodeV4() Provider {
return Provider{
AcmeshName: "dns_linode_v4",
Schema: commonKeySchema,
Fields: []providerField{
{
Name: "API Key",
Type: "text",
MetaKey: "api_key",
EnvKey: "LINODE_V4_API_KEY",
IsRequired: true,
IsSecret: true,
Title: "dns_linode_v4",
Type: "object",
AdditionalProperties: false,
Required: []string{
"LINODE_V4_API_KEY",
},
Properties: map[string]providerField{
"LINODE_V4_API_KEY": {
Title: "api-key",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -1,57 +1,31 @@
package dnsproviders
const loopiaSchema = `
{
"type": "object",
"required": [
"api_url",
"user",
"password"
],
"additionalProperties": false,
"properties": {
"api_url": {
"type": "string",
"minLength": 4
},
"user": {
"type": "string",
"minLength": 1
},
"password": {
"type": "string",
"minLength": 1
}
}
}
`
func getDNSLoopia() Provider {
return Provider{
AcmeshName: "dns_loopia",
Schema: loopiaSchema,
Fields: []providerField{
{
Name: "API URL",
Type: "text",
MetaKey: "api_url",
EnvKey: "LOOPIA_Api",
IsRequired: true,
Title: "dns_loopia",
Type: "object",
AdditionalProperties: false,
Required: []string{
"LOOPIA_Api",
"LOOPIA_User",
"LOOPIA_Password",
},
Properties: map[string]providerField{
"LOOPIA_Api": {
Title: "api-url",
Type: "string",
MinLength: 4,
},
{
Name: "User",
Type: "text",
MetaKey: "user",
EnvKey: "LOOPIA_User",
IsRequired: true,
"LOOPIA_User": {
Title: "user",
Type: "string",
MinLength: 1,
},
{
Name: "Password",
Type: "password",
MetaKey: "password",
EnvKey: "LOOPIA_Password",
IsRequired: true,
IsSecret: true,
"LOOPIA_Password": {
Title: "password",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -1,45 +1,25 @@
package dnsproviders
const luaDNSSchema = `
{
"type": "object",
"required": [
"api_key",
"email"
],
"additionalProperties": false,
"properties": {
"api_key": {
"type": "string",
"minLength": 1
},
"email": {
"type": "string",
"minLength": 5
}
}
}
`
func getDNSLua() Provider {
return Provider{
AcmeshName: "dns_lua",
Schema: luaDNSSchema,
Fields: []providerField{
{
Name: "Key",
Type: "text",
MetaKey: "api_key",
EnvKey: "LUA_Key",
IsRequired: true,
IsSecret: true,
Title: "dns_lua",
Type: "object",
AdditionalProperties: false,
Required: []string{
"LUA_Key",
"LUA_Email",
},
Properties: map[string]providerField{
"LUA_Key": {
Title: "key",
Type: "string",
MinLength: 1,
IsSecret: true,
},
{
Name: "Email",
Type: "text",
MetaKey: "email",
EnvKey: "LUA_Email",
IsRequired: true,
"LUA_Email": {
Title: "email",
Type: "string",
MinLength: 5,
},
},
}

View File

@ -2,23 +2,24 @@ package dnsproviders
func getDNSMe() Provider {
return Provider{
AcmeshName: "dns_me",
Schema: commonKeySecretSchema,
Fields: []providerField{
{
Name: "Key",
Type: "text",
MetaKey: "api_key",
EnvKey: "ME_Key",
IsRequired: true,
Title: "dns_me",
Type: "object",
AdditionalProperties: false,
Required: []string{
"ME_Key",
"ME_Secret",
},
Properties: map[string]providerField{
"ME_Key": {
Title: "key",
Type: "string",
MinLength: 1,
},
{
Name: "Secret",
Type: "password",
MetaKey: "secret",
EnvKey: "ME_Secret",
IsRequired: true,
IsSecret: true,
"ME_Secret": {
Title: "secret",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -1,45 +1,25 @@
package dnsproviders
const nameComSchema = `
{
"type": "object",
"required": [
"username",
"token"
],
"additionalProperties": false,
"properties": {
"username": {
"type": "string",
"minLength": 1
},
"token": {
"type": "string",
"minLength": 1
}
}
}
`
func getDNSNamecom() Provider {
return Provider{
AcmeshName: "dns_namecom",
Schema: nameComSchema,
Fields: []providerField{
{
Name: "Username",
Type: "text",
MetaKey: "username",
EnvKey: "Namecom_Username",
IsRequired: true,
Title: "dns_namecom",
Type: "object",
AdditionalProperties: false,
Required: []string{
"Namecom_Username",
"Namecom_Token",
},
Properties: map[string]providerField{
"Namecom_Username": {
Title: "username",
Type: "string",
MinLength: 1,
},
{
Name: "Token",
Type: "text",
MetaKey: "token",
EnvKey: "Namecom_Token",
IsRequired: true,
IsSecret: true,
"Namecom_Token": {
Title: "token",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -2,16 +2,17 @@ package dnsproviders
func getDNSNamesilo() Provider {
return Provider{
AcmeshName: "dns_namesilo",
Schema: commonKeySchema,
Fields: []providerField{
{
Name: "API Key",
Type: "password",
MetaKey: "api_key",
EnvKey: "Namesilo_Key",
IsRequired: true,
IsSecret: true,
Title: "dns_namesilo",
AdditionalProperties: false,
Required: []string{
"Namesilo_Key",
},
Properties: map[string]providerField{
"Namesilo_Key": {
Title: "api-key",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -2,16 +2,17 @@ package dnsproviders
func getDNSOne() Provider {
return Provider{
AcmeshName: "dns_nsone",
Schema: commonKeySchema,
Fields: []providerField{
{
Name: "Key",
Type: "password",
MetaKey: "api_key",
EnvKey: "NS1_Key",
IsRequired: true,
IsSecret: true,
Title: "dns_nsone",
AdditionalProperties: false,
Required: []string{
"NS1_Key",
},
Properties: map[string]providerField{
"NS1_Key": {
Title: "key",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -1,68 +1,35 @@
package dnsproviders
const powerDNSSchema = `
{
"type": "object",
"required": [
"url",
"server_id",
"token",
"ttl"
],
"additionalProperties": false,
"properties": {
"url": {
"type": "string",
"minLength": 1
},
"server_id": {
"type": "string",
"minLength": 1
},
"token": {
"type": "string",
"minLength": 1
},
"ttl": {
"type": "string",
"minLength": 1
}
}
}
`
func getDNSPDNS() Provider {
return Provider{
AcmeshName: "dns_pdns",
Schema: powerDNSSchema,
Fields: []providerField{
{
Name: "URL",
Type: "text",
MetaKey: "url",
EnvKey: "PDNS_Url",
IsRequired: true,
Title: "dns_pdns",
AdditionalProperties: false,
Required: []string{
"PDNS_Url",
"PDNS_ServerId",
"PDNS_Token",
"PDNS_Ttl",
},
Properties: map[string]providerField{
"PDNS_Url": {
Title: "url",
Type: "string",
MinLength: 1,
},
{
Name: "Server ID",
Type: "text",
MetaKey: "server_id",
EnvKey: "PDNS_ServerId",
IsRequired: true,
"PDNS_ServerId": {
Title: "server-id",
Type: "string",
MinLength: 1,
},
{
Name: "Token",
Type: "text",
MetaKey: "token",
EnvKey: "PDNS_Token",
IsRequired: true,
"PDNS_Token": {
Title: "token",
Type: "string",
MinLength: 1,
},
{
Name: "TTL",
Type: "number",
MetaKey: "ttl",
EnvKey: "PDNS_Ttl",
IsRequired: true,
"PDNS_Ttl": {
Title: "ttl",
Type: "integer",
Minimum: 1,
},
},
}

View File

@ -2,16 +2,17 @@ package dnsproviders
func getDNSSelectel() Provider {
return Provider{
AcmeshName: "dns_selectel",
Schema: commonKeySchema,
Fields: []providerField{
{
Name: "API Key",
Type: "password",
MetaKey: "api_key",
EnvKey: "SL_Key",
IsRequired: true,
IsSecret: true,
Title: "dns_selectel",
AdditionalProperties: false,
Required: []string{
"SL_Key",
},
Properties: map[string]providerField{
"SL_Key": {
Title: "api-key",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -1,45 +1,24 @@
package dnsproviders
const servercowSchema = `
{
"type": "object",
"required": [
"user",
"password"
],
"additionalProperties": false,
"properties": {
"user": {
"type": "string",
"minLength": 1
},
"password": {
"type": "string",
"minLength": 1
}
}
}
`
func getDNSServercow() Provider {
return Provider{
AcmeshName: "dns_servercow",
Schema: servercowSchema,
Fields: []providerField{
{
Name: "User",
Type: "text",
MetaKey: "user",
EnvKey: "SERVERCOW_API_Username",
IsRequired: true,
Title: "dns_servercow",
AdditionalProperties: false,
Required: []string{
"SERVERCOW_API_Username",
"SERVERCOW_API_Password",
},
Properties: map[string]providerField{
"SERVERCOW_API_Username": {
Title: "user",
Type: "string",
MinLength: 1,
},
{
Name: "Password",
Type: "password",
MetaKey: "password",
EnvKey: "SERVERCOW_API_Password",
IsRequired: true,
IsSecret: true,
"SERVERCOW_API_Password": {
Title: "password",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -2,23 +2,23 @@ package dnsproviders
func getDNSTele3() Provider {
return Provider{
AcmeshName: "dns_tele3",
Schema: commonKeySecretSchema,
Fields: []providerField{
{
Name: "Key",
Type: "text",
MetaKey: "api_key",
EnvKey: "TELE3_Key",
IsRequired: true,
Title: "dns_tele3",
AdditionalProperties: false,
Required: []string{
"TELE3_Key",
"TELE3_Secret",
},
Properties: map[string]providerField{
"TELE3_Key": {
Title: "key",
Type: "string",
MinLength: 1,
},
{
Name: "Secret",
Type: "password",
MetaKey: "secret",
EnvKey: "TELE3_Secret",
IsRequired: true,
IsSecret: true,
"TELE3_Secret": {
Title: "secret",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -1,46 +1,25 @@
package dnsproviders
const unoEuroSchema = `
{
"type": "object",
"required": [
"api_key",
"user"
],
"additionalProperties": false,
"properties": {
"api_key": {
"type": "string",
"minLength": 1
},
"user": {
"type": "string",
"minLength": 1
}
}
}
`
func getDNSUnoeuro() Provider {
return Provider{
AcmeshName: "dns_unoeuro",
Schema: unoEuroSchema,
Fields: []providerField{
{
Name: "Key",
Type: "password",
MetaKey: "api_key",
EnvKey: "UNO_Key",
IsRequired: true,
IsSecret: true,
Title: "dns_unoeuro",
AdditionalProperties: false,
Required: []string{
"UNO_Key",
"UNO_User",
},
Properties: map[string]providerField{
"UNO_Key": {
Title: "key",
Type: "string",
MinLength: 1,
IsSecret: true,
},
{
Name: "User",
Type: "text",
MetaKey: "user",
EnvKey: "UNO_User",
IsRequired: true,
IsSecret: true,
"UNO_User": {
Title: "user",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -2,15 +2,16 @@ package dnsproviders
func getDNSVscale() Provider {
return Provider{
AcmeshName: "dns_vscale",
Schema: commonKeySchema,
Fields: []providerField{
{
Name: "API Key",
Type: "password",
MetaKey: "api_key",
EnvKey: "VSCALE_API_KEY",
IsRequired: true,
Title: "dns_vscale",
AdditionalProperties: false,
Required: []string{
"VSCALE_API_KEY",
},
Properties: map[string]providerField{
"VSCALE_API_KEY": {
Title: "api-key",
Type: "string",
MinLength: 1,
},
},
}

View File

@ -2,16 +2,17 @@ package dnsproviders
func getDNSYandex() Provider {
return Provider{
AcmeshName: "dns_yandex",
Schema: commonKeySchema,
Fields: []providerField{
{
Name: "Token",
Type: "password",
MetaKey: "api_key",
EnvKey: "PDD_Token",
IsRequired: true,
IsSecret: true,
Title: "dns_yandex",
AdditionalProperties: false,
Required: []string{
"PDD_Token",
},
Properties: map[string]providerField{
"PDD_Token": {
Title: "token",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -2,16 +2,17 @@ package dnsproviders
func getDNSDNZilore() Provider {
return Provider{
AcmeshName: "dns_zilore",
Schema: commonKeySchema,
Fields: []providerField{
{
Name: "API Key",
Type: "text",
MetaKey: "api_key",
EnvKey: "Zilore_Key",
IsRequired: true,
IsSecret: true,
Title: "dns_zilore",
AdditionalProperties: false,
Required: []string{
"Zilore_Key",
},
Properties: map[string]providerField{
"Zilore_Key": {
Title: "api-key",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}

View File

@ -2,16 +2,17 @@ package dnsproviders
func getDNSZonomi() Provider {
return Provider{
AcmeshName: "dns_zonomi",
Schema: commonKeySchema,
Fields: []providerField{
{
Name: "API Key",
Type: "password",
MetaKey: "api_key",
EnvKey: "ZM_Key",
IsRequired: true,
IsSecret: true,
Title: "dns_zonomi",
AdditionalProperties: false,
Required: []string{
"ZM_Key",
},
Properties: map[string]providerField{
"ZM_Key": {
Title: "api-key",
Type: "string",
MinLength: 1,
IsSecret: true,
},
},
}