feat(provider): new purge provider: tencentcloud tse

This commit is contained in:
Fu Diwei
2026-08-27 17:14:29 +08:00
parent 2131ce2258
commit deb6ff7c65
2 changed files with 8 additions and 0 deletions
@@ -110,6 +110,10 @@ func (c *Certmgr) Replace(ctx context.Context, certIdOrName string, certPEM, pri
}
func (c *Certmgr) uploadToCloudNative(ctx context.Context, certPEM, privkeyPEM string) (*UploadResult, error) {
if c.config.GatewayId == "" {
return nil, fmt.Errorf("config `gatewayId` is required")
}
// 解析证书内容
certX509, err := xcert.ParseCertificateFromPEM(certPEM)
if err != nil {
@@ -85,6 +85,10 @@ func (p *Purger) Purge(ctx context.Context, expiry time.Duration) (*PurgeResult,
}
func (p *Purger) uploadToCloudNative(ctx context.Context, expiry time.Duration) (*PurgeResult, error) {
if p.config.GatewayId == "" {
return nil, fmt.Errorf("config `gatewayId` is required")
}
purgingCertIds := make([]string, 0)
// 查询云原生网关证书列表,避免重复上传