RON database manager
1use clap::{Args, Parser, Subcommand};
2
3#[derive(Debug, Args)]
4pub struct Key {
5 pub key: String,
6}
7
8#[derive(Debug, Args)]
9pub struct KeyVal {
10 pub key: String,
11 pub value: String,
12}
13
14#[derive(Debug, Parser)]
15#[clap(author, version, about)]
16pub struct CLIArgs {
17 #[clap(subcommand)]
18 /// this is a subcommand
19 pub command: Command,
20}
21
22#[derive(Debug, Subcommand)]
23pub enum Command {
24 /// Retrieve the value associated with <KEY> from resource file
25 Get(Key),
26 /// Set a <VALUE> for a given <KEY> in the resource file (will print to stdout the associated
27 /// key-value pair)
28 Set(KeyVal),
29 /// Pretty print the entire resource file
30 All,
31}