Support for Alibaba Cloud DNS provider.

This commit is contained in:
yoan
2024-08-22 09:28:13 +08:00
parent 6d9fef3d2a
commit d6c4a65106
4 changed files with 100 additions and 5 deletions

View File

@@ -17,6 +17,7 @@ import (
const (
configTypeTencent = "tencent"
configTypeAliyun = "aliyun"
)
type Certificate struct {
@@ -56,13 +57,16 @@ type Applicant interface {
func Get(record *models.Record) (Applicant, error) {
access := record.ExpandedOne("access")
option := &ApplyOption{
Email: "536464346@qq.com",
Domain: record.GetString("domain"),
Access: access.GetString("config"),
}
switch access.GetString("configType") {
case configTypeTencent:
return NewTencent(&ApplyOption{
Email: "536464346@qq.com",
Domain: record.GetString("domain"),
Access: access.GetString("config"),
}), nil
return NewTencent(option), nil
case configTypeAliyun:
return NewAliyun(option), nil
default:
return nil, errors.New("unknown config type")
}