Skip to main content

twc_rs/cli/
registry.rs

1// SPDX-FileCopyrightText: 2026 RAprogramm <andrey.rozanov.vl@gmail.com>
2// SPDX-License-Identifier: MIT
3
4//! Container registry subcommands.
5
6use clap::Subcommand;
7
8/// Container registry subcommands.
9#[derive(Subcommand, Debug)]
10pub enum RegistryCommands {
11    /// List all container registries.
12    List {
13        /// Maximum number of registries to return (not supported by API).
14        #[arg(long)]
15        limit: Option<i32>,
16
17        /// Number of registries to skip (not supported by API).
18        #[arg(long)]
19        offset: Option<i32>
20    },
21    /// Show detailed info for a registry.
22    Info {
23        /// Registry ID.
24        #[arg(long)]
25        id: i32
26    },
27    /// Create a new container registry.
28    Create {
29        /// Registry name (3-48 chars, lowercase alphanumeric and hyphens).
30        #[arg(long)]
31        name: String
32    },
33    /// Delete a registry by ID.
34    Delete {
35        /// Registry ID.
36        #[arg(long)]
37        id: i32
38    },
39    /// Update registry settings.
40    Update {
41        /// Registry ID.
42        #[arg(long)]
43        id: i32,
44
45        /// New registry description.
46        #[arg(long)]
47        description: Option<String>
48    },
49    /// List repositories for a registry.
50    RepoList {
51        /// Registry ID.
52        #[arg(long)]
53        id: i32
54    },
55    /// List available registry presets.
56    PresetList
57}