1 | import Modem = require('docker-modem');
|
2 | /**
|
3 | * Class representing a volume
|
4 | */
|
5 | export declare class Volume {
|
6 | modem: Modem;
|
7 | id: String;
|
8 | data: Object;
|
9 | /**
|
10 | * Create a volume
|
11 | * @param {Modem} modem Modem to connect to the remote service
|
12 | * @param {string} id Id of the volume (optional)
|
13 | */
|
14 | constructor(modem: Modem, id: String);
|
15 | /**
|
16 | * Get low-level information on a volume
|
17 | * https://docs.docker.com/engine/reference/api/docker_remote_api_v1.24/#/inspect-a-volume
|
18 | * The reason why this module isn't called inspect is because that interferes with the inspect utility of node.
|
19 | * @param {Object} opts Query params in the request (optional)
|
20 | * @param {String} id ID of the volume to inspect, if it's not set, use the id of the object (optional)
|
21 | * Promise} Promise return the volume
{ |
22 | */
|
23 | status(opts?: Object): Promise<Volume>;
|
24 | /**
|
25 | * Remove a volume from the filesystem
|
26 | * https://docs.docker.com/engine/reference/api/docker_remote_api_v1.24/#/remove-a-volume
|
27 | * @param {Object} opts Query params in the request (optional)
|
28 | * @param {String} id ID of the volume to inspect, if it's not set, use the id of the object (optional)
|
29 | * @return {Promise} Promise return the result
|
30 | */
|
31 | remove(opts?: Object): Promise<{}>;
|
32 | }
|
33 | export default class {
|
34 | modem: Modem;
|
35 | /**
|
36 | * Create a volume
|
37 | * @param {Modem} modem Modem to connect to the remote service
|
38 | * @param {string} id Id of the volume (optional)
|
39 | */
|
40 | constructor(modem: Modem);
|
41 | /**
|
42 | * Get a Volume object
|
43 | * @param {id} String ID of the secret
|
44 | * {Volume}
|
45 | */
|
46 | get(id: String): Volume;
|
47 | /**
|
48 | * Get the list of volumes
|
49 | * https://docs.docker.com/engine/reference/api/docker_remote_api_v1.24/#/list-volumes
|
50 | * @param {Object} opts Query params in the request (optional)
|
51 | * @return {Promise} Promise returning the result as a list of volumes
|
52 | */
|
53 | list(opts?: Object): Promise<Array<Volume>>;
|
54 | /**
|
55 | * Create a volume
|
56 | * https://docs.docker.com/engine/reference/api/docker_remote_api_v1.24/#/create-a-volume
|
57 | * @param {Object} opts Query params in the request (optional)
|
58 | * @return {Promise} Promise return the new volume
|
59 | */
|
60 | create(opts?: Object): Promise<Volume>;
|
61 | /**
|
62 | * Prune volumes
|
63 | * https://docs.docker.com/engine/api/v1.25/#operation/VolumePrune
|
64 | * @param {Object} opts Query params in the request (optional)
|
65 | * @return {Promise} Promise returning the container
|
66 | */
|
67 | prune(opts?: Object): Promise<Object>;
|
68 | }
|