UNPKG

sesterce-cli

Version:

A powerful command-line interface tool for managing Sesterce Cloud services. Sesterce CLI provides easy access to GPU cloud instances, AI inference services, container registries, and SSH key management directly from your terminal.

24 lines 987 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CreateGpuCloudVolume = void 0; const either_1 = require("@/core/logic/either"); const create_volume_error_1 = require("./errors/create-volume-error"); class CreateGpuCloudVolume { constructor(apiClient) { this.apiClient = apiClient; } async execute(dto) { try { const volume = await this.apiClient.post("/gpu-cloud/volumes", { body: JSON.stringify(dto) }); if (!volume) { return (0, either_1.left)(new create_volume_error_1.CreateVolumeError("Failed to create volume")); } return (0, either_1.right)(volume); } catch (error) { return (0, either_1.left)(new create_volume_error_1.CreateVolumeError(error instanceof Error ? error.message : "Unexpected error occurred.")); } } } exports.CreateGpuCloudVolume = CreateGpuCloudVolume; //# sourceMappingURL=create-volume.js.map