use std::sync::Arc;
use crate::{AuditSink, CredentialStore, LifecycleStore, PolicyStore, RateLimitCounter, Result, SessionStore};
pub trait PolicyStoreFactory: Send + Sync {
fn build(&self, config: &toml::Value) -> Result<Arc<dyn PolicyStore>>;
}
pub trait AuditSinkFactory: Send + Sync {
fn build(&self, config: &toml::Value) -> Result<Arc<dyn AuditSink>>;
}
pub trait SessionStoreFactory: Send + Sync {
fn build(&self, config: &toml::Value) -> Result<Arc<dyn SessionStore>>;
}
pub trait CredentialStoreFactory: Send + Sync {
fn build(&self, config: &toml::Value) -> Result<Arc<dyn CredentialStore>>;
}
pub trait RateLimitCounterFactory: Send + Sync {
fn build(&self, config: &toml::Value) -> Result<Arc<dyn RateLimitCounter>>;
}
pub trait LifecycleStoreFactory: Send + Sync {
fn build(&self, config: &toml::Value) -> Result<Arc<dyn LifecycleStore>>;
}