fix(core): update

This commit is contained in:
2019-07-07 10:48:24 +02:00
parent daadb89d25
commit 778d170e2e
14 changed files with 1047 additions and 620 deletions

View File

@@ -4,28 +4,27 @@ export interface ISmartBucketConfig {
provider: 'google';
projectId: string;
bucketName: string;
};
}
export class SmartBucket {
config: ISmartBucketConfig;
private _googleBucket
private _googleBucket;
/**
* the constructor of SmartBucket
*/
constructor(configArg: ISmartBucketConfig) {
this.config = configArg;
}
/**
* initializes the Smartbucket
*/
async init() {
if(this.config.provider === 'google') {
if (this.config.provider === 'google') {
const storage = new plugins.googleCloudStorage.Storage({
projectId: this.config.projectId,
})
storage.createBucket(this.config.bucketName, () => {})
projectId: this.config.projectId
});
storage.createBucket(this.config.bucketName, () => {});
}
}
}

View File

@@ -1,7 +1,9 @@
import * as googleCloudStorage from '@google-cloud/storage';
import * as smartpromise from '@pushrocks/smartpromise';
export {
googleCloudStorage,
smartpromise
}
export { smartpromise };
// third party scope
import * as googleCloudStorage from '@google-cloud/storage';
import * as minio from 'minio';
export { googleCloudStorage };