use dialoguer::BasicHistory;
pub mod file;
#[derive(Clone, Copy)]
pub enum HistoryKey {
Tenant,
Client,
Scopes,
Domain,
Audience,
}
impl HistoryKey {
pub fn as_str(&self) -> &'static str {
match self {
HistoryKey::Tenant => "tenant",
HistoryKey::Client => "client",
HistoryKey::Scopes => "scopes",
HistoryKey::Domain => "domain",
HistoryKey::Audience => "audience",
}
}
}
pub trait HistoryManager {
fn load(&self, key: HistoryKey) -> BasicHistory;
fn save(&self, key: HistoryKey, history: &BasicHistory);
}