mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
28 lines
841 B
Rust
28 lines
841 B
Rust
pub mod editor;
|
|
mod entities;
|
|
mod event_handler;
|
|
pub mod event_map;
|
|
pub mod manager;
|
|
mod queue;
|
|
mod web_socket;
|
|
|
|
pub mod protobuf;
|
|
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;
|
|
use flowy_sync::entities::text_block::{CreateTextBlockParams, DocumentPB, ResetTextBlockParams, TextBlockIdPB};
|
|
use lib_infra::future::FutureResult;
|
|
|
|
pub trait BlockCloudService: Send + Sync {
|
|
fn create_block(&self, token: &str, params: CreateTextBlockParams) -> FutureResult<(), FlowyError>;
|
|
|
|
fn read_block(&self, token: &str, params: TextBlockIdPB) -> FutureResult<Option<DocumentPB>, FlowyError>;
|
|
|
|
fn update_block(&self, token: &str, params: ResetTextBlockParams) -> FutureResult<(), FlowyError>;
|
|
}
|