mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-08-11 02:11:34 +00:00

* 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
31 lines
782 B
Rust
31 lines
782 B
Rust
use flowy_folder2::deps::FolderCloudService;
|
|
use std::sync::Arc;
|
|
|
|
use flowy_user::event_map::UserAuthService;
|
|
|
|
use crate::self_host::configuration::SelfHostedConfiguration;
|
|
use crate::self_host::impls::{
|
|
SelfHostedServerFolderCloudServiceImpl, SelfHostedUserAuthServiceImpl,
|
|
};
|
|
use crate::AppFlowyServer;
|
|
|
|
pub struct SelfHostServer {
|
|
pub(crate) config: SelfHostedConfiguration,
|
|
}
|
|
|
|
impl SelfHostServer {
|
|
pub fn new(config: SelfHostedConfiguration) -> Self {
|
|
Self { config }
|
|
}
|
|
}
|
|
|
|
impl AppFlowyServer for SelfHostServer {
|
|
fn user_service(&self) -> Arc<dyn UserAuthService> {
|
|
Arc::new(SelfHostedUserAuthServiceImpl::new(self.config.clone()))
|
|
}
|
|
|
|
fn folder_service(&self) -> Arc<dyn FolderCloudService> {
|
|
Arc::new(SelfHostedServerFolderCloudServiceImpl())
|
|
}
|
|
}
|