Add an assets list command

This commit is contained in:
Marc Plano-Lesay 2024-11-05 13:40:52 +11:00
parent a8796b2728
commit c026375ce1
Signed by: kernald
GPG key ID: 66A41B08CC62A6CF
5 changed files with 109 additions and 5 deletions

View file

@ -27,6 +27,14 @@ pub(crate) struct Opts {
#[derive(Serialize, Subcommand)]
pub(crate) enum Commands {
/// Assets related commands
#[serde(rename = "assets")]
Assets {
#[command(subcommand)]
#[serde(flatten)]
assets_command: AssetsCommands,
},
/// People related commands
#[serde(rename = "people")]
People {
@ -43,6 +51,17 @@ pub(crate) enum Commands {
},
}
#[derive(Serialize, Subcommand)]
pub(crate) enum AssetsCommands {
/// List all assets
#[serde(rename = "list")]
List {
/// List only offline assets
#[arg(short, long, action)]
offline: bool,
},
}
#[derive(Serialize, Subcommand)]
pub(crate) enum PeopleCommands {
/// Synchronises date of births from a vcard file