use std::collections::HashMap; #[derive(Default)] pub struct ClusterList {} impl ClusterList { pub async fn get_list(&self) -> anyhow::Result>> { Ok(HashMap::from([ ("dev".into(), vec!["clank-dev".into()]), ("prod".into(), vec!["clank-prod".into()]), ])) } pub async fn get(&self, environment: &str) -> anyhow::Result>> { let list = self.get_list().await?; if let Some(x) = list.get(environment) { Ok(Some(x.clone())) } else { Ok(None) } } }