2021-12-25 13:44:45 +00:00
|
|
|
pub mod context;
|
2022-01-14 12:52:03 +00:00
|
|
|
mod controller;
|
2022-01-04 07:05:52 +00:00
|
|
|
pub mod core;
|
2022-01-13 03:16:26 +00:00
|
|
|
// mod notify;
|
2021-09-10 07:53:24 +00:00
|
|
|
pub mod protobuf;
|
2022-01-14 12:52:03 +00:00
|
|
|
pub use controller::*;
|
2021-12-14 10:04:51 +00:00
|
|
|
pub mod errors {
|
|
|
|
pub use flowy_error::{internal_error, ErrorCode, FlowyError};
|
|
|
|
}
|
2022-01-10 15:45:59 +00:00
|
|
|
|
|
|
|
use crate::errors::FlowyError;
|
|
|
|
use flowy_collaboration::entities::doc::{CreateDocParams, DocumentId, DocumentInfo, ResetDocumentParams};
|
|
|
|
use lib_infra::future::FutureResult;
|
|
|
|
|
|
|
|
pub trait DocumentCloudService: Send + Sync {
|
|
|
|
fn create_document(&self, token: &str, params: CreateDocParams) -> FutureResult<(), FlowyError>;
|
|
|
|
|
|
|
|
fn read_document(&self, token: &str, params: DocumentId) -> FutureResult<Option<DocumentInfo>, FlowyError>;
|
|
|
|
|
|
|
|
fn update_document(&self, token: &str, params: ResetDocumentParams) -> FutureResult<(), FlowyError>;
|
|
|
|
}
|