mirror of
https://github.com/certimate-go/certimate.git
synced 2026-10-16 07:05:59 +08:00
feat(provider): new purge provider: tencentcloud tse
This commit is contained in:
@@ -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)
|
||||
|
||||
// 查询云原生网关证书列表,避免重复上传
|
||||
|
||||
Reference in New Issue
Block a user