diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2023-04-01 15:42:18 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2023-04-01 15:42:18 +0200 |
commit | cca150aff45557c5149a12638cf9da7cc4e028b5 (patch) | |
tree | 68134c051518d1766273d35108fade5bbbbeb9c4 /src/bin/zot/main.rs | |
parent | 8100cff32bf0c87dc19fba78f3faac8090f863da (diff) | |
download | rust-zotapi-cca150aff45557c5149a12638cf9da7cc4e028b5.tar.gz rust-zotapi-cca150aff45557c5149a12638cf9da7cc4e028b5.tar.bz2 rust-zotapi-cca150aff45557c5149a12638cf9da7cc4e028b5.zip |
Add version API.
Diffstat (limited to 'src/bin/zot/main.rs')
-rw-r--r-- | src/bin/zot/main.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bin/zot/main.rs b/src/bin/zot/main.rs index d09b5d4..7f49eb4 100644 --- a/src/bin/zot/main.rs +++ b/src/bin/zot/main.rs @@ -38,6 +38,9 @@ async fn main() -> Result<(), Box<(dyn std::error::Error + 'static)>> { (@subcommand verify => (about: "Verify") ) + (@subcommand version => + (about: "Return the version of a server.") + ) (@subcommand channel => (about: "Fetch the channel stream") ) @@ -90,6 +93,10 @@ async fn main() -> Result<(), Box<(dyn std::error::Error + 'static)>> { let channel = z.verify().await; println!("{:?}", channel); } + + ("version", Some(_)) => { + println!("{}", z.version().await?); + } /* ("channel", Some(m)) => { let raw = m.is_present("raw"); |