mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
rename folder event
This commit is contained in:
parent
a48031df7c
commit
fcc6f51b3b
@ -8,7 +8,7 @@ import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
|
||||
import 'package:flowy_sdk/protobuf/flowy-net/event.pb.dart';
|
||||
import 'package:flowy_sdk/protobuf/flowy-net/network_state.pb.dart';
|
||||
import 'package:flowy_sdk/protobuf/flowy-user/event_map.pb.dart';
|
||||
import 'package:flowy_sdk/protobuf/flowy-folder/event.pb.dart';
|
||||
import 'package:flowy_sdk/protobuf/flowy-folder/event_map.pb.dart';
|
||||
import 'package:isolates/isolates.dart';
|
||||
import 'package:isolates/ports.dart';
|
||||
import 'package:ffi/ffi.dart';
|
||||
|
@ -1,11 +1,11 @@
|
||||
///
|
||||
// Generated code. Do not modify.
|
||||
// source: event.proto
|
||||
// source: event_map.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields
|
||||
|
||||
import 'dart:core' as $core;
|
||||
|
||||
export 'event.pbenum.dart';
|
||||
export 'event_map.pbenum.dart';
|
||||
|
@ -1,6 +1,6 @@
|
||||
///
|
||||
// Generated code. Do not modify.
|
||||
// source: event.proto
|
||||
// source: event_map.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields
|
@ -1,6 +1,6 @@
|
||||
///
|
||||
// Generated code. Do not modify.
|
||||
// source: event.proto
|
||||
// source: event_map.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package
|
@ -1,9 +1,9 @@
|
||||
///
|
||||
// Generated code. Do not modify.
|
||||
// source: event.proto
|
||||
// source: event_map.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
// ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package
|
||||
|
||||
export 'event.pb.dart';
|
||||
export 'event_map.pb.dart';
|
||||
|
@ -1,3 +1,3 @@
|
||||
// Auto-generated, do not edit
|
||||
export './dart_notification.pb.dart';
|
||||
export './event.pb.dart';
|
||||
export './event_map.pb.dart';
|
||||
|
@ -18,7 +18,7 @@ lazy_static! {
|
||||
static ref FLOWY_SDK: RwLock<Option<Arc<FlowySDK>>> = RwLock::new(None);
|
||||
}
|
||||
|
||||
fn dispatch() -> Arc<EventDispatcher> {
|
||||
fn get_dispatcher() -> Arc<EventDispatcher> {
|
||||
FLOWY_SDK.read().as_ref().unwrap().dispatcher()
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@ pub extern "C" fn async_event(port: i64, input: *const u8, len: usize) {
|
||||
port
|
||||
);
|
||||
|
||||
let _ = EventDispatcher::async_send_with_callback(dispatch(), request, move |resp: EventResponse| {
|
||||
let _ = EventDispatcher::async_send_with_callback(get_dispatcher(), request, move |resp: EventResponse| {
|
||||
log::trace!("[FFI]: Post data to dart through {} port", port);
|
||||
Box::pin(post_to_flutter(resp, port))
|
||||
});
|
||||
@ -54,7 +54,7 @@ pub extern "C" fn async_event(port: i64, input: *const u8, len: usize) {
|
||||
pub extern "C" fn sync_event(input: *const u8, len: usize) -> *const u8 {
|
||||
let request: ModuleRequest = FFIRequest::from_u8_pointer(input, len).into();
|
||||
log::trace!("[FFI]: {} Sync Event: {:?}", &request.id, &request.event,);
|
||||
let _response = EventDispatcher::sync_send(dispatch(), request);
|
||||
let _response = EventDispatcher::sync_send(get_dispatcher(), request);
|
||||
|
||||
// FFIResponse { }
|
||||
let response_bytes = vec![];
|
||||
|
@ -1,3 +1,3 @@
|
||||
|
||||
proto_crates = ["src/entities", "src/event.rs", "src/dart_notification.rs"]
|
||||
event_files = ["src/event.rs"]
|
||||
proto_crates = ["src/entities", "src/event_map.rs", "src/dart_notification.rs"]
|
||||
event_files = ["src/event_map.rs"]
|
@ -15,7 +15,7 @@ use crate::{
|
||||
dart_notification::{send_dart_notification, FolderNotification},
|
||||
entities::workspace::RepeatedWorkspace,
|
||||
errors::FlowyResult,
|
||||
module::{FolderCouldServiceV1, WorkspaceDatabase, WorkspaceUser},
|
||||
event_map::{FolderCouldServiceV1, WorkspaceDatabase, WorkspaceUser},
|
||||
services::{
|
||||
folder_editor::FolderEditor, persistence::FolderPersistence, set_current_workspace, AppController,
|
||||
TrashController, ViewController, WorkspaceController,
|
||||
|
@ -1,81 +0,0 @@
|
||||
use flowy_derive::{Flowy_Event, ProtoBuf_Enum};
|
||||
use strum_macros::Display;
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Debug, Display, Hash, ProtoBuf_Enum, Flowy_Event)]
|
||||
#[event_err = "FlowyError"]
|
||||
pub enum FolderEvent {
|
||||
#[event(input = "CreateWorkspaceRequest", output = "Workspace")]
|
||||
CreateWorkspace = 0,
|
||||
|
||||
#[event(output = "CurrentWorkspaceSetting")]
|
||||
ReadCurWorkspace = 1,
|
||||
|
||||
#[event(input = "QueryWorkspaceRequest", output = "RepeatedWorkspace")]
|
||||
ReadWorkspaces = 2,
|
||||
|
||||
#[event(input = "QueryWorkspaceRequest")]
|
||||
DeleteWorkspace = 3,
|
||||
|
||||
#[event(input = "QueryWorkspaceRequest", output = "Workspace")]
|
||||
OpenWorkspace = 4,
|
||||
|
||||
#[event(input = "QueryWorkspaceRequest", output = "RepeatedApp")]
|
||||
ReadWorkspaceApps = 5,
|
||||
|
||||
#[event(input = "CreateAppRequest", output = "App")]
|
||||
CreateApp = 101,
|
||||
|
||||
#[event(input = "QueryAppRequest")]
|
||||
DeleteApp = 102,
|
||||
|
||||
#[event(input = "QueryAppRequest", output = "App")]
|
||||
ReadApp = 103,
|
||||
|
||||
#[event(input = "UpdateAppRequest")]
|
||||
UpdateApp = 104,
|
||||
|
||||
#[event(input = "CreateViewRequest", output = "View")]
|
||||
CreateView = 201,
|
||||
|
||||
#[event(input = "QueryViewRequest", output = "View")]
|
||||
ReadView = 202,
|
||||
|
||||
#[event(input = "UpdateViewRequest", output = "View")]
|
||||
UpdateView = 203,
|
||||
|
||||
#[event(input = "QueryViewRequest")]
|
||||
DeleteView = 204,
|
||||
|
||||
#[event(input = "QueryViewRequest")]
|
||||
DuplicateView = 205,
|
||||
|
||||
#[event()]
|
||||
CopyLink = 206,
|
||||
|
||||
#[event(input = "QueryViewRequest", output = "DocumentDelta")]
|
||||
OpenDocument = 207,
|
||||
|
||||
#[event(input = "QueryViewRequest")]
|
||||
CloseView = 208,
|
||||
|
||||
#[event(output = "RepeatedTrash")]
|
||||
ReadTrash = 300,
|
||||
|
||||
#[event(input = "TrashId")]
|
||||
PutbackTrash = 301,
|
||||
|
||||
#[event(input = "RepeatedTrashId")]
|
||||
DeleteTrash = 302,
|
||||
|
||||
#[event()]
|
||||
RestoreAllTrash = 303,
|
||||
|
||||
#[event()]
|
||||
DeleteAllTrash = 304,
|
||||
|
||||
#[event(input = "DocumentDelta", output = "DocumentDelta")]
|
||||
ApplyDocDelta = 400,
|
||||
|
||||
#[event(input = "ExportRequest", output = "ExportData")]
|
||||
ExportDocument = 500,
|
||||
}
|
@ -7,10 +7,11 @@ use crate::{
|
||||
workspace::{CreateWorkspaceParams, RepeatedWorkspace, UpdateWorkspaceParams, Workspace, WorkspaceId},
|
||||
},
|
||||
errors::FlowyError,
|
||||
event::FolderEvent,
|
||||
services::{app::event_handler::*, trash::event_handler::*, view::event_handler::*, workspace::event_handler::*},
|
||||
};
|
||||
use flowy_database::DBConnection;
|
||||
use flowy_derive::{Flowy_Event, ProtoBuf_Enum};
|
||||
use strum_macros::Display;
|
||||
|
||||
use lib_dispatch::prelude::*;
|
||||
use lib_infra::future::FutureResult;
|
||||
@ -78,6 +79,85 @@ pub fn create(folder: Arc<FolderManager>) -> Module {
|
||||
module
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Debug, Display, Hash, ProtoBuf_Enum, Flowy_Event)]
|
||||
#[event_err = "FlowyError"]
|
||||
pub enum FolderEvent {
|
||||
#[event(input = "CreateWorkspaceRequest", output = "Workspace")]
|
||||
CreateWorkspace = 0,
|
||||
|
||||
#[event(output = "CurrentWorkspaceSetting")]
|
||||
ReadCurWorkspace = 1,
|
||||
|
||||
#[event(input = "QueryWorkspaceRequest", output = "RepeatedWorkspace")]
|
||||
ReadWorkspaces = 2,
|
||||
|
||||
#[event(input = "QueryWorkspaceRequest")]
|
||||
DeleteWorkspace = 3,
|
||||
|
||||
#[event(input = "QueryWorkspaceRequest", output = "Workspace")]
|
||||
OpenWorkspace = 4,
|
||||
|
||||
#[event(input = "QueryWorkspaceRequest", output = "RepeatedApp")]
|
||||
ReadWorkspaceApps = 5,
|
||||
|
||||
#[event(input = "CreateAppRequest", output = "App")]
|
||||
CreateApp = 101,
|
||||
|
||||
#[event(input = "QueryAppRequest")]
|
||||
DeleteApp = 102,
|
||||
|
||||
#[event(input = "QueryAppRequest", output = "App")]
|
||||
ReadApp = 103,
|
||||
|
||||
#[event(input = "UpdateAppRequest")]
|
||||
UpdateApp = 104,
|
||||
|
||||
#[event(input = "CreateViewRequest", output = "View")]
|
||||
CreateView = 201,
|
||||
|
||||
#[event(input = "QueryViewRequest", output = "View")]
|
||||
ReadView = 202,
|
||||
|
||||
#[event(input = "UpdateViewRequest", output = "View")]
|
||||
UpdateView = 203,
|
||||
|
||||
#[event(input = "QueryViewRequest")]
|
||||
DeleteView = 204,
|
||||
|
||||
#[event(input = "QueryViewRequest")]
|
||||
DuplicateView = 205,
|
||||
|
||||
#[event()]
|
||||
CopyLink = 206,
|
||||
|
||||
#[event(input = "QueryViewRequest", output = "DocumentDelta")]
|
||||
OpenDocument = 207,
|
||||
|
||||
#[event(input = "QueryViewRequest")]
|
||||
CloseView = 208,
|
||||
|
||||
#[event(output = "RepeatedTrash")]
|
||||
ReadTrash = 300,
|
||||
|
||||
#[event(input = "TrashId")]
|
||||
PutbackTrash = 301,
|
||||
|
||||
#[event(input = "RepeatedTrashId")]
|
||||
DeleteTrash = 302,
|
||||
|
||||
#[event()]
|
||||
RestoreAllTrash = 303,
|
||||
|
||||
#[event()]
|
||||
DeleteAllTrash = 304,
|
||||
|
||||
#[event(input = "DocumentDelta", output = "DocumentDelta")]
|
||||
ApplyDocDelta = 400,
|
||||
|
||||
#[event(input = "ExportRequest", output = "ExportData")]
|
||||
ExportDocument = 500,
|
||||
}
|
||||
|
||||
pub trait FolderCouldServiceV1: Send + Sync {
|
||||
fn init(&self);
|
||||
|
||||
@ -115,5 +195,3 @@ pub trait FolderCouldServiceV1: Send + Sync {
|
||||
|
||||
fn read_trash(&self, token: &str) -> FutureResult<RepeatedTrash, FlowyError>;
|
||||
}
|
||||
|
||||
pub trait FolderCouldServiceV2: Send + Sync {}
|
@ -1,7 +1,5 @@
|
||||
pub use flowy_folder_data_model::entities;
|
||||
|
||||
pub mod event;
|
||||
pub mod module;
|
||||
pub mod event_map;
|
||||
pub mod services;
|
||||
|
||||
#[macro_use]
|
||||
@ -18,7 +16,7 @@ mod util;
|
||||
pub mod prelude {
|
||||
pub use flowy_folder_data_model::entities::{app::*, trash::*, view::*, workspace::*};
|
||||
|
||||
pub use crate::{errors::*, module::*};
|
||||
pub use crate::{errors::*, event_map::*};
|
||||
}
|
||||
|
||||
pub mod errors {
|
||||
|
@ -17,7 +17,7 @@
|
||||
#![allow(trivial_casts)]
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_results)]
|
||||
//! Generated file from `event.proto`
|
||||
//! Generated file from `event_map.proto`
|
||||
|
||||
/// Generated files are compatible only with the same version
|
||||
/// of protobuf runtime.
|
||||
@ -143,11 +143,11 @@ impl ::protobuf::reflect::ProtobufValue for FolderEvent {
|
||||
}
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n\x0bevent.proto*\xd6\x03\n\x0bFolderEvent\x12\x13\n\x0fCreateWorkspace\
|
||||
\x10\0\x12\x14\n\x10ReadCurWorkspace\x10\x01\x12\x12\n\x0eReadWorkspaces\
|
||||
\x10\x02\x12\x13\n\x0fDeleteWorkspace\x10\x03\x12\x11\n\rOpenWorkspace\
|
||||
\x10\x04\x12\x15\n\x11ReadWorkspaceApps\x10\x05\x12\r\n\tCreateApp\x10e\
|
||||
\x12\r\n\tDeleteApp\x10f\x12\x0b\n\x07ReadApp\x10g\x12\r\n\tUpdateApp\
|
||||
\n\x0fevent_map.proto*\xd6\x03\n\x0bFolderEvent\x12\x13\n\x0fCreateWorks\
|
||||
pace\x10\0\x12\x14\n\x10ReadCurWorkspace\x10\x01\x12\x12\n\x0eReadWorksp\
|
||||
aces\x10\x02\x12\x13\n\x0fDeleteWorkspace\x10\x03\x12\x11\n\rOpenWorkspa\
|
||||
ce\x10\x04\x12\x15\n\x11ReadWorkspaceApps\x10\x05\x12\r\n\tCreateApp\x10\
|
||||
e\x12\r\n\tDeleteApp\x10f\x12\x0b\n\x07ReadApp\x10g\x12\r\n\tUpdateApp\
|
||||
\x10h\x12\x0f\n\nCreateView\x10\xc9\x01\x12\r\n\x08ReadView\x10\xca\x01\
|
||||
\x12\x0f\n\nUpdateView\x10\xcb\x01\x12\x0f\n\nDeleteView\x10\xcc\x01\x12\
|
||||
\x12\n\rDuplicateView\x10\xcd\x01\x12\r\n\x08CopyLink\x10\xce\x01\x12\
|
||||
@ -156,59 +156,59 @@ static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\x10\n\x0bDeleteTrash\x10\xae\x02\x12\x14\n\x0fRestoreAllTrash\x10\xaf\
|
||||
\x02\x12\x13\n\x0eDeleteAllTrash\x10\xb0\x02\x12\x12\n\rApplyDocDelta\
|
||||
\x10\x90\x03\x12\x13\n\x0eExportDocument\x10\xf4\x03J\xab\x08\n\x06\x12\
|
||||
\x04\0\0\x1c\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x05\0\x12\x04\
|
||||
\x02\0\x1c\x01\n\n\n\x03\x05\0\x01\x12\x03\x02\x05\x10\n\x0b\n\x04\x05\0\
|
||||
\x02\0\x12\x03\x03\x04\x18\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x03\x04\
|
||||
\x13\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x03\x16\x17\n\x0b\n\x04\x05\0\
|
||||
\x02\x01\x12\x03\x04\x04\x19\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x04\
|
||||
\x04\x14\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\x04\x17\x18\n\x0b\n\x04\
|
||||
\x05\0\x02\x02\x12\x03\x05\x04\x17\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\
|
||||
\x05\x04\x12\n\x0c\n\x05\x05\0\x02\x02\x02\x12\x03\x05\x15\x16\n\x0b\n\
|
||||
\x04\x05\0\x02\x03\x12\x03\x06\x04\x18\n\x0c\n\x05\x05\0\x02\x03\x01\x12\
|
||||
\x03\x06\x04\x13\n\x0c\n\x05\x05\0\x02\x03\x02\x12\x03\x06\x16\x17\n\x0b\
|
||||
\n\x04\x05\0\x02\x04\x12\x03\x07\x04\x16\n\x0c\n\x05\x05\0\x02\x04\x01\
|
||||
\x12\x03\x07\x04\x11\n\x0c\n\x05\x05\0\x02\x04\x02\x12\x03\x07\x14\x15\n\
|
||||
\x0b\n\x04\x05\0\x02\x05\x12\x03\x08\x04\x1a\n\x0c\n\x05\x05\0\x02\x05\
|
||||
\x01\x12\x03\x08\x04\x15\n\x0c\n\x05\x05\0\x02\x05\x02\x12\x03\x08\x18\
|
||||
\x19\n\x0b\n\x04\x05\0\x02\x06\x12\x03\t\x04\x14\n\x0c\n\x05\x05\0\x02\
|
||||
\x06\x01\x12\x03\t\x04\r\n\x0c\n\x05\x05\0\x02\x06\x02\x12\x03\t\x10\x13\
|
||||
\n\x0b\n\x04\x05\0\x02\x07\x12\x03\n\x04\x14\n\x0c\n\x05\x05\0\x02\x07\
|
||||
\x01\x12\x03\n\x04\r\n\x0c\n\x05\x05\0\x02\x07\x02\x12\x03\n\x10\x13\n\
|
||||
\x0b\n\x04\x05\0\x02\x08\x12\x03\x0b\x04\x12\n\x0c\n\x05\x05\0\x02\x08\
|
||||
\x01\x12\x03\x0b\x04\x0b\n\x0c\n\x05\x05\0\x02\x08\x02\x12\x03\x0b\x0e\
|
||||
\x11\n\x0b\n\x04\x05\0\x02\t\x12\x03\x0c\x04\x14\n\x0c\n\x05\x05\0\x02\t\
|
||||
\x01\x12\x03\x0c\x04\r\n\x0c\n\x05\x05\0\x02\t\x02\x12\x03\x0c\x10\x13\n\
|
||||
\x0b\n\x04\x05\0\x02\n\x12\x03\r\x04\x15\n\x0c\n\x05\x05\0\x02\n\x01\x12\
|
||||
\x03\r\x04\x0e\n\x0c\n\x05\x05\0\x02\n\x02\x12\x03\r\x11\x14\n\x0b\n\x04\
|
||||
\x05\0\x02\x0b\x12\x03\x0e\x04\x13\n\x0c\n\x05\x05\0\x02\x0b\x01\x12\x03\
|
||||
\x0e\x04\x0c\n\x0c\n\x05\x05\0\x02\x0b\x02\x12\x03\x0e\x0f\x12\n\x0b\n\
|
||||
\x04\x05\0\x02\x0c\x12\x03\x0f\x04\x15\n\x0c\n\x05\x05\0\x02\x0c\x01\x12\
|
||||
\x03\x0f\x04\x0e\n\x0c\n\x05\x05\0\x02\x0c\x02\x12\x03\x0f\x11\x14\n\x0b\
|
||||
\n\x04\x05\0\x02\r\x12\x03\x10\x04\x15\n\x0c\n\x05\x05\0\x02\r\x01\x12\
|
||||
\x03\x10\x04\x0e\n\x0c\n\x05\x05\0\x02\r\x02\x12\x03\x10\x11\x14\n\x0b\n\
|
||||
\x04\x05\0\x02\x0e\x12\x03\x11\x04\x18\n\x0c\n\x05\x05\0\x02\x0e\x01\x12\
|
||||
\x03\x11\x04\x11\n\x0c\n\x05\x05\0\x02\x0e\x02\x12\x03\x11\x14\x17\n\x0b\
|
||||
\n\x04\x05\0\x02\x0f\x12\x03\x12\x04\x13\n\x0c\n\x05\x05\0\x02\x0f\x01\
|
||||
\x12\x03\x12\x04\x0c\n\x0c\n\x05\x05\0\x02\x0f\x02\x12\x03\x12\x0f\x12\n\
|
||||
\x0b\n\x04\x05\0\x02\x10\x12\x03\x13\x04\x17\n\x0c\n\x05\x05\0\x02\x10\
|
||||
\x01\x12\x03\x13\x04\x10\n\x0c\n\x05\x05\0\x02\x10\x02\x12\x03\x13\x13\
|
||||
\x16\n\x0b\n\x04\x05\0\x02\x11\x12\x03\x14\x04\x14\n\x0c\n\x05\x05\0\x02\
|
||||
\x11\x01\x12\x03\x14\x04\r\n\x0c\n\x05\x05\0\x02\x11\x02\x12\x03\x14\x10\
|
||||
\x13\n\x0b\n\x04\x05\0\x02\x12\x12\x03\x15\x04\x14\n\x0c\n\x05\x05\0\x02\
|
||||
\x12\x01\x12\x03\x15\x04\r\n\x0c\n\x05\x05\0\x02\x12\x02\x12\x03\x15\x10\
|
||||
\x13\n\x0b\n\x04\x05\0\x02\x13\x12\x03\x16\x04\x17\n\x0c\n\x05\x05\0\x02\
|
||||
\x13\x01\x12\x03\x16\x04\x10\n\x0c\n\x05\x05\0\x02\x13\x02\x12\x03\x16\
|
||||
\x13\x16\n\x0b\n\x04\x05\0\x02\x14\x12\x03\x17\x04\x16\n\x0c\n\x05\x05\0\
|
||||
\x02\x14\x01\x12\x03\x17\x04\x0f\n\x0c\n\x05\x05\0\x02\x14\x02\x12\x03\
|
||||
\x17\x12\x15\n\x0b\n\x04\x05\0\x02\x15\x12\x03\x18\x04\x1a\n\x0c\n\x05\
|
||||
\x05\0\x02\x15\x01\x12\x03\x18\x04\x13\n\x0c\n\x05\x05\0\x02\x15\x02\x12\
|
||||
\x03\x18\x16\x19\n\x0b\n\x04\x05\0\x02\x16\x12\x03\x19\x04\x19\n\x0c\n\
|
||||
\x05\x05\0\x02\x16\x01\x12\x03\x19\x04\x12\n\x0c\n\x05\x05\0\x02\x16\x02\
|
||||
\x12\x03\x19\x15\x18\n\x0b\n\x04\x05\0\x02\x17\x12\x03\x1a\x04\x18\n\x0c\
|
||||
\n\x05\x05\0\x02\x17\x01\x12\x03\x1a\x04\x11\n\x0c\n\x05\x05\0\x02\x17\
|
||||
\x02\x12\x03\x1a\x14\x17\n\x0b\n\x04\x05\0\x02\x18\x12\x03\x1b\x04\x19\n\
|
||||
\x0c\n\x05\x05\0\x02\x18\x01\x12\x03\x1b\x04\x12\n\x0c\n\x05\x05\0\x02\
|
||||
\x18\x02\x12\x03\x1b\x15\x18b\x06proto3\
|
||||
\x04\0\0\x1b\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x05\0\x12\x04\
|
||||
\x01\0\x1b\x01\n\n\n\x03\x05\0\x01\x12\x03\x01\x05\x10\n\x0b\n\x04\x05\0\
|
||||
\x02\0\x12\x03\x02\x04\x18\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x02\x04\
|
||||
\x13\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x02\x16\x17\n\x0b\n\x04\x05\0\
|
||||
\x02\x01\x12\x03\x03\x04\x19\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x03\
|
||||
\x04\x14\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\x03\x17\x18\n\x0b\n\x04\
|
||||
\x05\0\x02\x02\x12\x03\x04\x04\x17\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\
|
||||
\x04\x04\x12\n\x0c\n\x05\x05\0\x02\x02\x02\x12\x03\x04\x15\x16\n\x0b\n\
|
||||
\x04\x05\0\x02\x03\x12\x03\x05\x04\x18\n\x0c\n\x05\x05\0\x02\x03\x01\x12\
|
||||
\x03\x05\x04\x13\n\x0c\n\x05\x05\0\x02\x03\x02\x12\x03\x05\x16\x17\n\x0b\
|
||||
\n\x04\x05\0\x02\x04\x12\x03\x06\x04\x16\n\x0c\n\x05\x05\0\x02\x04\x01\
|
||||
\x12\x03\x06\x04\x11\n\x0c\n\x05\x05\0\x02\x04\x02\x12\x03\x06\x14\x15\n\
|
||||
\x0b\n\x04\x05\0\x02\x05\x12\x03\x07\x04\x1a\n\x0c\n\x05\x05\0\x02\x05\
|
||||
\x01\x12\x03\x07\x04\x15\n\x0c\n\x05\x05\0\x02\x05\x02\x12\x03\x07\x18\
|
||||
\x19\n\x0b\n\x04\x05\0\x02\x06\x12\x03\x08\x04\x14\n\x0c\n\x05\x05\0\x02\
|
||||
\x06\x01\x12\x03\x08\x04\r\n\x0c\n\x05\x05\0\x02\x06\x02\x12\x03\x08\x10\
|
||||
\x13\n\x0b\n\x04\x05\0\x02\x07\x12\x03\t\x04\x14\n\x0c\n\x05\x05\0\x02\
|
||||
\x07\x01\x12\x03\t\x04\r\n\x0c\n\x05\x05\0\x02\x07\x02\x12\x03\t\x10\x13\
|
||||
\n\x0b\n\x04\x05\0\x02\x08\x12\x03\n\x04\x12\n\x0c\n\x05\x05\0\x02\x08\
|
||||
\x01\x12\x03\n\x04\x0b\n\x0c\n\x05\x05\0\x02\x08\x02\x12\x03\n\x0e\x11\n\
|
||||
\x0b\n\x04\x05\0\x02\t\x12\x03\x0b\x04\x14\n\x0c\n\x05\x05\0\x02\t\x01\
|
||||
\x12\x03\x0b\x04\r\n\x0c\n\x05\x05\0\x02\t\x02\x12\x03\x0b\x10\x13\n\x0b\
|
||||
\n\x04\x05\0\x02\n\x12\x03\x0c\x04\x15\n\x0c\n\x05\x05\0\x02\n\x01\x12\
|
||||
\x03\x0c\x04\x0e\n\x0c\n\x05\x05\0\x02\n\x02\x12\x03\x0c\x11\x14\n\x0b\n\
|
||||
\x04\x05\0\x02\x0b\x12\x03\r\x04\x13\n\x0c\n\x05\x05\0\x02\x0b\x01\x12\
|
||||
\x03\r\x04\x0c\n\x0c\n\x05\x05\0\x02\x0b\x02\x12\x03\r\x0f\x12\n\x0b\n\
|
||||
\x04\x05\0\x02\x0c\x12\x03\x0e\x04\x15\n\x0c\n\x05\x05\0\x02\x0c\x01\x12\
|
||||
\x03\x0e\x04\x0e\n\x0c\n\x05\x05\0\x02\x0c\x02\x12\x03\x0e\x11\x14\n\x0b\
|
||||
\n\x04\x05\0\x02\r\x12\x03\x0f\x04\x15\n\x0c\n\x05\x05\0\x02\r\x01\x12\
|
||||
\x03\x0f\x04\x0e\n\x0c\n\x05\x05\0\x02\r\x02\x12\x03\x0f\x11\x14\n\x0b\n\
|
||||
\x04\x05\0\x02\x0e\x12\x03\x10\x04\x18\n\x0c\n\x05\x05\0\x02\x0e\x01\x12\
|
||||
\x03\x10\x04\x11\n\x0c\n\x05\x05\0\x02\x0e\x02\x12\x03\x10\x14\x17\n\x0b\
|
||||
\n\x04\x05\0\x02\x0f\x12\x03\x11\x04\x13\n\x0c\n\x05\x05\0\x02\x0f\x01\
|
||||
\x12\x03\x11\x04\x0c\n\x0c\n\x05\x05\0\x02\x0f\x02\x12\x03\x11\x0f\x12\n\
|
||||
\x0b\n\x04\x05\0\x02\x10\x12\x03\x12\x04\x17\n\x0c\n\x05\x05\0\x02\x10\
|
||||
\x01\x12\x03\x12\x04\x10\n\x0c\n\x05\x05\0\x02\x10\x02\x12\x03\x12\x13\
|
||||
\x16\n\x0b\n\x04\x05\0\x02\x11\x12\x03\x13\x04\x14\n\x0c\n\x05\x05\0\x02\
|
||||
\x11\x01\x12\x03\x13\x04\r\n\x0c\n\x05\x05\0\x02\x11\x02\x12\x03\x13\x10\
|
||||
\x13\n\x0b\n\x04\x05\0\x02\x12\x12\x03\x14\x04\x14\n\x0c\n\x05\x05\0\x02\
|
||||
\x12\x01\x12\x03\x14\x04\r\n\x0c\n\x05\x05\0\x02\x12\x02\x12\x03\x14\x10\
|
||||
\x13\n\x0b\n\x04\x05\0\x02\x13\x12\x03\x15\x04\x17\n\x0c\n\x05\x05\0\x02\
|
||||
\x13\x01\x12\x03\x15\x04\x10\n\x0c\n\x05\x05\0\x02\x13\x02\x12\x03\x15\
|
||||
\x13\x16\n\x0b\n\x04\x05\0\x02\x14\x12\x03\x16\x04\x16\n\x0c\n\x05\x05\0\
|
||||
\x02\x14\x01\x12\x03\x16\x04\x0f\n\x0c\n\x05\x05\0\x02\x14\x02\x12\x03\
|
||||
\x16\x12\x15\n\x0b\n\x04\x05\0\x02\x15\x12\x03\x17\x04\x1a\n\x0c\n\x05\
|
||||
\x05\0\x02\x15\x01\x12\x03\x17\x04\x13\n\x0c\n\x05\x05\0\x02\x15\x02\x12\
|
||||
\x03\x17\x16\x19\n\x0b\n\x04\x05\0\x02\x16\x12\x03\x18\x04\x19\n\x0c\n\
|
||||
\x05\x05\0\x02\x16\x01\x12\x03\x18\x04\x12\n\x0c\n\x05\x05\0\x02\x16\x02\
|
||||
\x12\x03\x18\x15\x18\n\x0b\n\x04\x05\0\x02\x17\x12\x03\x19\x04\x18\n\x0c\
|
||||
\n\x05\x05\0\x02\x17\x01\x12\x03\x19\x04\x11\n\x0c\n\x05\x05\0\x02\x17\
|
||||
\x02\x12\x03\x19\x14\x17\n\x0b\n\x04\x05\0\x02\x18\x12\x03\x1a\x04\x19\n\
|
||||
\x0c\n\x05\x05\0\x02\x18\x01\x12\x03\x1a\x04\x12\n\x0c\n\x05\x05\0\x02\
|
||||
\x18\x02\x12\x03\x1a\x15\x18b\x06proto3\
|
||||
";
|
||||
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
|
@ -4,5 +4,5 @@
|
||||
mod dart_notification;
|
||||
pub use dart_notification::*;
|
||||
|
||||
mod event;
|
||||
pub use event::*;
|
||||
mod event_map;
|
||||
pub use event_map::*;
|
||||
|
@ -1,5 +1,4 @@
|
||||
syntax = "proto3";
|
||||
|
||||
enum FolderEvent {
|
||||
CreateWorkspace = 0;
|
||||
ReadCurWorkspace = 1;
|
@ -5,7 +5,7 @@ use crate::{
|
||||
trash::TrashType,
|
||||
},
|
||||
errors::*,
|
||||
module::{FolderCouldServiceV1, WorkspaceUser},
|
||||
event_map::{FolderCouldServiceV1, WorkspaceUser},
|
||||
services::{
|
||||
persistence::{AppChangeset, FolderPersistence, FolderPersistenceTransaction},
|
||||
TrashController, TrashEvent,
|
||||
|
@ -112,7 +112,6 @@ impl RevisionObjectBuilder for FolderPadBuilder {
|
||||
struct FolderRevisionCloudServiceImpl {
|
||||
#[allow(dead_code)]
|
||||
token: String,
|
||||
// server: Arc<dyn FolderCouldServiceV2>,
|
||||
}
|
||||
|
||||
impl RevisionCloudService for FolderRevisionCloudServiceImpl {
|
||||
|
@ -1,5 +1,5 @@
|
||||
use crate::{
|
||||
module::WorkspaceDatabase,
|
||||
event_map::WorkspaceDatabase,
|
||||
services::persistence::{AppTableSql, TrashTableSql, ViewTableSql, WorkspaceTableSql},
|
||||
};
|
||||
use flowy_collaboration::{client_folder::FolderPad, entities::revision::md5};
|
||||
|
@ -12,7 +12,7 @@ pub use version_1::{app_sql::*, trash_sql::*, v1_impl::V1Transaction, view_sql::
|
||||
|
||||
use crate::{
|
||||
controller::FolderId,
|
||||
module::WorkspaceDatabase,
|
||||
event_map::WorkspaceDatabase,
|
||||
services::{folder_editor::FolderEditor, persistence::migration::FolderMigration},
|
||||
};
|
||||
use flowy_error::{FlowyError, FlowyResult};
|
||||
|
@ -2,7 +2,7 @@ use crate::{
|
||||
dart_notification::{send_anonymous_dart_notification, FolderNotification},
|
||||
entities::trash::{RepeatedTrash, RepeatedTrashId, Trash, TrashId, TrashType},
|
||||
errors::{FlowyError, FlowyResult},
|
||||
module::{FolderCouldServiceV1, WorkspaceUser},
|
||||
event_map::{FolderCouldServiceV1, WorkspaceUser},
|
||||
services::persistence::{FolderPersistence, FolderPersistenceTransaction},
|
||||
};
|
||||
|
||||
|
@ -15,7 +15,7 @@ use crate::{
|
||||
view::{CreateViewParams, RepeatedView, UpdateViewParams, View, ViewId},
|
||||
},
|
||||
errors::{FlowyError, FlowyResult},
|
||||
module::{FolderCouldServiceV1, WorkspaceUser},
|
||||
event_map::{FolderCouldServiceV1, WorkspaceUser},
|
||||
services::{
|
||||
persistence::{FolderPersistence, FolderPersistenceTransaction, ViewChangeset},
|
||||
TrashController, TrashEvent,
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::{
|
||||
dart_notification::*,
|
||||
errors::*,
|
||||
module::{FolderCouldServiceV1, WorkspaceUser},
|
||||
event_map::{FolderCouldServiceV1, WorkspaceUser},
|
||||
services::{
|
||||
persistence::{FolderPersistence, FolderPersistenceTransaction, WorkspaceChangeset},
|
||||
read_local_workspace_apps, TrashController,
|
||||
|
@ -1,5 +1,5 @@
|
||||
#![allow(clippy::type_complexity)]
|
||||
use crate::module::{FolderCouldServiceV1, WorkspaceUser};
|
||||
use crate::event_map::{FolderCouldServiceV1, WorkspaceUser};
|
||||
use lib_infra::retry::Action;
|
||||
use pin_project::pin_project;
|
||||
use std::{
|
||||
|
@ -84,7 +84,7 @@ async fn workspace_create_with_invalid_name() {
|
||||
};
|
||||
assert_eq!(
|
||||
FolderEventBuilder::new(sdk)
|
||||
.event(flowy_folder::event::FolderEvent::CreateWorkspace)
|
||||
.event(flowy_folder::event_map::FolderEvent::CreateWorkspace)
|
||||
.request(request)
|
||||
.async_send()
|
||||
.await
|
||||
|
@ -1,5 +1,5 @@
|
||||
use flowy_collaboration::entities::document_info::DocumentInfo;
|
||||
use flowy_folder::event::FolderEvent::*;
|
||||
use flowy_folder::event_map::FolderEvent::*;
|
||||
use flowy_folder_data_model::entities::{
|
||||
app::{App, AppId, CreateAppRequest, QueryAppRequest, UpdateAppRequest},
|
||||
trash::{RepeatedTrash, TrashId, TrashType},
|
||||
|
@ -12,7 +12,7 @@ use flowy_folder_data_model::entities::{
|
||||
workspace::{CreateWorkspaceParams, RepeatedWorkspace, UpdateWorkspaceParams, Workspace, WorkspaceId},
|
||||
};
|
||||
|
||||
use flowy_folder::module::{FolderCouldServiceV1, FolderCouldServiceV2};
|
||||
use flowy_folder::event_map::FolderCouldServiceV1;
|
||||
use lazy_static::lazy_static;
|
||||
use lib_infra::future::FutureResult;
|
||||
use std::sync::Arc;
|
||||
@ -28,8 +28,6 @@ impl CoreHttpCloudService {
|
||||
}
|
||||
}
|
||||
|
||||
impl FolderCouldServiceV2 for CoreHttpCloudService {}
|
||||
|
||||
impl FolderCouldServiceV1 for CoreHttpCloudService {
|
||||
fn init(&self) {}
|
||||
|
||||
|
@ -14,7 +14,7 @@ use flowy_collaboration::{
|
||||
synchronizer::{RevisionSyncResponse, RevisionUser},
|
||||
};
|
||||
use flowy_error::{internal_error, FlowyError};
|
||||
use flowy_folder::module::{FolderCouldServiceV1, FolderCouldServiceV2};
|
||||
use flowy_folder::event_map::FolderCouldServiceV1;
|
||||
use futures_util::stream::StreamExt;
|
||||
use lib_ws::{WSChannel, WebSocketRawMessage};
|
||||
use parking_lot::RwLock;
|
||||
@ -261,8 +261,6 @@ use flowy_user_data_model::entities::{
|
||||
};
|
||||
use lib_infra::{future::FutureResult, timestamp, uuid_string};
|
||||
|
||||
impl FolderCouldServiceV2 for LocalServer {}
|
||||
|
||||
impl FolderCouldServiceV1 for LocalServer {
|
||||
fn init(&self) {}
|
||||
|
||||
|
@ -6,7 +6,7 @@ use flowy_document::FlowyDocumentManager;
|
||||
use flowy_folder::{
|
||||
controller::FolderManager,
|
||||
errors::{internal_error, FlowyError},
|
||||
module::{FolderCouldServiceV1, WorkspaceDatabase, WorkspaceUser},
|
||||
event_map::{FolderCouldServiceV1, WorkspaceDatabase, WorkspaceUser},
|
||||
};
|
||||
use flowy_net::{
|
||||
http_server::core::CoreHttpCloudService, local_server::LocalServer, ws::connection::FlowyWebSocketConnect,
|
||||
|
@ -20,7 +20,7 @@ fn mk_user_module(user_session: Arc<UserSession>) -> Module {
|
||||
}
|
||||
|
||||
fn mk_folder_module(core: Arc<FolderManager>) -> Module {
|
||||
flowy_folder::module::create(core)
|
||||
flowy_folder::event_map::create(core)
|
||||
}
|
||||
|
||||
fn mk_network_module(ws_conn: Arc<FlowyWebSocketConnect>) -> Module {
|
||||
|
@ -5,7 +5,7 @@ use flowy_folder::{
|
||||
view::*,
|
||||
workspace::{CreateWorkspaceRequest, QueryWorkspaceRequest, Workspace},
|
||||
},
|
||||
event::FolderEvent::{CreateWorkspace, OpenWorkspace, *},
|
||||
event_map::FolderEvent::{CreateWorkspace, OpenWorkspace, *},
|
||||
};
|
||||
use flowy_user::{
|
||||
entities::{SignInRequest, SignUpRequest, UserProfile},
|
||||
|
Loading…
Reference in New Issue
Block a user