use crate::cloud::space::Space;
use ockam_core::async_trait;
use ockam_core::Result;
#[async_trait]
pub trait SpacesRepository: Send + Sync + 'static {
async fn store_space(&self, space: &Space) -> Result<()>;
async fn get_space(&self, space_id: &str) -> Result<Option<Space>>;
async fn get_space_by_name(&self, name: &str) -> Result<Option<Space>>;
async fn get_spaces(&self) -> Result<Vec<Space>>;
async fn get_default_space(&self) -> Result<Option<Space>>;
async fn set_default_space(&self, space_id: &str) -> Result<()>;
async fn delete_space(&self, space_id: &str) -> Result<()>;
}