43 lines
908 B
Rust
Raw Normal View History

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