use crate::app::config::App;
use crate::error::Result;
use async_trait::async_trait;
#[async_trait]
pub trait AppManager: Send + Sync + 'static {
async fn init(&self) -> Result<()>;
async fn create_app(&self, config: App) -> Result<()>;
async fn update_app(&self, config: App) -> Result<()>;
async fn delete_app(&self, app_id: &str) -> Result<()>;
async fn get_apps(&self) -> Result<Vec<App>>;
async fn find_by_key(&self, key: &str) -> Result<Option<App>>;
async fn find_by_id(&self, app_id: &str) -> Result<Option<App>>;
}