Skip to content

Commit

Permalink
add ACME-DNS provider for libdns
Browse files Browse the repository at this point in the history
  • Loading branch information
rjocoleman committed Mar 16, 2024
1 parent 798c411 commit a11ac9d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ require (
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/klauspost/compress v1.17.4 // indirect
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
github.com/libdns/acmedns v0.2.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,8 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/libdns/acmedns v0.2.0 h1:zTXdHZwe3r2issdVRyqt5/4X2yHpiBVmFnTrwBA29ik=
github.com/libdns/acmedns v0.2.0/go.mod h1:XlKHilQQK/IGHYY//vCb903PdG4Wc/XnDQzcMp2hV3g=
github.com/libdns/alidns v1.0.3-0.20230628155627-8d5d630d5516 h1:tPVSANkA4lo+K65YjsQcaQ1uh6sb0zRBQDz78l1Fo4Y=
github.com/libdns/alidns v1.0.3-0.20230628155627-8d5d630d5516/go.mod h1:e18uAG6GanfRhcJj6/tps2rCMzQJaYVcGKT+ELjdjGE=
github.com/libdns/cloudflare v0.1.1-0.20221006221909-9d3ab3c3cddd h1:c5hc0b5/pFqFeyQaOTVmYJbyr+QwZZFcMnjgtZGIk6k=
Expand Down
28 changes: 28 additions & 0 deletions internal/libdns/acmedns.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//go:build libdns_acmedns || libdns_all
// +build libdns_acmedns libdns_all

package libdns

import (
"github.com/foxcpp/maddy/framework/config"
"github.com/foxcpp/maddy/framework/module"
"github.com/libdns/acmedns"
)

func init() {
module.Register("libdns.acmedns", func(modName, instName string, _, _ []string) (module.Module, error) {
p := acmedns.Provider{}
return &ProviderModule{
RecordDeleter: &p,
RecordAppender: &p,
setConfig: func(c *config.Map) {
c.String("username", false, true, "", &p.Username)
c.String("password", false, true, "", &p.Password)
c.String("subdomain", false, true, "", &p.Subdomain)
c.String("server_url", false, true, "", &p.ServerURL)
},
instName: instName,
modName: modName,
}, nil
})
}

0 comments on commit a11ac9d

Please sign in to comment.