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