[SSL证书]实现对ACME任务的增删改查

This commit is contained in:
GoEdgeLab
2020-11-25 21:19:22 +08:00
parent 12f348a592
commit 29cbabebf5
22 changed files with 862 additions and 180 deletions

View File

@@ -0,0 +1,20 @@
package models
import (
"encoding/json"
"github.com/iwind/TeaGo/logs"
)
// 将域名解析成字符串数组
func (this *ACMETask) DecodeDomains() []string {
if len(this.Domains) == 0 || this.Domains == "null" {
return nil
}
result := []string{}
err := json.Unmarshal([]byte(this.Domains), &result)
if err != nil {
logs.Error(err)
return nil
}
return result
}