Add API Version check endpoint

This commit is contained in:
Anthony Oteri
2023-09-14 10:03:10 -04:00
parent 00a1ad87e7
commit 9445c9e817
5 changed files with 117 additions and 1 deletions
+9 -1
View File
@@ -7,13 +7,16 @@ use clap::ValueEnum;
use std::ffi::OsString;
use std::path::PathBuf;
/// Dredge is a command line tool for working with the Docker Registry
/// V2 API.
#[derive(Debug, Parser)]
#[command(name = "dredge", version, author)]
#[command(about = "A Docker Registry CLI tool", long_about = None)]
#[command(about, long_about)]
pub(crate) struct Cli {
#[command(subcommand)]
pub command: Commands,
/// Optional configuration file override.
#[arg(short = 'c', long = "config")]
pub config: Option<OsString>,
@@ -54,5 +57,10 @@ impl From<LogLevel> for log::LevelFilter {
#[derive(Debug, Subcommand)]
pub enum Commands {
/// Fetch the list of available repositories from the catalog.
Catalog,
/// Perform a simple API Version check towards the configured registry
/// endpoint.
Check,
}