maddy

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

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

 1//go:build libdns_route53 || libdns_all
 2// +build libdns_route53 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/route53"
10)
11
12func init() {
13	module.Register("libdns.route53", func(modName, instName string, _, _ []string) (module.Module, error) {
14		p := route53.Provider{}
15		return &ProviderModule{
16			RecordDeleter:  &p,
17			RecordAppender: &p,
18			setConfig: func(c *config.Map) {
19				c.String("secret_access_key", false, false, "", &p.SecretAccessKey)
20				c.String("access_key_id", false, false, "", &p.AccessKeyId)
21			},
22			instName: instName,
23			modName:  modName,
24		}, nil
25	})
26}