-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #689 from rjocoleman/feat/libdns_acmedns
Add ACME-DNS provider for libdns
- Loading branch information
Showing
4 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
}) | ||
} |