mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
056e2d49d0
* chore: env config * chore: get user workspace * feat: enable postgres storage * chore: add new env * chore: add set env ffi * chore: pass env before backend init * chore: update * fix: ci tests * chore: commit the generate env file * chore: remove unused import
18 lines
637 B
Rust
18 lines
637 B
Rust
use appflowy_integrate::RocksCollabDB;
|
|
pub use collab_folder::core::Workspace;
|
|
use flowy_error::FlowyError;
|
|
use lib_infra::future::FutureResult;
|
|
use std::sync::Arc;
|
|
|
|
/// [FolderUser] represents the user for folder.
|
|
pub trait FolderUser: Send + Sync {
|
|
fn user_id(&self) -> Result<i64, FlowyError>;
|
|
fn token(&self) -> Result<Option<String>, FlowyError>;
|
|
fn collab_db(&self) -> Result<Arc<RocksCollabDB>, FlowyError>;
|
|
}
|
|
|
|
/// [FolderCloudService] represents the cloud service for folder.
|
|
pub trait FolderCloudService: Send + Sync + 'static {
|
|
fn create_workspace(&self, uid: i64, name: &str) -> FutureResult<Workspace, FlowyError>;
|
|
}
|