feat(cert): add registry-based DNS provider system with 21 libdns providers

Refs #37
This commit is contained in:
xboard
2026-04-20 03:01:21 +08:00
parent 07c37023ab
commit 68ca2d2716
31 changed files with 1575 additions and 48 deletions
+20
View File
@@ -0,0 +1,20 @@
package dnsproviders
import (
"github.com/caddyserver/certmagic"
"github.com/libdns/gandi"
)
func init() {
Register(&Provider{
Names: []string{"gandi"},
EnvVars: []string{"GANDI_BEARER_TOKEN", "GANDI_API_TOKEN"},
Build: func(env map[string]string) (certmagic.DNSProvider, error) {
token := firstOf(env, "GANDI_BEARER_TOKEN", "GANDI_API_TOKEN", "GANDI_PERSONAL_ACCESS_TOKEN")
if token == "" {
return nil, missingEnvErr("gandi", "GANDI_BEARER_TOKEN")
}
return &gandi.Provider{BearerToken: token}, nil
},
})
}