rain_metadata/cli/
schema.rs

1pub mod ls;
2pub mod show;
3
4use clap::Subcommand;
5use show::Show;
6
7/// command related to meta json schema
8#[derive(Subcommand)]
9pub enum Schema {
10    /// Print all known schemas.
11    Ls,
12    /// Print a given known schema.
13    Show(Show),
14}
15
16pub fn dispatch(schema: Schema) -> anyhow::Result<()> {
17    match schema {
18        Schema::Ls => ls::ls(),
19        Schema::Show(s) => show::show(s),
20    }
21}