feat: add basic tauri client app

This commit is contained in:
Lin Onetwo
2023-01-04 17:16:26 +08:00
parent 87451a19bb
commit 64ca6a6b35
57 changed files with 12747 additions and 54 deletions

View File

@@ -0,0 +1,9 @@
[package]
name = "ipc_types"
version = "0.1.0"
[dependencies]
project-root = "0.2.2"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
schemars = "0.8.3"

View File

@@ -0,0 +1,20 @@
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)]
pub struct PutBlob {
pub workspace_id: u64,
pub blob: Vec<u8>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)]
pub struct GetBlob {
pub workspace_id: u64,
pub id: String,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)]
pub enum IBlobParameters {
Put(PutBlob),
Get(GetBlob),
}

View File

@@ -0,0 +1,8 @@
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)]
pub struct YDocumentUpdate<'a> {
update: Vec<u8>,
room: &'a str,
}

View File

@@ -0,0 +1,7 @@
#[allow(unused_imports)]
extern crate serde;
extern crate schemars;
pub mod blob;
pub mod document;
pub mod workspace;

View File

@@ -0,0 +1,9 @@
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)]
pub struct CreateWorkspace {
pub id: i64,
pub name: String,
pub avatar: String,
}