添加DNS账号时自动读取DNS服务商下域名

This commit is contained in:
GoEdgeLab
2021-08-19 14:26:34 +08:00
parent ec1c59f33a
commit b2e3fba97e
18 changed files with 308 additions and 3 deletions

View File

@@ -49,6 +49,16 @@ func (this *CustomHTTPProvider) Auth(params maps.Map) error {
return nil
}
// GetDomains 获取所有域名列表
func (this *CustomHTTPProvider) GetDomains() (domains []string, err error) {
resp, err := this.post(maps.Map{})
if err != nil {
return nil, err
}
err = json.Unmarshal(resp, &domains)
return
}
// GetRecords 获取域名解析记录列表
func (this *CustomHTTPProvider) GetRecords(domain string) (records []*dnstypes.Record, err error) {
resp, err := this.post(maps.Map{