This commit is contained in:
xiaojunnuo
2025-04-24 17:27:13 +08:00
parent 162ebfd4e0
commit 7d96a57d73
5 changed files with 110 additions and 24 deletions
@@ -27,8 +27,7 @@ export abstract class CertApplyBaseConvertPlugin extends AbstractTaskPlugin {
"1、支持多个域名打到一个证书上,例如: foo.com*.foo.com*.bar.com\n" +
"2、子域名被通配符包含的不要填写,例如:www.foo.com已经被*.foo.com包含,不要填写www.foo.com\n" +
"3、泛域名只能通配*号那一级(*.foo.com的证书不能用于xxx.yyy.foo.com、不能用于foo.com\n" +
"4、输入一个,空格之后,再输入下一个\n" +
"5、如果你配置了子域托管解析,请先[设置托管子域名](#/certd/pipeline/subDomain)",
"4、输入一个,空格之后,再输入下一个",
})
domains!: string[];
@@ -0,0 +1,25 @@
import { AliyunAccess } from "../aliyun";
import { HttpClient, ILogger } from "@certd/basic";
import { IOssClient, OssClientDeleteReq } from "./api";
export class AliossClient implements IOssClient {
access: AliyunAccess;
logger: ILogger;
http: HttpClient;
constructor(opts: { access: AliyunAccess; http: HttpClient; logger: ILogger }) {
this.access = opts.access;
this.http = opts.http;
this.logger = opts.logger;
}
upload(key: string, content: Buffer | string): Promise<void> {
throw new Error("Method not implemented.");
}
download(key: string, savePath?: string): Promise<void> {
throw new Error("Method not implemented.");
}
delete(opts: OssClientDeleteReq): Promise<void> {
throw new Error("Method not implemented.");
}
}
@@ -0,0 +1,12 @@
export type OssClientDeleteReq = {
key: string;
beforeDays?: number;
};
export interface IOssClient {
upload(key: string, content: Buffer | string): Promise<void>;
download(key: string, savePath?: string): Promise<void>;
delete(opts: OssClientDeleteReq): Promise<void>;
}