mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-20 17:52:51 +00:00
Refactor: Add docker-utils typings
Change-type: patch Signed-off-by: Cameron Diver <cameron@resin.io>
This commit is contained in:
parent
b504306f28
commit
3a4f1594e0
35
src/lib/docker-utils.d.ts
vendored
Normal file
35
src/lib/docker-utils.d.ts
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
import * as Bluebird from 'bluebird';
|
||||
import DockerToolbelt = require('docker-toolbelt');
|
||||
|
||||
// This is the EnvVarObject from src/lib/types, but it seems we cannot
|
||||
// reference it relatively. Just redefine it as it's simple and won't change
|
||||
// often
|
||||
|
||||
interface EnvVarObject {
|
||||
[name: string]: string;
|
||||
}
|
||||
|
||||
interface TaggedRepoImage {
|
||||
repo: string;
|
||||
tag: string;
|
||||
}
|
||||
|
||||
declare class DockerUtils extends DockerToolbelt {
|
||||
constructor(opts: any);
|
||||
|
||||
getRepoAndTag(image: string): Bluebird<TaggedRepoImage>;
|
||||
|
||||
fetchDeltaWithProgress(imgDest: string, fullDeltaOpts: any, onProgress: (args: any) => void): Bluebird<void>;
|
||||
|
||||
fetchImageWithProgress(
|
||||
image: string,
|
||||
config: { uuid: string, currentApiKey: string },
|
||||
onProgress: (args: any) => void,
|
||||
): Bluebird<void>;
|
||||
|
||||
getImageEnv(id: string): Bluebird<EnvVarObject>;
|
||||
getNetworkGateway(netName: string): Bluebird<string>;
|
||||
|
||||
}
|
||||
|
||||
export = DockerUtils;
|
Loading…
x
Reference in New Issue
Block a user