2016-11-18 13:12:13 +00:00
|
|
|
package dns
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"github.com/xenolf/lego/acme"
|
|
|
|
"github.com/xenolf/lego/providers/dns/auroradns"
|
|
|
|
"github.com/xenolf/lego/providers/dns/azure"
|
2018-05-30 17:53:04 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/bluecat"
|
2016-11-18 13:12:13 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/cloudflare"
|
2018-02-02 19:41:35 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/cloudxns"
|
2016-11-18 13:12:13 +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-02 14:02:54 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/duckdns"
|
2016-11-18 13:12:13 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/dyn"
|
2018-03-27 14:10:38 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/exec"
|
2016-11-18 13:12:13 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/exoscale"
|
2018-04-03 14:22:13 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/fastdns"
|
2016-11-18 13:12:13 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/gandi"
|
2018-02-02 19:22:33 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/gandiv5"
|
2018-05-30 18:20:21 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/gcloud"
|
2018-03-31 14:33:48 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/glesys"
|
2018-02-02 19:22:33 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/godaddy"
|
2018-02-18 15:27:58 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/lightsail"
|
2016-11-18 13:12:13 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/linode"
|
|
|
|
"github.com/xenolf/lego/providers/dns/namecheap"
|
2018-03-14 17:43:09 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/namedotcom"
|
2018-07-01 00:13:22 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/nifcloud"
|
2016-11-18 13:12:13 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/ns1"
|
2017-07-19 22:54:35 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/otc"
|
2016-11-18 13:12:13 +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-06-21 19:24:45 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/sakuracloud"
|
2018-06-30 23:45:24 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/vegadns"
|
2016-11-18 13:12:13 +00:00
|
|
|
"github.com/xenolf/lego/providers/dns/vultr"
|
|
|
|
)
|
|
|
|
|
2018-05-30 17:53:04 +00:00
|
|
|
// NewDNSChallengeProviderByName Factory for DNS providers
|
2016-11-18 13:12:13 +00:00
|
|
|
func NewDNSChallengeProviderByName(name string) (acme.ChallengeProvider, error) {
|
|
|
|
switch name {
|
|
|
|
case "azure":
|
2018-06-21 17:06:16 +00:00
|
|
|
return azure.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "auroradns":
|
2018-06-21 17:06:16 +00:00
|
|
|
return auroradns.NewDNSProvider()
|
2018-04-03 02:50:15 +00:00
|
|
|
case "bluecat":
|
2018-06-21 17:06:16 +00:00
|
|
|
return bluecat.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "cloudflare":
|
2018-06-21 17:06:16 +00:00
|
|
|
return cloudflare.NewDNSProvider()
|
2018-02-02 19:41:35 +00:00
|
|
|
case "cloudxns":
|
2018-06-21 17:06:16 +00:00
|
|
|
return cloudxns.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "digitalocean":
|
2018-06-21 17:06:16 +00:00
|
|
|
return digitalocean.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "dnsimple":
|
2018-06-21 17:06:16 +00:00
|
|
|
return dnsimple.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "dnsmadeeasy":
|
2018-06-21 17:06:16 +00:00
|
|
|
return dnsmadeeasy.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "dnspod":
|
2018-06-21 17:06:16 +00:00
|
|
|
return dnspod.NewDNSProvider()
|
2018-04-02 14:02:54 +00:00
|
|
|
case "duckdns":
|
2018-06-21 17:06:16 +00:00
|
|
|
return duckdns.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "dyn":
|
2018-06-21 17:06:16 +00:00
|
|
|
return dyn.NewDNSProvider()
|
2018-04-03 14:22:13 +00:00
|
|
|
case "fastdns":
|
2018-06-21 17:06:16 +00:00
|
|
|
return fastdns.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "exoscale":
|
2018-06-21 17:06:16 +00:00
|
|
|
return exoscale.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "gandi":
|
2018-06-21 17:06:16 +00:00
|
|
|
return gandi.NewDNSProvider()
|
2018-02-02 19:22:33 +00:00
|
|
|
case "gandiv5":
|
2018-06-21 17:06:16 +00:00
|
|
|
return gandiv5.NewDNSProvider()
|
2018-03-31 14:33:48 +00:00
|
|
|
case "glesys":
|
2018-06-21 17:06:16 +00:00
|
|
|
return glesys.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "gcloud":
|
2018-06-21 17:06:16 +00:00
|
|
|
return gcloud.NewDNSProvider()
|
2017-10-25 19:55:29 +00:00
|
|
|
case "godaddy":
|
2018-06-21 17:06:16 +00:00
|
|
|
return godaddy.NewDNSProvider()
|
2018-02-18 15:27:58 +00:00
|
|
|
case "lightsail":
|
2018-06-21 17:06:16 +00:00
|
|
|
return lightsail.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "linode":
|
2018-06-21 17:06:16 +00:00
|
|
|
return linode.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "manual":
|
2018-06-21 17:06:16 +00:00
|
|
|
return acme.NewDNSProviderManual()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "namecheap":
|
2018-06-21 17:06:16 +00:00
|
|
|
return namecheap.NewDNSProvider()
|
2018-03-14 17:43:09 +00:00
|
|
|
case "namedotcom":
|
2018-06-21 17:06:16 +00:00
|
|
|
return namedotcom.NewDNSProvider()
|
2018-07-01 00:13:22 +00:00
|
|
|
case "nifcloud":
|
|
|
|
return nifcloud.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "rackspace":
|
2018-06-21 17:06:16 +00:00
|
|
|
return rackspace.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "route53":
|
2018-06-21 17:06:16 +00:00
|
|
|
return route53.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "rfc2136":
|
2018-06-21 17:06:16 +00:00
|
|
|
return rfc2136.NewDNSProvider()
|
2018-06-21 19:24:45 +00:00
|
|
|
case "sakuracloud":
|
|
|
|
return sakuracloud.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "vultr":
|
2018-06-21 17:06:16 +00:00
|
|
|
return vultr.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "ovh":
|
2018-06-21 17:06:16 +00:00
|
|
|
return ovh.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "pdns":
|
2018-06-21 17:06:16 +00:00
|
|
|
return pdns.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
case "ns1":
|
2018-06-21 17:06:16 +00:00
|
|
|
return ns1.NewDNSProvider()
|
2017-07-19 22:54:35 +00:00
|
|
|
case "otc":
|
2018-06-21 17:06:16 +00:00
|
|
|
return otc.NewDNSProvider()
|
2018-03-27 14:10:38 +00:00
|
|
|
case "exec":
|
2018-06-21 17:06:16 +00:00
|
|
|
return exec.NewDNSProvider()
|
2018-06-30 23:45:24 +00:00
|
|
|
case "vegadns":
|
|
|
|
return vegadns.NewDNSProvider()
|
2016-11-18 13:12:13 +00:00
|
|
|
default:
|
2018-06-21 17:06:16 +00:00
|
|
|
return nil, fmt.Errorf("unrecognised DNS provider: %s", name)
|
2016-11-18 13:12:13 +00:00
|
|
|
}
|
|
|
|
}
|