use super::Result;
use std::collections::HashMap;
pub trait CredentialSearchApi {
fn by(&self, by: &str, query: &str) -> Result<HashMap<String, HashMap<String, String>>>;
}
pub type CredentialSearch = dyn CredentialSearchApi + Send + Sync;
pub type CredentialSearchResult = Result<HashMap<String, HashMap<String, String>>>;
pub trait CredentialListApi {
fn list_credentials(
search_result: Result<HashMap<String, HashMap<String, String>>>,
limit: Limit,
) -> Result<()>;
}
pub type CredentialList = dyn CredentialListApi + Send + Sync;
pub enum Limit {
All,
Max(i64),
}