@opengis/fastify-table
Version:
core-plugins
50 lines (40 loc) • 1.1 kB
TypeScript
import { Readable } from 'stream';
interface IListElement {
login?: string;
password?: string;
endpoint?: string;
containerName?: string;
accessKeyId?: string;
secretAccessKey?: string;
}
interface IList {
[key: string]: IListElement;
}
interface IArgs {
name: string;
list: IList;
}
interface IUploadArgs {
filepath: string;
data: string | Buffer | ReadableStream;
}
interface IInputArgs {
filepath: string;
}
interface IObjects {
Key: string
}
interface IDownloadOptions {
buffer: boolean
}
interface Ifuncs {
deleteFile: (filepath: string) => Promise<any>;
downloadFile: (filepath: string, options: IDownloadOptions) => Promise<Readable | Buffer>;
uploadFile: (opt: IUploadArgs) => Promise<any>;
moveFile: (filepath: string, destFilepath: string) => Promise<any>;
fileExists: (filepath: string) => Promise<boolean>;
readdir: (filepath: string) => Promise<[IObjects]>
getFileSize: (filepath) => Promise<number>;
getMDate: (filepath) => Promise<Date>;
}
export = function (opt?: IArgs): Ifuncs { }