mirror of
https://github.com/go-acme/lego.git
synced 2024-12-23 09:15:11 +02:00
28 lines
781 B
Cheetah
28 lines
781 B
Cheetah
|
// Code generated by 'make generate-dns'; DO NOT EDIT.
|
||
|
|
||
|
package dns
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
|
||
|
"github.com/go-acme/lego/v4/challenge"
|
||
|
"github.com/go-acme/lego/v4/challenge/dns01"
|
||
|
{{- range $provider := .Providers }}
|
||
|
"github.com/go-acme/lego/v4/providers/dns/{{ cleanName $provider.Code }}"
|
||
|
{{- end}}
|
||
|
)
|
||
|
|
||
|
// NewDNSChallengeProviderByName Factory for DNS providers.
|
||
|
func NewDNSChallengeProviderByName(name string) (challenge.Provider, error) {
|
||
|
switch name {
|
||
|
case "manual":
|
||
|
return dns01.NewDNSProviderManual()
|
||
|
{{- range $provider := .Providers }}
|
||
|
case "{{ $provider.Code }}"{{range $alias := $provider.Aliases }},"{{ $alias }}"{{end}}:
|
||
|
return {{ cleanName $provider.Code }}.NewDNSProvider()
|
||
|
{{- end}}
|
||
|
default:
|
||
|
return nil, fmt.Errorf("unrecognized DNS provider: %s", name)
|
||
|
}
|
||
|
}
|