ironflow_cli/commands/
mod.rs1use std::str::FromStr;
4
5pub mod account;
6pub mod agent_role;
7pub mod api_key;
8pub mod audit_log;
9pub mod dashboard;
10pub mod delegation;
11pub mod init;
12pub mod logs;
13pub mod run;
14pub mod schedule;
15pub mod secret;
16pub mod signal;
17pub mod stats;
18pub mod template;
19pub mod user;
20pub mod workflow;
21
22pub(crate) fn parse_enum<T: FromStr + ToString>(
32 raw: &str,
33 accepted: &[T],
34 noun: &str,
35) -> Result<T, String> {
36 T::from_str(raw).map_err(|_| {
37 let accepted: Vec<String> = accepted.iter().map(ToString::to_string).collect();
38 format!("unknown {noun} '{raw}'; accepted: {}", accepted.join(", "))
39 })
40}