2016-05-31 17:16:45 +00:00
|
|
|
import "typings-global";
|
2016-06-24 00:49:55 +00:00
|
|
|
import { SshDir } from "./smartssh.classes.sshdir";
|
2016-05-31 17:16:45 +00:00
|
|
|
import { SshKey } from "./smartssh.classes.sshkey";
|
2016-06-01 00:31:29 +00:00
|
|
|
export declare class SshInstance {
|
2016-06-24 00:49:55 +00:00
|
|
|
private _sshConfig;
|
|
|
|
sshDir: SshDir;
|
2016-06-13 22:27:55 +00:00
|
|
|
protected sshKeyArray: SshKey[];
|
2016-06-24 00:49:55 +00:00
|
|
|
private _sshSync;
|
2016-05-31 17:16:45 +00:00
|
|
|
constructor(optionsArg?: {
|
2016-06-01 01:57:17 +00:00
|
|
|
sshDirPath?: string;
|
2016-05-31 17:16:45 +00:00
|
|
|
sshSync?: boolean;
|
|
|
|
});
|
|
|
|
addKey(sshKeyArg: SshKey): void;
|
|
|
|
removeKey(sshKeyArg: SshKey): void;
|
|
|
|
replaceKey(sshKeyOldArg: SshKey, sshKeyNewArg: SshKey): void;
|
2016-06-01 01:57:17 +00:00
|
|
|
getKey(hostArg: string): SshKey;
|
|
|
|
sshKeys: SshKey[];
|
2016-06-24 00:49:55 +00:00
|
|
|
/**
|
|
|
|
* write SshInstance to disk
|
|
|
|
*/
|
|
|
|
writeToDisk(): void;
|
|
|
|
/**
|
|
|
|
* read ab SshInstance from disk
|
|
|
|
*/
|
|
|
|
readFromDisk(): void;
|
|
|
|
/**
|
|
|
|
* method to invoke SshInstance _sync automatically when sshSync is true
|
|
|
|
*/
|
|
|
|
private _syncAuto(directionArg);
|
|
|
|
/**
|
|
|
|
* private method to sync SshInstance
|
|
|
|
*/
|
|
|
|
private _sync(directionArg);
|
2016-05-31 17:16:45 +00:00
|
|
|
}
|