@itwin/object-storage-minio
Version:
Object storage implementation using Minio
24 lines • 1.64 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.MinioFrontendStorageBindings = void 0;
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
const frontend_1 = require("@itwin/object-storage-core/lib/frontend");
const frontend_2 = require("@itwin/object-storage-s3/lib/frontend");
const common_1 = require("../common");
const MinioFrontendStorage_1 = require("./MinioFrontendStorage");
const FrontendMinioS3ClientFactory_1 = require("./wrappers/FrontendMinioS3ClientFactory");
class MinioFrontendStorageBindings extends frontend_2.S3FrontendStorageBindings {
dependencyName = common_1.Constants.storageType;
register(container) {
super.register(container);
container.unregister(frontend_1.Types.Frontend.frontendStorage);
container.registerFactory(frontend_1.Types.Frontend.frontendStorage, (c) => new MinioFrontendStorage_1.MinioFrontendStorage(c.resolve(frontend_1.Types.Frontend.clientWrapperFactory)));
container.unregister(frontend_1.Types.Frontend.clientWrapperFactory);
container.registerFactory(frontend_1.Types.Frontend.clientWrapperFactory, () => new FrontendMinioS3ClientFactory_1.FrontendMinioS3ClientWrapperFactory());
}
}
exports.MinioFrontendStorageBindings = MinioFrontendStorageBindings;
//# sourceMappingURL=MinioFrontendStorageBindings.js.map
;