Refactoring for Show/Delete handlers

Refactor the existing code architecture to be a little flatter to support adding the show and delete handlers.  Currently these two handlers are just stubbed functions, but the CLI looks about right.
This commit is contained in:
Anthony Oteri
2023-09-20 16:38:24 -04:00
parent 6f44b77a6d
commit 3768401faf
7 changed files with 201 additions and 235 deletions
+13
View File
@@ -78,8 +78,21 @@ pub enum Commands {
Catalog,
/// Fetch the list of tags for a given image.
#[command(arg_required_else_help = true)]
Tags { name: String },
/// Show detailed information about a particular image.
#[command(arg_required_else_help = true)]
Show {
image: String,
#[arg(default_missing_value = "latest")]
tag: Option<String>,
},
/// Delete a tagged image from the registry.
#[command(arg_required_else_help = true)]
Delete { image: String, tag: String },
/// Perform a simple API Version check towards the configured registry
/// endpoint.
Check,