2022-10-22 13:57:44 +00:00
|
|
|
pub mod entities;
|
2022-10-13 15:29:37 +00:00
|
|
|
mod event_handler;
|
|
|
|
pub mod event_map;
|
|
|
|
pub mod manager;
|
|
|
|
|
2022-10-20 03:35:11 +00:00
|
|
|
pub mod editor;
|
|
|
|
pub mod old_editor;
|
2022-10-13 15:29:37 +00:00
|
|
|
pub mod protobuf;
|
2022-10-22 13:57:44 +00:00
|
|
|
mod services;
|
2022-10-20 03:35:11 +00:00
|
|
|
|
2022-10-13 15:29:37 +00:00
|
|
|
pub use manager::*;
|
|
|
|
pub mod errors {
|
|
|
|
pub use flowy_error::{internal_error, ErrorCode, FlowyError};
|
|
|
|
}
|
|
|
|
|
|
|
|
pub const TEXT_BLOCK_SYNC_INTERVAL_IN_MILLIS: u64 = 1000;
|
|
|
|
|
|
|
|
use crate::errors::FlowyError;
|
2022-11-08 13:13:28 +00:00
|
|
|
use flowy_http_model::document::{CreateDocumentParams, DocumentIdPB, DocumentPayloadPB, ResetDocumentParams};
|
2022-10-13 15:29:37 +00:00
|
|
|
use lib_infra::future::FutureResult;
|
|
|
|
|
|
|
|
pub trait DocumentCloudService: Send + Sync {
|
|
|
|
fn create_document(&self, token: &str, params: CreateDocumentParams) -> FutureResult<(), FlowyError>;
|
|
|
|
|
|
|
|
fn fetch_document(&self, token: &str, params: DocumentIdPB) -> FutureResult<Option<DocumentPayloadPB>, FlowyError>;
|
|
|
|
|
|
|
|
fn update_document_content(&self, token: &str, params: ResetDocumentParams) -> FutureResult<(), FlowyError>;
|
|
|
|
}
|