mirror of
https://github.com/certd/certd.git
synced 2025-11-25 09:10:11 +08:00
perf: aliyun alb支持部署扩展证书
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@alicloud/openapi-client": "^0.4.14",
|
||||
"@alicloud/openapi-util": "^0.3.2",
|
||||
"@alicloud/pop-core": "^1.7.10",
|
||||
"@alicloud/tea-util": "^1.4.10",
|
||||
"@aws-sdk/client-s3": "^3.787.0",
|
||||
|
||||
@@ -54,7 +54,7 @@ export class AliyunClientV2 {
|
||||
|
||||
const $OpenApi = await import("@alicloud/openapi-client");
|
||||
const $Util = await import("@alicloud/tea-util");
|
||||
|
||||
const OpenApiUtil = await import("@alicloud/openapi-util");
|
||||
const params = new $OpenApi.Params({
|
||||
// 接口名称
|
||||
action: req.action,
|
||||
@@ -74,6 +74,10 @@ export class AliyunClientV2 {
|
||||
bodyType: "json",
|
||||
});
|
||||
|
||||
if (req.data?.query) {
|
||||
//@ts-ignore
|
||||
req.data.query = OpenApiUtil.default.default.query(req.data.query);
|
||||
}
|
||||
const runtime = new $Util.RuntimeOptions({});
|
||||
const request = new $OpenApi.OpenApiRequest(req.data);
|
||||
// 复制代码运行请自行打印 API 的返回值
|
||||
|
||||
@@ -29,7 +29,7 @@ export type AliyunSslUploadCertReq = {
|
||||
cert: AliyunCertInfo;
|
||||
};
|
||||
|
||||
export type CasCertInfo = { certId: number; certName: string; certIdentifier: string };
|
||||
export type CasCertInfo = { certId: number; certName: string; certIdentifier: string; notAfter: number };
|
||||
|
||||
export class AliyunSslClient {
|
||||
opts: AliyunSslClientOpts;
|
||||
@@ -68,6 +68,7 @@ export class AliyunSslClient {
|
||||
certId: certId,
|
||||
certName: res.Name,
|
||||
certIdentifier: res.CertIdentifier,
|
||||
notAfter: res.NotAfter,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -148,4 +149,8 @@ export class AliyunSslClient {
|
||||
this.checkRet(res);
|
||||
return res;
|
||||
}
|
||||
|
||||
async deleteCert(certId: any) {
|
||||
await this.doRequest("DeleteUserCertificate", { CertId: certId }, { method: "POST" });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user