This commit is contained in:
Fu Diwei 2026-07-13 10:59:35 +08:00
parent 411bb9e20a
commit db94e5ac00
20 changed files with 446 additions and 422 deletions

52
go.mod
View File

@ -27,22 +27,22 @@ require (
github.com/alibabacloud-go/tea v1.5.2
github.com/alibabacloud-go/tea-utils/v2 v2.0.9
github.com/alibabacloud-go/vod-20170321/v4 v4.11.3
github.com/alibabacloud-go/waf-openapi-20211001/v7 v7.8.2
github.com/aws/aws-sdk-go-v2 v1.42.1
github.com/aws/aws-sdk-go-v2/config v1.32.29
github.com/aws/aws-sdk-go-v2/credentials v1.19.28
github.com/aws/aws-sdk-go-v2/service/acm v1.42.0
github.com/aws/aws-sdk-go-v2/service/amplify v1.40.0
github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.36.0
github.com/aws/aws-sdk-go-v2/service/cloudfront v1.66.0
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.35.0
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.56.0
github.com/aws/aws-sdk-go-v2/service/iam v1.55.0
github.com/aws/aws-sdk-go-v2/service/lightsail v1.57.0
github.com/aws/smithy-go v1.27.3
github.com/baidubce/bce-sdk-go v0.9.270
github.com/byteplus-sdk/byteplus-go-sdk-v2 v1.0.71
github.com/byteplus-sdk/byteplus-sdk-golang v1.0.71
github.com/alibabacloud-go/waf-openapi-20211001/v7 v7.8.1
github.com/aws/aws-sdk-go-v2 v1.41.12
github.com/aws/aws-sdk-go-v2/config v1.32.23
github.com/aws/aws-sdk-go-v2/credentials v1.19.22
github.com/aws/aws-sdk-go-v2/service/acm v1.39.5
github.com/aws/aws-sdk-go-v2/service/amplify v1.39.3
github.com/aws/aws-sdk-go-v2/service/apigatewayv2 v1.35.5
github.com/aws/aws-sdk-go-v2/service/cloudfront v1.65.1
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.34.5
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.55.3
github.com/aws/aws-sdk-go-v2/service/iam v1.54.3
github.com/aws/aws-sdk-go-v2/service/lightsail v1.55.3
github.com/aws/smithy-go v1.27.1
github.com/baidubce/bce-sdk-go v0.9.268
github.com/byteplus-sdk/byteplus-go-sdk-v2 v1.0.66
github.com/byteplus-sdk/byteplus-sdk-golang v1.0.68
github.com/go-acme/lego/v5 v5.2.2
github.com/go-cmd/cmd v1.4.3
github.com/go-resty/resty/v2 v2.17.2
@ -177,16 +177,16 @@ require (
github.com/alibabacloud-go/endpoint-util v1.1.1 // indirect
github.com/aliyun/credentials-go v1.4.12 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.30 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.30 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.30 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.31 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.13 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.30 // indirect
github.com/aws/aws-sdk-go-v2/service/signin v1.4.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.32.0 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.37.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.44.0 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.28 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.28 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.28 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.29 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.12 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.28 // indirect
github.com/aws/aws-sdk-go-v2/service/signin v1.1.4 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.31.2 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.43.2 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/bodgit/gssapi v0.0.3 // indirect
github.com/bodgit/tsig v1.3.1 // indirect

View File

@ -4,11 +4,12 @@ import (
"fmt"
"strings"
"github.com/samber/lo"
"github.com/certimate-go/certimate/internal/domain"
"github.com/certimate-go/certimate/pkg/core"
dplyimpl "github.com/certimate-go/certimate/pkg/core/deployer/providers/tencentcloud-eomakers"
xmaps "github.com/certimate-go/certimate/pkg/utils/maps"
"github.com/samber/lo"
)
func init() {
@ -23,10 +24,10 @@ func init() {
provider, err := dplyimpl.NewDeployer(&dplyimpl.DeployerConfig{
SecretId: credentials.SecretId,
SecretKey: credentials.SecretKey,
APIToken: xmaps.GetString(options.ProviderExtendedConfig, "apiToken"),
ProjectId: credentials.ProjectId,
Endpoint: xmaps.GetString(options.ProviderExtendedConfig, "endpoint"),
MakersId: xmaps.GetString(options.ProviderExtendedConfig, "makersId"),
MakersApiToken: xmaps.GetString(options.ProviderExtendedConfig, "apiToken"),
MakersProjectId: xmaps.GetString(options.ProviderExtendedConfig, "projectId"),
DomainMatchPattern: xmaps.GetString(options.ProviderExtendedConfig, "domainMatchPattern"),
Domains: lo.Filter(strings.Split(xmaps.GetString(options.ProviderExtendedConfig, "domains"), ";"), func(s string, _ int) bool { return s != "" }),
EnableMultipleSSL: xmaps.GetBool(options.ProviderExtendedConfig, "enableMultipleSSL"),

View File

@ -9,17 +9,19 @@ import (
"strings"
"time"
"github.com/samber/lo"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile"
tceo "github.com/certimate-go/certimate/pkg/sdk3rd-trimmed/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
"github.com/certimate-go/certimate/pkg/core"
cmgrimpl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/tencentcloud-ssl"
tceo "github.com/certimate-go/certimate/pkg/sdk3rd-trimmed/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
teom "github.com/certimate-go/certimate/pkg/sdk3rd/tencentcloud/eomakers"
tceomakersssdk "github.com/certimate-go/certimate/pkg/sdk3rd/tencentcloud/teomakers"
xcert "github.com/certimate-go/certimate/pkg/utils/cert"
xcerthostname "github.com/certimate-go/certimate/pkg/utils/cert/hostname"
xcertkey "github.com/certimate-go/certimate/pkg/utils/cert/key"
xtencentcloud "github.com/certimate-go/certimate/pkg/utils/third-party/tencentcloud"
"github.com/samber/lo"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile"
)
type (
@ -28,44 +30,47 @@ type (
)
type DeployerConfig struct {
// Tencent Cloud SecretId
// 腾讯云 SecretId。
SecretId string `json:"secretId"`
// Tencent Cloud SecretKey
// 腾讯云 SecretKey。
SecretKey string `json:"secretKey"`
// Tencent Cloud EdgeOne Makers APIToken
APIToken string `json:"apiToken"`
// Tencent Cloud ProjectId
// 腾讯云项目 ID。
ProjectId int64 `json:"projectId,omitempty"`
// Tencent Cloud Endpoint
// 腾讯云接口端点。
Endpoint string `json:"endpoint,omitempty"`
// Tencent Cloud MakersId
MakersId string `json:"makersId,omitempty"`
// DomainMatchPattern is the match mode of the domain
// EdgeOne Makers API Token。
MakersApiToken string `json:"makersApiToken"`
// EdgeOne Makers 项目 ID。
MakersProjectId string `json:"makersProjectId"`
// 域名匹配模式。
// 零值时默认值 [DOMAIN_MATCH_PATTERN_EXACT]。
DomainMatchPattern string `json:"domainMatchPattern,omitempty"`
// Domains is the list of acceleration domains
// 加速域名列表(支持泛域名)。
Domains []string `json:"domains"`
// EnableMultipleSSL whether the user has enabled multiple certificates mode
// 是否启用多证书模式。
EnableMultipleSSL bool `json:"enableMultipleSSL,omitempty"`
}
type Deployer struct {
config *DeployerConfig
logger *slog.Logger
apiClient *teom.Client
sdkClient *tceo.Client
sdkClients *wSDKClients
sdkCertmgr core.Certmgr
}
var _ Provider = (*Deployer)(nil)
type wSDKClients struct {
TEO *tceo.Client
TEOMakers *tceomakersssdk.Client
}
func NewDeployer(config *DeployerConfig) (*Deployer, error) {
if config == nil {
return nil, fmt.Errorf("the configuration of the deployer provider is nil")
}
apiClient := teom.NewClient(config.APIToken)
sdkClient, err := createSDKClient(config.SecretId, config.SecretKey, config.Endpoint)
clients, err := createSDKClients(config.SecretId, config.SecretKey, config.Endpoint, config.MakersApiToken)
if err != nil {
return nil, fmt.Errorf("could not create client: %w", err)
}
@ -83,8 +88,7 @@ func NewDeployer(config *DeployerConfig) (*Deployer, error) {
return &Deployer{
config: config,
logger: slog.Default(),
apiClient: apiClient,
sdkClient: sdkClient,
sdkClients: clients,
sdkCertmgr: pcertmgr,
}, nil
}
@ -100,15 +104,11 @@ func (d *Deployer) SetLogger(logger *slog.Logger) {
}
func (d *Deployer) Deploy(ctx context.Context, certPEM, privkeyPEM string) (*DeployResult, error) {
if d.config.APIToken == "" {
return nil, fmt.Errorf("config `apiToken` is required")
if d.config.MakersProjectId == "" {
return nil, fmt.Errorf("config `makersProjectId` is required")
}
if d.config.MakersId == "" {
return nil, fmt.Errorf("config `makersId` is required")
}
// Upload certificate
// 上传证书
upres, err := d.sdkCertmgr.Upload(ctx, certPEM, privkeyPEM)
if err != nil {
return nil, fmt.Errorf("failed to upload certificate file: %w", err)
@ -116,16 +116,13 @@ func (d *Deployer) Deploy(ctx context.Context, certPEM, privkeyPEM string) (*Dep
d.logger.Info("ssl certificate uploaded", slog.Any("result", upres))
}
// Get all deployable domains
domainsInMakers, err := d.getAllDomainsInMakers(ctx, d.config.MakersId)
// 获取全部可部署的域名列表
domainsInMakers, err := d.getAllDomainsInProject(ctx, d.config.MakersProjectId)
if err != nil {
return nil, err
}
if len(domainsInMakers) == 0 {
return nil, fmt.Errorf("could not find any custom domains in edgeone makers project")
}
// Get domains ready to deploy
// 获取待部署的域名列表
var domains []string
switch d.config.DomainMatchPattern {
case "", DomainMatchPatternExact:
@ -143,8 +140,8 @@ func (d *Deployer) Deploy(ctx context.Context, certPEM, privkeyPEM string) (*Dep
return nil, fmt.Errorf("config `domains` is required")
}
domainCandidates := lo.Map(domainsInMakers, func(domainInfo *teom.DescribePagesZoneCustomDomains, _ int) string {
return domainInfo.Domain
domainCandidates := lo.Map(domainsInMakers, func(domainInfo *tceomakersssdk.PagesZoneCustomDomain, _ int) string {
return lo.FromPtr(domainInfo.Domain)
})
domains = lo.Filter(domainCandidates, func(domain string, _ int) bool {
for _, configDomain := range d.config.Domains {
@ -161,8 +158,8 @@ func (d *Deployer) Deploy(ctx context.Context, certPEM, privkeyPEM string) (*Dep
case DomainMatchPatternCertSan:
{
domainCandidates := lo.Map(domainsInMakers, func(domainInfo *teom.DescribePagesZoneCustomDomains, _ int) string {
return domainInfo.Domain
domainCandidates := lo.Map(domainsInMakers, func(domainInfo *tceomakersssdk.PagesZoneCustomDomain, _ int) string {
return lo.FromPtr(domainInfo.Domain)
})
domains = lo.Filter(domainCandidates, func(domain string, _ int) bool {
return xcerthostname.IsMatchByCertificatePEM(certPEM, domain)
@ -176,58 +173,45 @@ func (d *Deployer) Deploy(ctx context.Context, certPEM, privkeyPEM string) (*Dep
return nil, fmt.Errorf("unsupported domain match pattern: '%s'", d.config.DomainMatchPattern)
}
// Batch deploy domains
// 批量更新域名证书
if len(domains) == 0 {
d.logger.Info("no edgeone makers domains to deploy")
} else {
d.logger.Info("found edgeone makers domains to deploy", slog.Any("domains", domains))
// In Tencent Cloud Makers, all domains belong to a same special zone
// You can find this at the console: https://console.cloud.tencent.com/edgeone/makers
// 获取站点 ID
zoneId := domainsInMakers[0].ZoneId
// Get host certificates
// 获取证书列表
describeHostCertificatesReq := tceo.NewDescribeHostCertificatesRequest()
describeHostCertificatesReq.ZoneId = zoneId
describeHostCertificatesResp, err := d.sdkClient.DescribeHostCertificatesWithContext(
ctx, describeHostCertificatesReq,
)
d.logger.Debug(
"sdk request 'teo.DescribeHostCertificates'",
slog.Any("request", describeHostCertificatesReq),
slog.Any("response", describeHostCertificatesResp),
)
describeHostCertificatesResp, err := d.sdkClients.TEO.DescribeHostCertificatesWithContext(ctx, describeHostCertificatesReq)
d.logger.Debug("sdk request 'teo.DescribeHostCertificates'", slog.Any("request", describeHostCertificatesReq), slog.Any("response", describeHostCertificatesResp))
if err != nil {
return nil, fmt.Errorf("failed to execute sdk request 'teo.DescribeHostCertificates': %w", err)
}
// Skip deployed domains
// 跳过已部署过的域名
domains = lo.Filter(domains, func(domain string, _ int) bool {
var deployed bool
domainInfo, _ := lo.Find(domainsInMakers, func(domainInfo *teom.DescribePagesZoneCustomDomains) bool {
return domain == domainInfo.Domain
domainInfo, _ := lo.Find(domainsInMakers, func(domainInfo *tceomakersssdk.PagesZoneCustomDomain) bool {
return domain == lo.FromPtr(domainInfo.Domain)
})
if domainInfo != nil && len(describeHostCertificatesResp.Response.HostCertificates) != 0 {
var certList []tceo.HostCertInfoItem
for _, v := range describeHostCertificatesResp.Response.HostCertificates {
if v.Host == domainInfo.Domain {
certList = v.HostCertInfo
break
}
}
deployed = lo.SomeBy(certList, func(certInfo tceo.HostCertInfoItem) bool {
return upres.CertId == certInfo.CertId
if domainInfo != nil && describeHostCertificatesResp.Response != nil {
deployed = lo.SomeBy(describeHostCertificatesResp.Response.HostCertificates, func(hostInfo *tceo.HostCertificate) bool {
return domain == lo.FromPtr(hostInfo.Host) &&
lo.SomeBy(hostInfo.HostCertInfo, func(certInfo *tceo.CertificateInfo) bool {
return upres.CertId == lo.FromPtr(certInfo.CertId)
})
})
}
return !deployed
})
// Configure certificate of domains
// 配置域名证书
// REF: https://cloud.tencent.com/document/api/1552/80764
// REF: https://docs.edgeone.site/#/?id=modifyhostscertificate
modifyHostsCertificateReqs := make([]*tceo.ModifyHostsCertificateRequest, 0)
if d.config.EnableMultipleSSL {
@ -250,40 +234,36 @@ func (d *Deployer) Deploy(ctx context.Context, certPEM, privkeyPEM string) (*Dep
for _, domain := range domains {
modifyHostsCertificateReq := tceo.NewModifyHostsCertificateRequest()
modifyHostsCertificateReq.ZoneId = common.StringPtr(zoneId)
modifyHostsCertificateReq.ZoneId = zoneId
modifyHostsCertificateReq.Mode = common.StringPtr("sslcert")
modifyHostsCertificateReq.Hosts = common.StringPtrs([]string{domain})
modifyHostsCertificateReq.ServerCertInfo = []*tceo.ServerCertInfo{{CertId: common.StringPtr(upres.CertId)}}
domainInfo, _ := lo.Find(domainsInMakers, func(domainInfo *teom.DescribePagesZoneCustomDomains) bool {
return domain == domainInfo.Domain
domainInfo, _ := lo.Find(domainsInMakers, func(domainInfo *tceomakersssdk.PagesZoneCustomDomain) bool {
return domain == lo.FromPtr(domainInfo.Domain)
})
if domainInfo != nil && len(describeHostCertificatesResp.Response.HostCertificates) != 0 {
var certList []tceo.HostCertInfoItem
for _, v := range describeHostCertificatesResp.Response.HostCertificates {
if v.Host == domainInfo.Domain {
certList = v.HostCertInfo
break
}
}
for _, certInfo := range certList {
if certInfo.CertId == upres.CertId {
if domainInfo != nil && describeHostCertificatesResp.Response != nil {
for _, hostInfo := range describeHostCertificatesResp.Response.HostCertificates {
if lo.FromPtr(hostInfo.Host) != domain {
continue
}
if strings.Split(certInfo.SignAlgo, " ")[0] == privkeyAlgStr {
continue
}
for _, certInfo := range hostInfo.HostCertInfo {
if lo.FromPtr(certInfo.CertId) == upres.CertId {
continue
}
certExpireTime, _ := time.Parse("2006-01-02T15:04:05Z", certInfo.ExpireTime)
if certExpireTime.Before(time.Now()) {
continue
}
if strings.Split(lo.FromPtr(certInfo.SignAlgo), " ")[0] == privkeyAlgStr {
continue
}
modifyHostsCertificateReq.ServerCertInfo = append(
modifyHostsCertificateReq.ServerCertInfo, &tceo.ServerCertInfo{CertId: common.StringPtr(certInfo.CertId)},
)
certExpireTime, _ := time.Parse("2006-01-02T15:04:05Z", lo.FromPtr(certInfo.ExpireTime))
if certExpireTime.Before(time.Now()) {
continue
}
modifyHostsCertificateReq.ServerCertInfo = append(modifyHostsCertificateReq.ServerCertInfo, &tceo.ServerCertInfo{CertId: certInfo.CertId})
}
}
}
@ -291,7 +271,7 @@ func (d *Deployer) Deploy(ctx context.Context, certPEM, privkeyPEM string) (*Dep
}
} else {
modifyHostsCertificateReq := tceo.NewModifyHostsCertificateRequest()
modifyHostsCertificateReq.ZoneId = common.StringPtr(zoneId)
modifyHostsCertificateReq.ZoneId = zoneId
modifyHostsCertificateReq.Mode = common.StringPtr("sslcert")
modifyHostsCertificateReq.Hosts = common.StringPtrs(domains)
modifyHostsCertificateReq.ServerCertInfo = []*tceo.ServerCertInfo{{CertId: common.StringPtr(upres.CertId)}}
@ -305,11 +285,8 @@ func (d *Deployer) Deploy(ctx context.Context, certPEM, privkeyPEM string) (*Dep
case <-ctx.Done():
return nil, ctx.Err()
default:
modifyHostsCertificateResp, err := d.sdkClient.ModifyHostsCertificateWithContext(ctx, modifyHostsCertificateReq)
d.logger.Debug("sdk request 'teo.ModifyHostsCertificate'",
slog.Any("request", modifyHostsCertificateReq),
slog.Any("response", modifyHostsCertificateResp),
)
modifyHostsCertificateResp, err := d.sdkClients.TEO.ModifyHostsCertificateWithContext(ctx, modifyHostsCertificateReq)
d.logger.Debug("sdk request 'teo.ModifyHostsCertificate'", slog.Any("request", modifyHostsCertificateReq), slog.Any("response", modifyHostsCertificateResp))
if err != nil {
err = fmt.Errorf("failed to execute sdk request 'teo.ModifyHostsCertificate': %w", err)
errs = append(errs, err)
@ -324,48 +301,57 @@ func (d *Deployer) Deploy(ctx context.Context, certPEM, privkeyPEM string) (*Dep
return &DeployResult{}, nil
}
func (d *Deployer) getAllDomainsInMakers(ctx context.Context, makersId string) (
[]*teom.DescribePagesZoneCustomDomains, error,
) {
// Get list of custom maker domains
func (d *Deployer) getAllDomainsInProject(ctx context.Context, makersProjectId string) ([]*tceomakersssdk.PagesZoneCustomDomain, error) {
// 查询创建过的 Pages 自定义域名列表
// REF: https://docs.edgeone.site/#/?id=describepageszonecustomdomains
describeMakersZoneCustomDomainsReq := teom.NewDescribeMakersZoneCustomDomainsReq()
describeMakersZoneCustomDomainsReq.ProjectId = makersId
describeMakersZoneCustomDomainsResp, err := d.apiClient.DescribeMakersZoneCustomDomains(
ctx, describeMakersZoneCustomDomainsReq,
)
d.logger.Debug(
"api request 'eomakers.DescribeMakersZoneCustomDomains'",
slog.Any("request", describeMakersZoneCustomDomainsReq),
slog.Any("response", describeMakersZoneCustomDomainsResp),
)
describeMakersZoneCustomDomainsReq := &tceomakersssdk.DescribePagesZoneCustomDomainsRequest{
ProjectId: common.StringPtr(makersProjectId),
}
describeMakersZoneCustomDomainsResp, err := d.sdkClients.TEOMakers.DescribePagesZoneCustomDomainsWithContext(ctx, describeMakersZoneCustomDomainsReq)
d.logger.Debug("api request 'teo.makers.DescribePagesZoneCustomDomains'", slog.Any("request", describeMakersZoneCustomDomainsReq), slog.Any("response", describeMakersZoneCustomDomainsResp))
if err != nil {
return nil, err
return nil, fmt.Errorf("failed to execute sdk request 'teo.makers.DescribePagesZoneCustomDomains': %w", err)
}
result := make([]*teom.DescribePagesZoneCustomDomains, 0)
for i := range describeMakersZoneCustomDomainsResp.Data.Response.PagesDomains {
data := &describeMakersZoneCustomDomainsResp.Data.Response.PagesDomains[i]
if data.Type == "Custom" && data.ZoneId != "" {
result = append(result, data)
domains := make([]*tceomakersssdk.PagesZoneCustomDomain, 0)
for _, domainItem := range describeMakersZoneCustomDomainsResp.Data.Response.PagesDomains {
if lo.FromPtr(domainItem.Type) == "Custom" && lo.FromPtr(domainItem.ZoneId) != "" {
domains = append(domains, domainItem)
}
}
return result, nil
return domains, nil
}
func createSDKClient(secretId, secretKey, endpoint string) (*tceo.Client, error) {
credential := common.NewCredential(secretId, secretKey)
func createSDKClients(secretId, secretKey, endpoint, makersApiToken string) (*wSDKClients, error) {
wsdk := &wSDKClients{}
cpf := profile.NewClientProfile()
if endpoint != "" {
cpf.HttpProfile.Endpoint = endpoint
{
credential := common.NewCredential(secretId, secretKey)
cpf := profile.NewClientProfile()
if endpoint != "" {
cpf.HttpProfile.Endpoint = endpoint
}
client, err := tceo.NewClient(credential, "", cpf)
if err != nil {
return nil, err
}
wsdk.TEO = client
}
client, err := tceo.NewClient(credential, "", cpf)
if err != nil {
return nil, err
{
client, err := tceomakersssdk.NewClient(
tceomakersssdk.WithApiToken(makersApiToken),
)
if err != nil {
return nil, err
}
wsdk.TEOMakers = client
}
return client, nil
return wsdk, nil
}

View File

@ -9,14 +9,14 @@ import (
)
var (
fp = tester.Args("TENCENTCLOUDEOMAKERS_")
fTestCertPath string
fTestKeyPath string
fSecretId string
fSecretKey string
fAPIToken string
fMakersId string
fDomains string
fp = tester.Args("TENCENTCLOUDEOMAKERS_")
fTestCertPath string
fTestKeyPath string
fSecretId string
fSecretKey string
fMakersApiToken string
fMakersProjectId string
fDomains string
)
func init() {
@ -24,8 +24,8 @@ func init() {
fp.DefineString(&fTestKeyPath, "TESTKEYPATH")
fp.DefineString(&fSecretId, "SECRETID")
fp.DefineString(&fSecretKey, "SECRETKEY")
fp.DefineString(&fAPIToken, "APITOKEN")
fp.DefineString(&fMakersId, "MAKERSID")
fp.DefineString(&fMakersApiToken, "MAKERSAPITOKEN")
fp.DefineString(&fMakersProjectId, "MAKERSPROJECTID")
fp.DefineString(&fDomains, "DOMAINS")
}
@ -37,8 +37,8 @@ Shell command to run this test:
--TENCENTCLOUDEOMAKERS_TESTKEYPATH="/path/to/your-test-key.pem" \
--TENCENTCLOUDEOMAKERS_SECRETID="your-secret-id" \
--TENCENTCLOUDEOMAKERS_SECRETKEY="your-secret-key" \
--TENCENTCLOUDEOMAKERS_APITOKEN="your-edgeone-makers-api-token" \
--TENCENTCLOUDEOMAKERS_MAKERSID="your-edgeone-makers-project-id" \
--TENCENTCLOUDEOMAKERS_MAKERSAPITOKEN="your-makers-api-token" \
--TENCENTCLOUDEOMAKERS_MAKERSPROJECTID="your-makers-project-id" \
--TENCENTCLOUDEOMAKERS_DOMAINS="example.com"
*/
func TestProvider(t *testing.T) {
@ -48,8 +48,8 @@ func TestProvider(t *testing.T) {
provider, err := impl.NewDeployer(&impl.DeployerConfig{
SecretId: fSecretId,
SecretKey: fSecretKey,
APIToken: fAPIToken,
MakersId: fMakersId,
MakersApiToken: fMakersApiToken,
MakersProjectId: fMakersProjectId,
DomainMatchPattern: impl.DomainMatchPatternExact,
Domains: strings.Split(fDomains, ";"),
EnableMultipleSSL: true,

View File

@ -67,9 +67,7 @@ func NewDescribeHostCertificatesResponse() (response *DescribeHostCertificatesRe
return
}
func (c *Client) DescribeHostCertificatesWithContext(ctx context.Context, request *DescribeHostCertificatesRequest) (
response *DescribeHostCertificatesResponse, err error,
) {
func (c *Client) DescribeHostCertificatesWithContext(ctx context.Context, request *DescribeHostCertificatesRequest) (response *DescribeHostCertificatesResponse, err error) {
if request == nil {
request = NewDescribeHostCertificatesRequest()
}

View File

@ -7,84 +7,44 @@ import (
type (
AccelerationDomain = teo.AccelerationDomain
AdvancedFilter = teo.AdvancedFilter
CertificateInfo = teo.CertificateInfo
MutualTLS = teo.MutualTLS
ServerCertInfo = teo.ServerCertInfo
UpstreamCertInfo = teo.UpstreamCertInfo
)
type DescribeAccelerationDomainsRequest = teo.DescribeAccelerationDomainsRequest
type DescribeAccelerationDomainsResponse = teo.DescribeAccelerationDomainsResponse
// DescribeHostCertificatesRequest is the request structure
// for the DescribeHostCertificates API.
// Not exposed in Tencent Cloud official SDK or API document
// REF: https://docs.edgeone.site/#/?id=describehostcertificates
type DescribeHostCertificatesRequest struct {
*tchttp.BaseRequest
ZoneId string `json:"ZoneId" name:"ZoneId"`
Filters []*DescribeHostCertificatesFilters `json:"Filters,omitempty" name:"Filters"`
ZoneId *string `json:"ZoneId,omitnil,omitempty" name:"ZoneId"`
Filters []*AdvancedFilter `json:"Filters,omitnil,omitempty" name:"Filters"`
}
type DescribeHostCertificatesFilters struct {
Name string `json:"Name" name:"Name"`
Values []string `json:"Values" name:"Values"`
Fuzzy *bool `json:"Fuzzy,omitempty" name:"Fuzzy"`
}
// DescribeHostCertificatesResponse is the response structure
// for the DescribeHostCertificates API.
// Not exposed in Tencent Cloud official SDK or API document
// REF: https://docs.edgeone.site/#/?id=describehostcertificates
type DescribeHostCertificatesResponse struct {
*tchttp.BaseResponse
Response DescribeHostCertificatesResponseParams `json:"Response"`
Response *DescribeHostCertificatesResponseParams `json:"Response" name:"Response"`
}
type DescribeHostCertificatesResponseParams struct {
RequestId string `json:"RequestId"`
HostCertificates []HostCertificate `json:"HostCertificates"`
TotalCount int `json:"TotalCount"`
}
type HostCertificate struct {
ApplyType string `json:"ApplyType"`
ClientCertInfo ClientCertInfo `json:"ClientCertInfo"`
Host string `json:"Host"`
HostCertInfo []HostCertInfoItem `json:"HostCertInfo"`
Mode string `json:"Mode"`
UpstreamCertInfo UpstreamCertInfo `json:"UpstreamCertInfo"`
}
type ClientCertInfo struct {
CertInfos []any `json:"CertInfos"`
Switch string `json:"Switch"`
}
type HostCertInfoItem struct {
Alias string `json:"Alias"`
CertId string `json:"CertId"`
DeployTime string `json:"DeployTime"`
ExpireTime string `json:"ExpireTime"`
SignAlgo string `json:"SignAlgo"`
Status string `json:"Status"`
Type string `json:"Type"`
}
type UpstreamCertInfo struct {
UpstreamCertificateVerify UpstreamCertificateVerify `json:"UpstreamCertificateVerify"`
UpstreamMutualTLS UpstreamMutualTLS `json:"UpstreamMutualTLS"`
}
type UpstreamCertificateVerify struct {
CustomCACerts []interface{} `json:"CustomCACerts"` // 类型未知
VerificationMode string `json:"VerificationMode"`
}
type UpstreamMutualTLS struct {
CertInfos []interface{} `json:"CertInfos"` // 类型未知
Switch string `json:"Switch"`
RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
TotalCount *int64 `json:"TotalCount,omitnil,omitempty" name:"TotalCount"`
HostCertificates []*HostCertificate `json:"HostCertificates,omitnil,omitempty" name:"HostCertificates"`
}
type ModifyHostsCertificateRequest = teo.ModifyHostsCertificateRequest
type ModifyHostsCertificateResponse = teo.ModifyHostsCertificateResponse
type HostCertificate struct {
ApplyType *string `json:"ApplyType,omitnil,omitempty" name:"ApplyType"`
ClientCertInfo *MutualTLS `json:"ClientCertInfo,omitnil,omitempty" name:"ClientCertInfo"`
Host *string `json:"Host,omitnil,omitempty" name:"Host"`
HostCertInfo []*CertificateInfo `json:"HostCertInfo,omitnil,omitempty" name:"HostCertInfo"`
Mode *string `json:"Mode,omitnil,omitempty" name:"Mode"`
ServerCertInfo []*ServerCertInfo `json:"ServerCertInfo,omitnil,omitempty" name:"ServerCertInfo"`
UpstreamCertInfo *UpstreamCertInfo `json:"UpstreamCertInfo,omitnil,omitempty" name:"UpstreamCertInfo"`
}

View File

@ -1,47 +0,0 @@
package eomakers
import (
"context"
"fmt"
)
func NewDescribePagesZoneCustomDomainsReq() *DescribePagesZoneCustomDomainsReq {
return &DescribePagesZoneCustomDomainsReq{Action: "DescribePagesZoneCustomDomains"}
}
func NewDescribeMakersZoneCustomDomainsReq() *DescribeMakersZoneCustomDomainsReq {
return NewDescribePagesZoneCustomDomainsReq()
}
// DescribePagesZoneCustomDomains provides a method to
// describe zone custom domains with pages.
func (c Client) DescribePagesZoneCustomDomains(ctx context.Context, request *DescribePagesZoneCustomDomainsReq) (
*DescribePagesZoneCustomDomainsResp, error,
) {
if request == nil {
request = NewDescribePagesZoneCustomDomainsReq()
}
var resp DescribePagesZoneCustomDomainsResp
if err := doRequest(ctx, c.apiToken, request, &resp); err != nil {
return nil, err
}
if resp.Code != 0 {
return nil, fmt.Errorf("sdkErr: Code %d: %v", resp.Code, resp.Data)
}
return &resp, nil
}
// DescribeMakersZoneCustomDomains is the alias of
// c.DescribePagesZoneCustomDomains due to the production rename
// reserved for future API migration
func (c Client) DescribeMakersZoneCustomDomains(ctx context.Context, request *DescribePagesZoneCustomDomainsReq) (
*DescribeMakersZoneCustomDomainsResp, error,
) {
if request == nil {
request = NewDescribeMakersZoneCustomDomainsReq()
}
return c.DescribePagesZoneCustomDomains(ctx, request)
}

View File

@ -1,11 +0,0 @@
package eomakers
type Client struct {
apiToken string
}
func NewClient(apiToken string) *Client {
return &Client{
apiToken: apiToken,
}
}

View File

@ -1,3 +0,0 @@
package eomakers
const APIBaseURL = "https://pages-api.cloud.tencent.com/v1"

View File

@ -1,49 +0,0 @@
package eomakers
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io"
"net/http"
"strings"
"time"
"github.com/certimate-go/certimate/internal/app"
)
func doRequest(ctx context.Context, apiToken string, reqBody any, respBody any) error {
if ctx == nil {
ctx = context.Background()
}
jsonData, err := json.Marshal(reqBody)
if err != nil {
return err
}
req, err := http.NewRequestWithContext(ctx, "POST", APIBaseURL, bytes.NewReader(jsonData))
if err != nil {
return err
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("User-Agent", app.AppUserAgent)
req.Header.Set("Authorization", strings.Join([]string{"Bearer", apiToken}, " "))
client := &http.Client{Timeout: 30 * time.Second}
resp, err := client.Do(req)
if err != nil {
return err
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
return err
}
if resp.StatusCode != http.StatusOK {
return fmt.Errorf("sdkErr: HTTP %d: %s", resp.StatusCode, string(body))
}
return json.Unmarshal(body, respBody)
}

View File

@ -1,48 +0,0 @@
package eomakers
type DescribePagesZoneCustomDomains struct {
Type string `json:"Type"`
Domain string `json:"Domain"`
ForceRedirectHTTPS string `json:"ForceRedirectHTTPS"`
RedirectStatusCode int `json:"RedirectStatusCode"`
CurrentCname string `json:"CurrentCname"`
MainDomain string `json:"MainDomain"`
Status string `json:"Status"`
OwnershipVerification struct {
DnsVerification *struct {
RecordType string `json:"RecordType"`
RecordValue string `json:"RecordValue"`
Subdomain string `json:"Subdomain"`
} `json:"DnsVerification,omitempty"`
FileVerification *struct {
Content string `json:"Content"`
Path string `json:"Path"`
} `json:"FileVerification,omitempty"`
NsVerification any `json:"NsVerification"`
} `json:"OwnershipVerification"`
Cname string `json:"Cname"`
Area string `json:"Area"`
ZoneId string `json:"ZoneId"`
}
type DescribePagesZoneCustomDomainsResp struct {
Code int `json:"Code"`
Data struct {
Response struct {
RequestId string `json:"RequestId"`
PagesDomains []DescribePagesZoneCustomDomains `json:"PagesDomains"`
TotalCount int `json:"TotalCount"`
} `json:"Response"`
} `json:"Data"`
}
type DescribePagesZoneCustomDomainsReq struct {
Action string `json:"Action"`
ProjectId string `json:"ProjectId"`
}
type DescribeMakersZoneCustomDomains = DescribePagesZoneCustomDomains
type DescribeMakersZoneCustomDomainsResp = DescribePagesZoneCustomDomainsResp
type DescribeMakersZoneCustomDomainsReq = DescribePagesZoneCustomDomainsReq

View File

@ -0,0 +1,45 @@
package teomakers
import (
"context"
"net/http"
)
type DescribePagesZoneCustomDomainsRequest struct {
sdkRequestBase
ProjectId *string `json:"ProjectId,omitempty"`
}
type DescribePagesZoneCustomDomainsResponse struct {
sdkResponseBase
Data *struct {
Response *struct {
RequestId *string `json:"RequestId,omitempty"`
TotalCount *int64 `json:"TotalCount,omitempty"`
PagesDomains []*PagesZoneCustomDomain `json:"PagesDomains,omitempty"`
} `json:"Response,omitempty"`
} `json:"Data,omitempty"`
}
func (c *Client) DescribePagesZoneCustomDomains(req *DescribePagesZoneCustomDomainsRequest) (*DescribePagesZoneCustomDomainsResponse, error) {
return c.DescribePagesZoneCustomDomainsWithContext(context.Background(), req)
}
func (c *Client) DescribePagesZoneCustomDomainsWithContext(ctx context.Context, req *DescribePagesZoneCustomDomainsRequest) (*DescribePagesZoneCustomDomainsResponse, error) {
httpreq, err := c.newRequest(http.MethodPost, "/", "DescribePagesZoneCustomDomains", req)
if err != nil {
return nil, err
} else {
httpreq.SetBody(req)
httpreq.SetContext(ctx)
}
result := &DescribePagesZoneCustomDomainsResponse{}
if _, err := c.doRequestWithResult(httpreq, result); err != nil {
return result, err
}
return result, nil
}

View File

@ -0,0 +1,109 @@
// A simple SDK client for Tencent Cloud EdgeOne Pages.
// API documentation: https://docs.edgeone.site/
package teomakers
import (
"encoding/json"
"fmt"
"time"
"github.com/go-resty/resty/v2"
"github.com/certimate-go/certimate/internal/app"
)
type Client struct {
rc *resty.Client
}
func NewClient(optFns ...OptionsFunc) (*Client, error) {
options := &Options{}
for _, fn := range optFns {
fn(options)
}
if options.ApiToken == "" {
return nil, fmt.Errorf("sdkerr: unset apiToken")
}
httper := resty.New().
SetBaseURL("https://pages-api.cloud.tencent.com/v1").
SetHeader("Accept", "application/json").
SetHeader("Authorization", "Bearer "+options.ApiToken).
SetHeader("Content-Type", "application/json").
SetHeader("User-Agent", app.AppUserAgent)
return &Client{rc: httper}, nil
}
func (c *Client) SetTimeout(timeout time.Duration) *Client {
c.rc.SetTimeout(timeout)
return c
}
func (c *Client) newRequest(method string, path string, action string, params sdkRequest) (*resty.Request, error) {
if method == "" {
return nil, fmt.Errorf("sdkerr: unset method")
}
if path == "" {
return nil, fmt.Errorf("sdkerr: unset path")
}
if action == "" {
return nil, fmt.Errorf("sdkerr: unset action")
}
req := c.rc.R()
req.Method = method
req.URL = path
if params != nil {
params.SetAction(action)
req.SetBody(params)
}
return req, nil
}
func (c *Client) doRequest(req *resty.Request) (*resty.Response, error) {
if req == nil {
return nil, fmt.Errorf("sdkerr: nil request")
}
// WARN:
// PLEASE DO NOT USE `req.SetResult` or `req.SetError` HERE! USE `doRequestWithResult` INSTEAD.
resp, err := req.Send()
if err != nil {
return resp, fmt.Errorf("sdkerr: failed to send request: %w", err)
} else if resp.IsError() {
return resp, fmt.Errorf("sdkerr: unexpected status code: %d (resp: %s)", resp.StatusCode(), resp.String())
}
return resp, nil
}
func (c *Client) doRequestWithResult(req *resty.Request, res sdkResponse) (*resty.Response, error) {
if req == nil {
return nil, fmt.Errorf("sdkerr: nil request")
}
resp, err := c.doRequest(req)
if err != nil {
if resp != nil {
json.Unmarshal(resp.Body(), &res)
}
return resp, err
}
if len(resp.Body()) != 0 {
if err := json.Unmarshal(resp.Body(), &res); err != nil {
return resp, fmt.Errorf("sdkerr: failed to unmarshal response: %w (resp: %s)", err, resp.String())
} else {
if rCode := res.GetCode(); rCode != 0 {
return resp, fmt.Errorf("sdkerr: code='%d', message='%s'", rCode, res.GetMessage())
}
}
}
return resp, nil
}

View File

@ -0,0 +1,26 @@
package teomakers
import (
teo "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo/v20220901"
)
type (
OwnershipVerification = teo.OwnershipVerification
DnsVerification = teo.DnsVerification
FileVerification = teo.FileVerification
NsVerification = teo.NsVerification
)
type PagesZoneCustomDomain struct {
Type *string `json:"Type,omitempty"`
Domain *string `json:"Domain,omitempty"`
ForceRedirectHTTPS *string `json:"ForceRedirectHTTPS,omitempty"`
RedirectStatusCode *int32 `json:"RedirectStatusCode,omitempty"`
CurrentCname *string `json:"CurrentCname,omitempty"`
MainDomain *string `json:"MainDomain,omitempty"`
Status *string `json:"Status,omitempty"`
OwnershipVerification *OwnershipVerification `json:"OwnershipVerification,omitempty"`
Cname *string `json:"Cname,omitempty"`
Area *string `json:"Area,omitempty"`
ZoneId *string `json:"ZoneId,omitempty"`
}

View File

@ -0,0 +1,13 @@
package teomakers
type Options struct {
ApiToken string
}
type OptionsFunc func(*Options)
func WithApiToken(apiToken string) OptionsFunc {
return func(o *Options) {
o.ApiToken = apiToken
}
}

View File

@ -0,0 +1,44 @@
package teomakers
type sdkRequest interface {
SetAction(action string)
}
type sdkRequestBase struct {
Action *string `json:"Action,omitempty"`
}
func (r *sdkRequestBase) SetAction(action string) {
r.Action = &action
}
var _ sdkRequest = (*sdkRequestBase)(nil)
type sdkResponse interface {
GetCode() int
GetMessage() string
}
type sdkResponseBase struct {
Code *int `json:"Code,omitempty"`
Message *string `json:"Message,omitempty"`
RequestId *string `json:"RequestId,omitempty"`
}
func (r *sdkResponseBase) GetCode() int {
if r.Code == nil {
return 0
}
return *r.Code
}
func (r *sdkResponseBase) GetMessage() string {
if r.Message == nil {
return ""
}
return *r.Message
}
var _ sdkResponse = (*sdkResponseBase)(nil)

View File

@ -30,16 +30,6 @@ const BizDeployNodeConfigFieldsProviderTencentCloudEOMakers = () => {
return (
<>
<Form.Item
name={[parentNamePath, "apiToken"]}
initialValue={initialValues.apiToken}
label={t("workflow_node.deploy.form.tencentcloud_eomakers_api_token.label")}
rules={[formRule]}
tooltip={<span dangerouslySetInnerHTML={{ __html: t("workflow_node.deploy.form.tencentcloud_eomakers_api_token.tooltip") }}></span>}
>
<Input.Password autoComplete="new-password" placeholder={t("workflow_node.deploy.form.tencentcloud_eomakers_api_token.placeholder")} />
</Form.Item>
<Form.Item
name={[parentNamePath, "endpoint"]}
initialValue={initialValues.endpoint}
@ -51,13 +41,23 @@ const BizDeployNodeConfigFieldsProviderTencentCloudEOMakers = () => {
</Form.Item>
<Form.Item
name={[parentNamePath, "makersId"]}
initialValue={initialValues.makersId}
label={t("workflow_node.deploy.form.tencentcloud_eomakers_makers_id.label")}
name={[parentNamePath, "apiToken"]}
initialValue={initialValues.apiToken}
label={t("workflow_node.deploy.form.tencentcloud_eomakers_api_token.label")}
rules={[formRule]}
tooltip={<span dangerouslySetInnerHTML={{ __html: t("workflow_node.deploy.form.tencentcloud_eomakers_makers_id.tooltip") }}></span>}
tooltip={<span dangerouslySetInnerHTML={{ __html: t("workflow_node.deploy.form.tencentcloud_eomakers_api_token.tooltip") }}></span>}
>
<Input placeholder={t("workflow_node.deploy.form.tencentcloud_eomakers_makers_id.placeholder")} />
<Input.Password autoComplete="new-password" placeholder={t("workflow_node.deploy.form.tencentcloud_eomakers_api_token.placeholder")} />
</Form.Item>
<Form.Item
name={[parentNamePath, "projectId"]}
initialValue={initialValues.projectId}
label={t("workflow_node.deploy.form.tencentcloud_eomakers_project_id.label")}
rules={[formRule]}
tooltip={<span dangerouslySetInnerHTML={{ __html: t("workflow_node.deploy.form.tencentcloud_eomakers_project_id.tooltip") }}></span>}
>
<Input placeholder={t("workflow_node.deploy.form.tencentcloud_eomakers_project_id.placeholder")} />
</Form.Item>
<Form.Item
@ -119,8 +119,8 @@ const BizDeployNodeConfigFieldsProviderTencentCloudEOMakers = () => {
const getInitialValues = (): Nullish<z.infer<ReturnType<typeof getSchema>>> => {
return {
apiToken: "",
projectId: "",
domainMatchPattern: DOMAIN_MATCH_PATTERN_EXACT,
makersId: "",
domains: "",
};
};
@ -130,9 +130,9 @@ const getSchema = ({ i18n = getI18n() }: { i18n?: ReturnType<typeof getI18n> })
return z
.object({
apiToken: z.string().nonempty(),
endpoint: z.string().nullish(),
makersId: z.string().nonempty(),
apiToken: z.string().nonempty(),
projectId: z.string().nonempty(),
domainMatchPattern: z.string().nonempty().default(DOMAIN_MATCH_PATTERN_EXACT),
domains: z.string().nullish(),
enableMultipleSSL: z.boolean().nullish(),

View File

@ -2318,17 +2318,17 @@
"off": "Disallow"
}
},
"tencentcloud_eomakers_api_token": {
"label": "Tencent Cloud EdgeOne Makers API Token",
"placeholder": "Please enter Tencent Cloud EdgeOne Makers API Token",
"tooltip": "For more information, see <a href=\"https://console.tencentcloud.com/edgeone/makers\" target=\"_blank\">https://console.tencentcloud.com/edgeone/makers</a>"
},
"tencentcloud_eomakers_endpoint": {
"label": "Tencent Cloud API endpoint (Optional)",
"placeholder": "Please enter Tencent Cloud EdgeOne API endpoint (e.g. teo.intl.tencentcloudapi.com)",
"tooltip": "<ul style=\"list-style: disc;\"><li><strong>teo.intl.tencentcloudapi.com</strong> for Tencent Cloud International</li><li><strong>teo.tencentcloudapi.com</strong> for Tencent Cloud in China</li></ul>"
},
"tencentcloud_eomakers_makers_id": {
"tencentcloud_eomakers_api_token": {
"label": "Tencent Cloud EdgeOne Makers API Token",
"placeholder": "Please enter Tencent Cloud EdgeOne Makers API Token",
"tooltip": "For more information, see <a href=\"https://pages.edgeone.ai/document/api-token\" target=\"_blank\">https://pages.edgeone.ai/document/api-token</a>"
},
"tencentcloud_eomakers_project_id": {
"label": "Tencent Cloud EdgeOne Makers project ID",
"placeholder": "Please enter Tencent Cloud EdgeOne Makers project ID",
"tooltip": "For more information, see <a href=\"https://console.tencentcloud.com/edgeone/makers\" target=\"_blank\">https://console.tencentcloud.com/edgeone/makers</a>"

View File

@ -251,7 +251,7 @@
"tencentcloud_dns": "腾讯云 - 云解析 DNS",
"tencentcloud_ecdn": "腾讯云 - 全站加速网络 ECDN",
"tencentcloud_eo": "腾讯云 - 边缘安全加速平台 EdgeOne",
"tencentcloud_eomakers": "腾讯云 - 边缘安全加速平台 EdgeOne Makers",
"tencentcloud_eomakers": "腾讯云 - 边缘安全加速平台 EdgeOne Makers(原 EdgeOne Pages",
"tencentcloud_ga2": "腾讯云 - 全球加速 2.0 GA2",
"tencentcloud_gaap": "腾讯云 - 全球应用加速 GAAP",
"tencentcloud_scf": "腾讯云 - 云函数 SCF",

View File

@ -2317,17 +2317,17 @@
"off": "不"
}
},
"tencentcloud_eomakers_api_token": {
"label": "腾讯云 EdgeOne Makers API Token",
"placeholder": "请输入腾讯云 EdgeOne Makers API Token",
"tooltip": "这是什么?请参阅 <a href=\"https://console.cloud.tencent.com/edgeone/makers\" target=\"_blank\">https://console.cloud.tencent.com/edgeone/makers</a>"
},
"tencentcloud_eomakers_endpoint": {
"label": "腾讯云接口端点(可选)",
"placeholder": "请输入腾讯云 EdgeOne 接口端点例如teo.tencentcloudapi.com",
"tooltip": "这是什么?请参阅 <a href=\"https://cloud.tencent.com/document/product/1552/80723\" target=\"_blank\">https://cloud.tencent.com/document/product/1552/80723</a><br>国际站用户请填写 <em>teo.intl.tencentcloudapi.com</em>。"
},
"tencentcloud_eomakers_makers_id": {
"tencentcloud_eomakers_api_token": {
"label": "腾讯云 EdgeOne Makers API Token",
"placeholder": "请输入腾讯云 EdgeOne Makers API Token",
"tooltip": "这是什么?请参阅 <a href=\"https://cloud.tencent.com/document/product/1552/127422\" target=\"_blank\">https://cloud.tencent.com/document/product/1552/127422</a>"
},
"tencentcloud_eomakers_project_id": {
"label": "腾讯云 EdgeOne Makers 项目 ID",
"placeholder": "请输入腾讯云 EdgeOne Makers 项目 ID",
"tooltip": "这是什么?请参阅 <a href=\"https://console.cloud.tencent.com/edgeone/makers\" target=\"_blank\">https://console.cloud.tencent.com/edgeone/makers</a>"