diff --git a/backend/internal/dnsproviders/common.go b/backend/internal/dnsproviders/common.go index ed11dc4..2deae12 100644 --- a/backend/internal/dnsproviders/common.go +++ b/backend/internal/dnsproviders/common.go @@ -60,6 +60,7 @@ func List() []Provider { getDNSLua(), getDNSMe(), getDNSNamecom(), + getDNSServercow(), getDNSOne(), getDNSPDNS(), getDNSUnoeuro(), diff --git a/backend/internal/dnsproviders/dns_servercow.go b/backend/internal/dnsproviders/dns_servercow.go new file mode 100644 index 0000000..9b93711 --- /dev/null +++ b/backend/internal/dnsproviders/dns_servercow.go @@ -0,0 +1,46 @@ +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, + }, + { + Name: "Password", + Type: "password", + MetaKey: "password", + EnvKey: "SERVERCOW_API_Password", + IsRequired: true, + IsSecret: true, + }, + }, + } +}