1//go:build libdns_gcore || !libdns_separate2// +build libdns_gcore !libdns_separate34package libdns56import (7 "fmt"89 "github.com/foxcpp/maddy/framework/config"10 "github.com/foxcpp/maddy/framework/module"11 "github.com/libdns/gcore"12)1314func init() {15 module.Register("libdns.gcore", func(modName, instName string, _, _ []string) (module.Module, error) {16 p := gcore.Provider{}17 return &ProviderModule{18 RecordDeleter: &p,19 RecordAppender: &p,20 setConfig: func(c *config.Map) {21 c.String("api_key", false, false, "", &p.APIKey)22 },23 afterConfig: func() error {24 if p.APIKey == "" {25 return fmt.Errorf("libdns.gcore: api_key should be specified")26 }27 return nil28 },2930 instName: instName,31 modName: modName,32 }, nil33 })34}