treedx 0.2.18

Generic Rust SDK for TreeDX.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::error::TreeDxResult;
use async_trait::async_trait;
use serde_json::Value;

#[async_trait]
pub trait FilePort: Send + Sync {
    async fn tree(&self, workspace_id: &str) -> TreeDxResult<Value>;
    async fn read(&self, workspace_id: &str) -> TreeDxResult<Value>;
    async fn write(&self, workspace_id: &str, body: Value) -> TreeDxResult<Value>;
    async fn patch(&self, workspace_id: &str, body: Value) -> TreeDxResult<Value>;
    async fn delete(&self, workspace_id: &str) -> TreeDxResult<Value>;
    async fn search(&self, workspace_id: &str, body: Value) -> TreeDxResult<Value>;
    async fn status(&self, workspace_id: &str) -> TreeDxResult<Value>;
    async fn diff(&self, workspace_id: &str) -> TreeDxResult<Value>;
    async fn commit(&self, workspace_id: &str, body: Value) -> TreeDxResult<Value>;
}