UNPKG

@cumulus/ingest

Version:
73 lines 2.4 kB
export = HttpProviderClient; declare class HttpProviderClient { constructor(providerConfig: any); providerConfig: any; protocol: any; host: any; port: any; httpListTimeout: any; gotOptions: {}; certificateUri: any; encrypted: any; defaultRedirect: any; allowedRedirects: any; endpoint: string; setUpGotOptions(): Promise<void>; username: any; password: any; downloadTLSCertificate(): Promise<void>; certificate: string | undefined; /** * List all PDR files from a given endpoint * * @param {string} path - the remote path to list * @param {testMocks} - Mocks for testing * @returns {Promise<Array>} a list of files */ list(path: string, testMocks?: {}): Promise<any[]>; /** * Download a remote file to disk * * @param {object} params * @param {string} params.remotePath - the full path to the remote file to be fetched * @param {string} params.localPath - the full local destination file path * @returns {Promise.<string>} - the path that the file was saved to */ download(params: { remotePath: string; localPath: string; }): Promise<string>; /** * Download the remote file to a given s3 location * * @param {object} params * @param {string} params.fileRemotePath - the full path to the remote file to be fetched * @param {string} params.destinationBucket - destination s3 bucket of the file * @param {string} params.destinationKey - destination s3 key of the file * @returns {Promise.<{ s3uri: string, etag: string }>} an object containing * the S3 URI and ETag of the destination file */ sync(params: { fileRemotePath: string; destinationBucket: string; destinationKey: string; }): Promise<{ s3uri: string; etag: string; }>; /** * Upload a file * * @param {object} params * @param {string} params.localPath - the full local file path * @param {string} params.uploadPath - the full remote file path for uploading file to * @returns {Promise<string>} the uri of the uploaded file */ upload(params: { localPath: string; uploadPath: string; }): Promise<string>; connect(): Promise<void>; end(): Promise<void>; } //# sourceMappingURL=HttpProviderClient.d.ts.map