improve: 修改 ddns 包依赖结构

This commit is contained in:
Mmx233
2022-12-08 16:39:17 +08:00
parent 2a386ff049
commit a4e9f35303
6 changed files with 35 additions and 22 deletions

19
dns/models.go Normal file
View File

@@ -0,0 +1,19 @@
package dns
import "net/http"
type Provider interface {
SetDomainRecord(domain, ip string) error
}
type Config struct {
Provider string
IP string
Conf map[string]interface{}
Http *http.Client
}
type BasicConfig struct {
Domain string `mapstructure:"domain"`
Other map[string]interface{} `mapstructure:",remain"`
}