maddy

Fork https://github.com/foxcpp/maddy

git clone git://git.lin.moe/go/maddy.git

 1//go:build libdns_leaseweb || libdns_all
 2// +build libdns_leaseweb libdns_all
 3
 4package libdns
 5
 6import (
 7	"github.com/foxcpp/maddy/framework/config"
 8	"github.com/foxcpp/maddy/framework/module"
 9	"github.com/libdns/leaseweb"
10)
11
12func init() {
13	module.Register("libdns.leaseweb", func(modName, instName string, _, _ []string) (module.Module, error) {
14		p := leaseweb.Provider{}
15		return &ProviderModule{
16			RecordDeleter:  &p,
17			RecordAppender: &p,
18			setConfig: func(c *config.Map) {
19				c.String("api_key", false, false, "", &p.APIKey)
20			},
21			instName: instName,
22			modName:  modName,
23		}, nil
24	})
25}