From 28981e2b043a57722ced5b37d72eb1548e175ba7 Mon Sep 17 00:00:00 2001 From: the2ndlaw Date: Thu, 30 May 2019 20:10:15 +0200 Subject: [PATCH] Add getConfig and listConfigs (#35817) --- types/dockerode/index.d.ts | 42 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/types/dockerode/index.d.ts b/types/dockerode/index.d.ts index 8281f315f9..886d1ceb7a 100644 --- a/types/dockerode/index.d.ts +++ b/types/dockerode/index.d.ts @@ -305,6 +305,24 @@ declare namespace Dockerode { resize(options: {}): Promise; } + class Config { + constructor(modem: any, id: string); + + modem: any; + id: string; + + inspect(callback: Callback): void; + inspect(): Promise; + + update(options: {}, callback: Callback): void; + update(callback: Callback): void; + update(options?: {}): Promise; + + remove(options: {}, callback: Callback): void; + remove(callback: Callback): void; + remove(options?: {}): Promise; + } + 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): void; listContainers(callback: Callback): void; listContainers(options?: {}): Promise; @@ -1148,6 +1186,10 @@ declare class Dockerode { listNetworks(callback: Callback): void; listNetworks(options?: {}): Promise; + listConfigs(options: {}, callback: Callback): void; + listConfigs(callback: Callback): void; + listConfigs(options?: {}): Promise; + createSecret(options: {}, callback: Callback): void; createSecret(options: {}): Promise;