mirror of
https://github.com/foxcpp/maddy.git
synced 2025-04-03 05:07:38 +03:00
26 lines
653 B
Go
26 lines
653 B
Go
//go:build libdns_alidns || libdns_all
|
|
// +build libdns_alidns libdns_all
|
|
|
|
package libdns
|
|
|
|
import (
|
|
"github.com/foxcpp/maddy/framework/config"
|
|
"github.com/foxcpp/maddy/framework/module"
|
|
"github.com/libdns/alidns"
|
|
)
|
|
|
|
func init() {
|
|
module.Register("libdns.alidns", func(modName, instName string, _, _ []string) (module.Module, error) {
|
|
p := alidns.Provider{}
|
|
return &ProviderModule{
|
|
RecordDeleter: &p,
|
|
RecordAppender: &p,
|
|
setConfig: func(c *config.Map) {
|
|
c.String("key_id", false, false, "", &p.AccKeyID)
|
|
c.String("key_secret", false, false, "", &p.AccKeySecret)
|
|
},
|
|
instName: instName,
|
|
modName: modName,
|
|
}, nil
|
|
})
|
|
}
|