mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-23 22:27:38 -05:00
caddytls: introduced own ChallengeProvider type to fix imports related to vendor (#1700)
* introduced own ChallengeProvider type, based on acme.ChallengeProvider to avoid vendoring/version mismatches in Caddy plugins; see Caddy issue #1697 * fixed up comments for ChallengeProvider * moved ChallengeProvider to caddytls/tls.go
This commit is contained in:
parent
8a058828a3
commit
a368230ba5
1 changed files with 10 additions and 1 deletions
|
@ -140,9 +140,18 @@ func QualifiesForManagedTLS(c ConfigHolder) bool {
|
|||
(HostQualifies(c.Host()) || tlsConfig.OnDemand)
|
||||
}
|
||||
|
||||
// ChallengeProvider defines an own type that should be used in Caddy plugins
|
||||
// over acme.ChallengeProvider. Using acme.ChallengeProvider causes version mismatches
|
||||
// with vendored dependencies (see https://github.com/mattfarina/golang-broken-vendor)
|
||||
//
|
||||
// acme.ChallengeProvider is an interface that allows the implementation of custom
|
||||
// challenge providers. For more details, see:
|
||||
// https://godoc.org/github.com/xenolf/lego/acme#ChallengeProvider
|
||||
type ChallengeProvider acme.ChallengeProvider
|
||||
|
||||
// DNSProviderConstructor is a function that takes credentials and
|
||||
// returns a type that can solve the ACME DNS challenges.
|
||||
type DNSProviderConstructor func(credentials ...string) (acme.ChallengeProvider, error)
|
||||
type DNSProviderConstructor func(credentials ...string) (ChallengeProvider, error)
|
||||
|
||||
// dnsProviders is the list of DNS providers that have been plugged in.
|
||||
var dnsProviders = make(map[string]DNSProviderConstructor)
|
||||
|
|
Loading…
Reference in a new issue