lakutata
Version:
An IoC-based universal application framework.
60 lines (53 loc) • 1.76 kB
TypeScript
/**
* Docker connection key object
*/
interface IDockerKeyObject {
pem: string | Buffer;
passphrase?: string | undefined;
}
/**
* Docker connection options
*/
interface IDockerConnectionOptions {
socketPath?: string | undefined;
host?: string | undefined;
port?: number | string | undefined;
username?: string | undefined;
headers?: {
[name: string]: string;
};
ca?: string | string[] | Buffer | Buffer[] | undefined;
cert?: string | string[] | Buffer | Buffer[] | undefined;
key?: string | string[] | Buffer | Buffer[] | IDockerKeyObject[] | undefined;
protocol?: 'https' | 'http' | 'ssh' | undefined;
timeout?: number | undefined;
version?: string | undefined;
sshAuthAgent?: string | undefined;
}
/**
* Docker http connection options
*/
interface IDockerHttpConnectionOptions extends Omit<IDockerConnectionOptions, 'socketPath' | 'sshAuthAgent'> {
host: string;
port: number | string;
}
/**
* Docker https connection options
*/
interface IDockerHttpsConnectionOptions extends Omit<IDockerConnectionOptions, 'socketPath' | 'sshAuthAgent'> {
host: string;
port: number | string;
}
/**
* Docker ssh connection options
*/
interface IDockerSSHConnectionOptions extends Omit<IDockerConnectionOptions, 'socketPath'> {
host: string;
port: number | string;
}
/**
* Docker socket connection options
*/
interface IDockerSocketConnectionOptions extends Omit<IDockerConnectionOptions, 'sshAuthAgent' | 'key' | 'protocol' | 'cert' | 'headers' | 'username' | 'port' | 'host'> {
}
export type { IDockerConnectionOptions, IDockerHttpConnectionOptions, IDockerHttpsConnectionOptions, IDockerKeyObject, IDockerSSHConnectionOptions, IDockerSocketConnectionOptions };