2022-01-22 18:48:43 +08:00
|
|
|
pub mod controller;
|
2022-01-04 15:05:52 +08:00
|
|
|
pub mod core;
|
2022-01-14 20:52:03 +08:00
|
|
|
pub use controller::*;
|
2021-12-14 18:04:51 +08:00
|
|
|
pub mod errors {
|
|
|
|
pub use flowy_error::{internal_error, ErrorCode, FlowyError};
|
|
|
|
}
|
2022-01-10 23:45:59 +08:00
|
|
|
|
|
|
|
use crate::errors::FlowyError;
|
2022-01-21 21:41:24 +08:00
|
|
|
use flowy_collaboration::entities::document_info::{CreateDocParams, DocumentId, DocumentInfo, ResetDocumentParams};
|
2022-01-10 23:45:59 +08:00
|
|
|
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>;
|
|
|
|
}
|