Nathan.fooo edc7933c66
feat: support pg storage (#2935)
* refactor: using tokio-postgres

* chore: update

* chore: update env

* chore: update

* chore: upgrade supabase and add logout button

* refactor: update

* chore: update

* refactor: using message queue to handle the pg connection

* refactor: move test

* refactor: update sql

* chore: create pg database when user login

* chore: update scheme

* chore: generic user service

* chore: update

* chore: create statistics

* chore: create snapshot

* chore: add test

* chore: add database cloud service

* chore: add document cloud service

* chore: update interface

* test: add document test

* refactor: document interface

* chore: fix test

* chore: update

* chore: update test

* test: add test

* test: add test

* test: add test

* chore: update collab rev

* fix: flutter analyzer

* chore: update

* chore: update

* chore: update

* fix: tests

* chore: update

* chore: update collab rev

* ci: rust fmt

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2023-07-05 20:57:09 +08:00

30 lines
1011 B
Rust

use std::sync::Arc;
use flowy_database2::DatabaseManager2;
use flowy_document2::manager::DocumentManager as DocumentManager2;
use flowy_folder2::manager::FolderManager;
use flowy_user::services::UserSession;
use lib_dispatch::prelude::AFPlugin;
pub fn make_plugins(
folder_manager: &Arc<FolderManager>,
database_manager: &Arc<DatabaseManager2>,
user_session: &Arc<UserSession>,
document_manager2: &Arc<DocumentManager2>,
) -> Vec<AFPlugin> {
let user_plugin = flowy_user::event_map::init(user_session.clone());
let folder_plugin = flowy_folder2::event_map::init(folder_manager.clone());
let network_plugin = flowy_net::event_map::init();
let database_plugin = flowy_database2::event_map::init(database_manager.clone());
let document_plugin2 = flowy_document2::event_map::init(document_manager2.clone());
let config_plugin = flowy_config::event_map::init();
vec![
user_plugin,
folder_plugin,
network_plugin,
database_plugin,
document_plugin2,
config_plugin,
]
}