2017-02-07 21:33:23 +00:00
|
|
|
package dns
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
2018-05-31 07:30:04 +00:00
|
|
|
"github.com/xenolf/lego/acme"
|
2018-07-23 15:30:03 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/acmedns"
|
2018-09-14 08:06:03 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/alidns"
|
2017-02-07 21:33:23 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/auroradns"
|
|
|
|
"github.com/xenolf/lego/providers/dns/azure"
|
2018-04-06 15:04:03 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/bluecat"
|
2017-02-07 21:33:23 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/cloudflare"
|
2018-02-12 17:10:05 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/cloudxns"
|
2017-02-07 21:33:23 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/digitalocean"
|
|
|
|
"github.com/xenolf/lego/providers/dns/dnsimple"
|
|
|
|
"github.com/xenolf/lego/providers/dns/dnsmadeeasy"
|
|
|
|
"github.com/xenolf/lego/providers/dns/dnspod"
|
2018-04-06 15:04:03 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/duckdns"
|
2017-02-07 21:33:23 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/dyn"
|
2018-04-06 15:04:03 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/exec"
|
2017-02-07 21:33:23 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/exoscale"
|
2018-04-06 15:04:03 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/fastdns"
|
2017-02-07 21:33:23 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/gandi"
|
2018-02-12 17:10:05 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/gandiv5"
|
2018-05-31 07:30:04 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/gcloud"
|
2018-04-06 15:04:03 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/glesys"
|
2018-02-12 17:10:05 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/godaddy"
|
2018-09-17 13:16:03 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/hostingde"
|
2018-09-14 08:06:03 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/iij"
|
2018-04-06 15:04:03 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/lightsail"
|
2017-02-07 21:33:23 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/linode"
|
|
|
|
"github.com/xenolf/lego/providers/dns/namecheap"
|
2018-04-06 15:04:03 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/namedotcom"
|
2018-09-14 08:06:03 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/netcup"
|
2018-07-03 10:44:04 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/nifcloud"
|
2017-02-07 21:33:23 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/ns1"
|
2017-10-31 09:42:03 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/otc"
|
2017-02-07 21:33:23 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/ovh"
|
|
|
|
"github.com/xenolf/lego/providers/dns/pdns"
|
|
|
|
"github.com/xenolf/lego/providers/dns/rackspace"
|
|
|
|
"github.com/xenolf/lego/providers/dns/rfc2136"
|
|
|
|
"github.com/xenolf/lego/providers/dns/route53"
|
2018-07-03 10:44:04 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/sakuracloud"
|
|
|
|
"github.com/xenolf/lego/providers/dns/vegadns"
|
2017-02-07 21:33:23 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/vultr"
|
|
|
|
)
|
|
|
|
|
2018-05-31 07:30:04 +00:00
|
|
|
// NewDNSChallengeProviderByName Factory for DNS providers
|
|
|
|
func NewDNSChallengeProviderByName(name string) (acme.ChallengeProvider, error) {
|
2017-02-07 21:33:23 +00:00
|
|
|
switch name {
|
2018-07-23 15:30:03 +00:00
|
|
|
case "acme-dns":
|
|
|
|
return acmedns.NewDNSProvider()
|
2018-09-14 08:06:03 +00:00
|
|
|
case "alidns":
|
|
|
|
return alidns.NewDNSProvider()
|
2017-02-07 21:33:23 +00:00
|
|
|
case "azure":
|
2018-07-03 10:44:04 +00:00
|
|
|
return azure.NewDNSProvider()
|
2017-02-07 21:33:23 +00:00
|
|
|
case "auroradns":
|
2018-07-03 10:44:04 +00:00
|
|
|
return auroradns.NewDNSProvider()
|
2018-04-06 15:04:03 +00:00
|
|
|
case "bluecat":
|
2018-07-03 10:44:04 +00:00
|
|
|
return bluecat.NewDNSProvider()
|
2017-02-07 21:33:23 +00:00
|
|
|
case "cloudflare":
|
2018-07-03 10:44:04 +00:00
|
|
|
return cloudflare.NewDNSProvider()
|
2018-02-12 17:10:05 +00:00
|
|
|
case "cloudxns":
|
2018-07-03 10:44:04 +00:00
|
|
|
return cloudxns.NewDNSProvider()
|
2017-02-07 21:33:23 +00:00
|
|
|
case "digitalocean":
|
2018-07-03 10:44:04 +00:00
|
|
|
return digitalocean.NewDNSProvider()
|
2017-02-07 21:33:23 +00:00
|
|
|
case "dnsimple":
|
2018-07-03 10:44:04 +00:00
|
|
|
return dnsimple.NewDNSProvider()
|
2017-02-07 21:33:23 +00:00
|
|
|
case "dnsmadeeasy":
|
2018-07-03 10:44:04 +00:00
|
|
|
return dnsmadeeasy.NewDNSProvider()
|
2017-02-07 21:33:23 +00:00
|
|
|
case "dnspod":
|
2018-07-03 10:44:04 +00:00
|
|
|
return dnspod.NewDNSProvider()
|
2018-04-06 15:04:03 +00:00
|
|
|
case "duckdns":
|
2018-07-03 10:44:04 +00:00
|
|
|
return duckdns.NewDNSProvider()
|
2017-02-07 21:33:23 +00:00
|
|
|
case "dyn":
|
2018-07-03 10:44:04 +00:00
|
|
|
return dyn.NewDNSProvider()
|
2018-04-06 15:04:03 +00:00
|
|
|
case "fastdns":
|
2018-07-03 10:44:04 +00:00
|
|
|
return fastdns.NewDNSProvider()
|
2017-02-07 21:33:23 +00:00
|
|
|
case "exoscale":
|
2018-07-03 10:44:04 +00:00
|
|
|
return exoscale.NewDNSProvider()
|
2017-02-07 21:33:23 +00:00
|
|
|
case "gandi":
|
2018-07-03 10:44:04 +00:00
|
|
|
return gandi.NewDNSProvider()
|
2018-02-12 17:10:05 +00:00
|
|
|
case "gandiv5":
|
2018-07-03 10:44:04 +00:00
|
|
|
return gandiv5.NewDNSProvider()
|
2018-04-06 15:04:03 +00:00
|
|
|
case "glesys":
|
2018-07-03 10:44:04 +00:00
|
|
|
return glesys.NewDNSProvider()
|
2017-02-07 21:33:23 +00:00
|
|
|
case "gcloud":
|
2018-07-03 10:44:04 +00:00
|
|
|
return gcloud.NewDNSProvider()
|
2017-11-30 09:44:03 +00:00
|
|
|
case "godaddy":
|
2018-07-03 10:44:04 +00:00
|
|
|
return godaddy.NewDNSProvider()
|
2018-09-17 13:16:03 +00:00
|
|
|
case "hostingde":
|
|
|
|
return hostingde.NewDNSProvider()
|
2018-09-14 08:06:03 +00:00
|
|
|
case "iij":
|
|
|
|
return iij.NewDNSProvider()
|
2018-04-06 15:04:03 +00:00
|
|
|
case "lightsail":
|
2018-07-03 10:44:04 +00:00
|
|
|
return lightsail.NewDNSProvider()
|
2017-02-07 21:33:23 +00:00
|
|
|
case "linode":
|
2018-07-03 10:44:04 +00:00
|
|
|
return linode.NewDNSProvider()
|
2017-02-07 21:33:23 +00:00
|
|
|
case "manual":
|
2018-07-03 10:44:04 +00:00
|
|
|
return acme.NewDNSProviderManual()
|
2017-02-07 21:33:23 +00:00
|
|
|
case "namecheap":
|
2018-07-03 10:44:04 +00:00
|
|
|
return namecheap.NewDNSProvider()
|
2018-04-06 15:04:03 +00:00
|
|
|
case "namedotcom":
|
2018-07-03 10:44:04 +00:00
|
|
|
return namedotcom.NewDNSProvider()
|
2018-09-14 08:06:03 +00:00
|
|
|
case "netcup":
|
|
|
|
return netcup.NewDNSProvider()
|
2018-07-03 10:44:04 +00:00
|
|
|
case "nifcloud":
|
|
|
|
return nifcloud.NewDNSProvider()
|
2017-02-07 21:33:23 +00:00
|
|
|
case "rackspace":
|
2018-07-03 10:44:04 +00:00
|
|
|
return rackspace.NewDNSProvider()
|
2017-02-07 21:33:23 +00:00
|
|
|
case "route53":
|
2018-07-03 10:44:04 +00:00
|
|
|
return route53.NewDNSProvider()
|
2017-02-07 21:33:23 +00:00
|
|
|
case "rfc2136":
|
2018-07-03 10:44:04 +00:00
|
|
|
return rfc2136.NewDNSProvider()
|
|
|
|
case "sakuracloud":
|
|
|
|
return sakuracloud.NewDNSProvider()
|
2017-02-07 21:33:23 +00:00
|
|
|
case "vultr":
|
2018-07-03 10:44:04 +00:00
|
|
|
return vultr.NewDNSProvider()
|
2017-02-07 21:33:23 +00:00
|
|
|
case "ovh":
|
2018-07-03 10:44:04 +00:00
|
|
|
return ovh.NewDNSProvider()
|
2017-02-07 21:33:23 +00:00
|
|
|
case "pdns":
|
2018-07-03 10:44:04 +00:00
|
|
|
return pdns.NewDNSProvider()
|
2017-02-07 21:33:23 +00:00
|
|
|
case "ns1":
|
2018-07-03 10:44:04 +00:00
|
|
|
return ns1.NewDNSProvider()
|
2017-10-31 09:42:03 +00:00
|
|
|
case "otc":
|
2018-07-03 10:44:04 +00:00
|
|
|
return otc.NewDNSProvider()
|
2018-04-06 15:04:03 +00:00
|
|
|
case "exec":
|
2018-07-03 10:44:04 +00:00
|
|
|
return exec.NewDNSProvider()
|
|
|
|
case "vegadns":
|
|
|
|
return vegadns.NewDNSProvider()
|
2017-02-07 21:33:23 +00:00
|
|
|
default:
|
2018-07-03 10:44:04 +00:00
|
|
|
return nil, fmt.Errorf("unrecognised DNS provider: %s", name)
|
2017-02-07 21:33:23 +00:00
|
|
|
}
|
|
|
|
}
|