mirror of
https://github.com/usual2970/certimate.git
synced 2025-07-20 01:47:58 +00:00
add tencent cdn deployer
This commit is contained in:
@@ -1,17 +1,13 @@
|
||||
package applicant
|
||||
|
||||
import (
|
||||
"certimate/internal/domain"
|
||||
"encoding/json"
|
||||
"os"
|
||||
|
||||
"github.com/go-acme/lego/v4/providers/dns/tencentcloud"
|
||||
)
|
||||
|
||||
type tencentAccess struct {
|
||||
SecretId string `json:"secretId"`
|
||||
SecretKey string `json:"secretKey"`
|
||||
}
|
||||
|
||||
type tencent struct {
|
||||
option *ApplyOption
|
||||
}
|
||||
@@ -24,7 +20,7 @@ func NewTencent(option *ApplyOption) Applicant {
|
||||
|
||||
func (t *tencent) Apply() (*Certificate, error) {
|
||||
|
||||
access := &tencentAccess{}
|
||||
access := &domain.TencentAccess{}
|
||||
json.Unmarshal([]byte(t.option.Access), access)
|
||||
|
||||
os.Setenv("TENCENTCLOUD_SECRET_ID", access.SecretId)
|
||||
|
Reference in New Issue
Block a user