2019-03-08 18:47:06 +00:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
// CODE GENERATED AUTOMATICALLY
|
|
|
|
// THIS FILE MUST NOT BE EDITED BY HAND
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"os"
|
2019-03-12 08:51:23 +00:00
|
|
|
"sort"
|
2019-03-08 18:47:06 +00:00
|
|
|
"strings"
|
|
|
|
"text/tabwriter"
|
|
|
|
|
2019-03-11 16:56:48 +00:00
|
|
|
"github.com/go-acme/lego/log"
|
2019-03-08 18:47:06 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func allDNSCodes() string {
|
2019-03-12 08:51:23 +00:00
|
|
|
providers := []string{
|
|
|
|
"manual",
|
2019-03-08 18:47:06 +00:00
|
|
|
{{- range $provider := .Providers }}
|
|
|
|
"{{ $provider.Code }}",
|
|
|
|
{{- end}}
|
2019-03-12 08:51:23 +00:00
|
|
|
}
|
|
|
|
sort.Strings(providers)
|
|
|
|
return strings.Join(providers, ", ")
|
2019-03-08 18:47:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func displayDNSHelp(name string) {
|
|
|
|
w := tabwriter.NewWriter(os.Stdout, 0, 8, 1, '\t', 0)
|
|
|
|
switch name {
|
|
|
|
{{ range $provider := .Providers }}
|
|
|
|
case "{{ $provider.Code }}":
|
|
|
|
// generated from: {{ .GeneratedFrom }}
|
|
|
|
fmt.Fprintln(w, `Configuration for {{ $provider.Name }}.`)
|
|
|
|
fmt.Fprintln(w, `Code: '{{ $provider.Code }}'`)
|
|
|
|
fmt.Fprintln(w)
|
|
|
|
{{if $provider.Configuration }}{{if $provider.Configuration.Credentials }}
|
|
|
|
fmt.Fprintln(w, `Credentials:`)
|
|
|
|
{{- range $k, $v := $provider.Configuration.Credentials }}
|
|
|
|
fmt.Fprintln(w,` - "{{ $k }}": {{ safe $v }}`)
|
|
|
|
{{- end}}
|
|
|
|
fmt.Fprintln(w)
|
|
|
|
{{end}}{{if $provider.Configuration.Additional }}
|
|
|
|
fmt.Fprintln(w, `Additional Configuration:`)
|
|
|
|
{{- range $k, $v := $provider.Configuration.Additional }}
|
|
|
|
fmt.Fprintln(w, ` - "{{ $k }}": {{ safe $v }}`)
|
|
|
|
{{- end}}
|
|
|
|
{{end}}{{end}}
|
|
|
|
fmt.Fprintln(w)
|
2019-03-11 16:56:48 +00:00
|
|
|
fmt.Fprintln(w, `More information: https://go-acme.github.io/lego/dns/{{ $provider.Code }}`)
|
2019-03-08 18:47:06 +00:00
|
|
|
{{end}}
|
|
|
|
case "manual":
|
|
|
|
fmt.Fprintln(w, `Solving the DNS-01 challenge using CLI prompt.`)
|
|
|
|
default:
|
|
|
|
log.Fatalf("%q is not yet supported.", name)
|
|
|
|
}
|
|
|
|
w.Flush()
|
|
|
|
}
|