1pub mod discover;
2pub mod init;
3pub mod fetch;
4pub mod deploy;
5pub mod execute;
6pub mod datasources;
7pub mod archive;
8pub mod dashboards;
9pub mod update;
10
11use anyhow::{bail, Result};
12
13#[derive(Debug, Clone, Copy)]
14pub enum OutputFormat {
15 Json,
16 Table,
17}
18
19impl std::str::FromStr for OutputFormat {
20 type Err = anyhow::Error;
21
22 fn from_str(s: &str) -> Result<Self> {
23 match s.to_lowercase().as_str() {
24 "json" => Ok(Self::Json),
25 "table" => Ok(Self::Table),
26 _ => bail!("Invalid format. Use: json or table"),
27 }
28 }
29}