24 lines
808 B
JavaScript
24 lines
808 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.TencentYunInstance = void 0;
|
|
const Tencent_1 = require("./service/tencent/Tencent");
|
|
Object.defineProperty(exports, "TencentYunInstance", { enumerable: true, get: function () { return Tencent_1.TencentYunInstance; } });
|
|
class TencentYunSDK {
|
|
tencentMap; //oss
|
|
constructor() {
|
|
this.tencentMap = {};
|
|
}
|
|
getInstance(accessKey, accessSecret) {
|
|
if (this.tencentMap[accessKey]) {
|
|
return this.tencentMap[accessKey];
|
|
}
|
|
const instance = new Tencent_1.TencentYunInstance(accessKey, accessSecret);
|
|
Object.assign(this.tencentMap, {
|
|
[accessKey]: instance,
|
|
});
|
|
return instance;
|
|
}
|
|
}
|
|
const SDK = new TencentYunSDK();
|
|
exports.default = SDK;
|