UNPKG

@topgroup/diginext

Version:

A BUILD SERVER & CLI to deploy apps to any Kubernetes clusters.

32 lines 1.65 kB
/// <reference types="node" /> /// <reference types="node" /> import type { Bucket } from "@google-cloud/storage"; import type { ICloudStorage } from "../../entities"; import type { StorageUploadOptions } from "./storage-types"; export type GoogleStorageBucket = Bucket & { pathPrefix: string; }; export type InitGoogleStorageOptions = { isDebugging?: boolean; }; export declare function initStorageByServiceAccount(serviceAccount: string, bucketName: string, options?: InitGoogleStorageOptions): GoogleStorageBucket; export declare function initStorage(storage: ICloudStorage, options?: InitGoogleStorageOptions): GoogleStorageBucket; export declare function listBuckets(storage: ICloudStorage): Promise<import("@google-cloud/storage").GetBucketsResponse>; export declare function getUploadFileStorageUrl(bucketName: string, destFileName: string): string; export declare function getUploadFilePublicUrl(storageHost: string, destFileName: string): string; export declare function uploadFileBuffer(storage: ICloudStorage, buffer: Buffer, destFileName: string, options?: StorageUploadOptions): Promise<{ path: string; storageUrl: string; publicUrl: string; }>; export declare function uploadFileURL(storage: ICloudStorage, url: string, destFileName: string, options?: StorageUploadOptions): Promise<{ path: string; storageUrl: string; publicUrl: string; }>; export declare function uploadFilePath(storage: ICloudStorage, filePath: string, destFileName: string, options?: StorageUploadOptions): Promise<{ path: string; storageUrl: string; publicUrl: string; }>; //# sourceMappingURL=google-storage.d.ts.map