the-moby-effect
Version:
Moby/Docker API client built using effect-ts
92 lines • 3.72 kB
TypeScript
import type * as HttpBody from "@effect/platform/HttpBody";
import type * as HttpClientError from "@effect/platform/HttpClientError";
import type * as Layer from "effect/Layer";
import type * as ParseResult from "effect/ParseResult";
import type * as Stream from "effect/Stream";
import * as HttpClient from "@effect/platform/HttpClient";
import * as Effect from "effect/Effect";
import { Plugin, PluginPrivilege } from "../generated/index.js";
/**
* @since 1.0.0
* @category Errors
*/
export declare const PluginsErrorTypeId: unique symbol;
/**
* @since 1.0.0
* @category Errors
*/
export type PluginsErrorTypeId = typeof PluginsErrorTypeId;
/**
* @since 1.0.0
* @category Errors
*/
export declare const isPluginsError: (u: unknown) => u is PluginsError;
declare const PluginsError_base: new <A extends Record<string, any>>(args: import("effect/Types").Simplify<A>) => import("effect/Cause").YieldableError & Record<typeof PluginsErrorTypeId, typeof PluginsErrorTypeId> & {
readonly _tag: "PluginsError";
} & Readonly<A>;
/**
* @since 1.0.0
* @category Errors
*/
export declare class PluginsError extends PluginsError_base<{
method: string;
cause: ParseResult.ParseError | HttpClientError.HttpClientError | HttpBody.HttpBodyError | unknown;
}> {
get message(): string;
}
declare const Plugins_base: Effect.Service.Class<Plugins, "@the-moby-effect/endpoints/Plugins", {
readonly accessors: false;
readonly dependencies: readonly [];
readonly effect: Effect.Effect<{
list: (options?: {
readonly filters?: {
compatibility?: [string];
enable?: ["true" | "false"];
};
} | undefined) => Effect.Effect<Readonly<Array<Plugin>>, PluginsError>;
getPrivileges: (remote: string) => Effect.Effect<Readonly<Array<PluginPrivilege>>, PluginsError, never>;
pull: (remote: string, options?: {
readonly name?: string;
readonly "X-Registry-Auth"?: string;
readonly body?: Array<PluginPrivilege>;
} | undefined) => Effect.Effect<void, PluginsError, never>;
inspect: (name: string) => Effect.Effect<Readonly<Plugin>, PluginsError, never>;
delete: (name: string, options?: {
readonly force?: boolean;
} | undefined) => Effect.Effect<void, PluginsError, never>;
enable: (name: string, options?: {
readonly timeout?: number;
} | undefined) => Effect.Effect<void, PluginsError, never>;
disable: (name: string, options?: {
readonly force?: boolean;
} | undefined) => Effect.Effect<void, PluginsError, never>;
upgrade: (options: {
readonly name: string;
readonly remote: string;
readonly "X-Registry-Auth"?: string;
readonly body?: Array<PluginPrivilege>;
}) => Effect.Effect<void, PluginsError, never>;
create: <E1>(name: string, tarContext: Stream.Stream<Uint8Array, E1, never>) => Effect.Effect<void, PluginsError, never>;
push: (name: string) => Effect.Effect<void, PluginsError, never>;
set: (name: string, options?: {
readonly body?: Array<string>;
} | undefined) => Effect.Effect<void, PluginsError, never>;
}, never, HttpClient.HttpClient>;
}>;
/**
* Plugins service
*
* @since 1.0.0
* @category Tags
* @see https://docs.docker.com/engine/api/v1.45/#tag/Plugin
*/
export declare class Plugins extends Plugins_base {
}
/**
* @since 1.0.0
* @category Layers
* @see https://docs.docker.com/engine/api/v1.45/#tag/Plugin
*/
export declare const PluginsLayer: Layer.Layer<Plugins, never, HttpClient.HttpClient>;
export {};
//# sourceMappingURL=plugins.d.ts.map