digitaltwin-core
Version:
Minimalist framework to collect and handle data in a Digital Twin project
32 lines • 1.19 kB
TypeScript
import { StorageService } from '../storage_service.js';
export interface OvhS3Config {
accessKey: string;
secretKey: string;
endpoint: string;
region?: string;
bucket: string;
}
export declare class OvhS3StorageService extends StorageService {
#private;
constructor(config: OvhS3Config);
/**
* Uploads a file to the OVH S3-compatible object storage.
* @param buffer - File contents to upload
* @param collectorName - Folder/prefix to store under
* @param extension - Optional file extension (e.g. 'json')
* @returns The relative path (key) of the stored object
*/
save(buffer: Buffer, collectorName: string, extension?: string): Promise<string>;
/**
* Downloads and returns a stored object as a Buffer.
* @param relativePath - The key/path of the object to retrieve
* @returns The object contents as a Buffer
*/
retrieve(relativePath: string): Promise<Buffer>;
/**
* Deletes an object from the storage bucket.
* @param relativePath - The key/path of the object to delete
*/
delete(relativePath: string): Promise<void>;
}
//# sourceMappingURL=ovh_storage_service.d.ts.map