This repository was archived by the owner on Dec 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathnode-sftp-s3.d.ts
66 lines (54 loc) · 1.46 KB
/
node-sftp-s3.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/// <reference path="./typings/aws-sdk/aws-sdk.d.ts" />
declare module 'node-sftp-s3' {
import * as AWS from 'aws-sdk';
import { EventEmitter } from 'events';
export class SFTPS3Server extends EventEmitter {
constructor(s3: AWS.S3);
/**
* Enables logging to standard output
*/
enableLogging(): void;
/**
* Disables logging
*/
disableLogging(): void;
/**
* Adds a public key for authentication for a username
*
* @param {string} key
* @param {string} username - username for specified key
* @param {string} [ns] - Additional path prefix
*/
addPublicKey(key: string, username: string, ns?: string): void;
/**
* Remove the public key for a username
*
* @param {string} username
*/
removePublicKey(username: string): void;
/**
* Remove all public keys
*/
removeAllPublicKeys(): void;
/**
* Add a host key. You need at least one host key before you can start the server.
*
* @param {string} key
*/
addHostKey(key: string): void;
/**
* Starts the SFTP server listening
*
* @param {number} port
* @param {string} bindAddress
* @param {Function} [callback]
*/
listen(port: number, bindAddress: string, callback?: (port: number) => void): void;
/**
* Stop listener
*
* @param {Function} cb - Callback for when stop is complete
*/
stop(cb: () => void): void;
}
}