@apiclient.xyz/docker
Version:
Provides easy communication with Docker remote API from Node.js, with TypeScript support.
51 lines (50 loc) • 1.62 kB
TypeScript
import { DockerHost } from './classes.host.js';
import { DockerResource } from './classes.base.js';
import * as interfaces from './interfaces/index.js';
export declare class DockerSecret extends DockerResource {
/**
* Internal: Get all secrets
* Public API: Use dockerHost.listSecrets() instead
*/
static _list(dockerHostArg: DockerHost): Promise<DockerSecret[]>;
/**
* Internal: Get secret by ID
* Public API: Use dockerHost.getSecretById(id) instead
*/
static _fromId(dockerHostArg: DockerHost, idArg: string): Promise<DockerSecret | undefined>;
/**
* Internal: Get secret by name
* Public API: Use dockerHost.getSecretByName(name) instead
*/
static _fromName(dockerHostArg: DockerHost, nameArg: string): Promise<DockerSecret | undefined>;
/**
* Internal: Create a secret
* Public API: Use dockerHost.createSecret(descriptor) instead
*/
static _create(dockerHostArg: DockerHost, secretDescriptor: interfaces.ISecretCreationDescriptor): Promise<DockerSecret>;
ID: string;
Spec: {
Name: string;
Labels: interfaces.TLabels;
};
Version: {
Index: string;
};
constructor(dockerHostArg: DockerHost);
/**
* Refreshes this secret's state from the Docker daemon
*/
refresh(): Promise<void>;
/**
* Updates a secret
*/
update(contentArg: string): Promise<void>;
/**
* Removes this secret from the Docker daemon
*/
remove(): Promise<void>;
/**
* Gets the version label of this secret
*/
getVersion(): Promise<string>;
}