Add getConfig and listConfigs (#35817)

This commit is contained in:
the2ndlaw 2019-05-30 20:10:15 +02:00 committed by Sheetal Nandi
parent 8e9c4b5479
commit 28981e2b04

View File

@ -305,6 +305,24 @@ declare namespace Dockerode {
resize(options: {}): Promise<any>;
}
class Config {
constructor(modem: any, id: string);
modem: any;
id: string;
inspect(callback: Callback<ConfigInfo>): void;
inspect(): Promise<ConfigInfo>;
update(options: {}, callback: Callback<any>): void;
update(callback: Callback<any>): void;
update(options?: {}): Promise<any>;
remove(options: {}, callback: Callback<any>): void;
remove(callback: Callback<any>): void;
remove(options?: {}): Promise<any>;
}
interface ImageInfo {
Id: string;
ParentId: string;
@ -895,6 +913,24 @@ declare namespace Dockerode {
Spec?: ServiceSpec;
}
interface ConfigInfo {
ID: string;
Version: SecretVersion;
CreatedAt: string;
UpdatedAt?: string;
Spec?: ConfigSpec;
}
interface ConfigSpec {
Name: string;
Labels: { [label: string]: string };
Data: string;
}
interface ConfigVersion {
Index: number;
}
interface PluginInfo {
Id?: string;
Name: string;
@ -1103,6 +1139,8 @@ declare class Dockerode {
getExec(id: string): Dockerode.Exec;
getConfig(id: string): Dockerode.Config;
listContainers(options: {}, callback: Callback<Dockerode.ContainerInfo[]>): void;
listContainers(callback: Callback<Dockerode.ContainerInfo[]>): void;
listContainers(options?: {}): Promise<Dockerode.ContainerInfo[]>;
@ -1148,6 +1186,10 @@ declare class Dockerode {
listNetworks(callback: Callback<any[]>): void;
listNetworks(options?: {}): Promise<any[]>;
listConfigs(options: {}, callback: Callback<Dockerode.ConfigInfo[]>): void;
listConfigs(callback: Callback<Dockerode.ConfigInfo[]>): void;
listConfigs(options?: {}): Promise<Dockerode.ConfigInfo[]>;
createSecret(options: {}, callback: Callback<any>): void;
createSecret(options: {}): Promise<any>;