mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-07-05 01:09:37 +00:00
Moved v3 code from NginxProxyManager/nginx-proxy-manager-3 to NginxProxyManager/nginx-proxy-manager
This commit is contained in:
80
backend/internal/dnsproviders/dns_cf.go
Normal file
80
backend/internal/dnsproviders/dns_cf.go
Normal file
@ -0,0 +1,80 @@
|
||||
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,
|
||||
},
|
||||
{
|
||||
Name: "Email",
|
||||
Type: "text",
|
||||
MetaKey: "email",
|
||||
EnvKey: "CF_Email",
|
||||
IsRequired: true,
|
||||
},
|
||||
{
|
||||
Name: "Token",
|
||||
Type: "text",
|
||||
MetaKey: "token",
|
||||
EnvKey: "CF_Token",
|
||||
IsRequired: true,
|
||||
IsSecret: true,
|
||||
},
|
||||
{
|
||||
Name: "Account ID",
|
||||
Type: "text",
|
||||
MetaKey: "account_id",
|
||||
EnvKey: "CF_Account_ID",
|
||||
IsRequired: true,
|
||||
},
|
||||
{
|
||||
Name: "Zone ID",
|
||||
Type: "string",
|
||||
MetaKey: "zone_id",
|
||||
EnvKey: "CF_Zone_ID",
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user