feat: add basic tauri client app
This commit is contained in:
9
client-app/src-tauri/types/Cargo.toml
Normal file
9
client-app/src-tauri/types/Cargo.toml
Normal 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"
|
||||
20
client-app/src-tauri/types/src/blob.rs
Normal file
20
client-app/src-tauri/types/src/blob.rs
Normal 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),
|
||||
}
|
||||
8
client-app/src-tauri/types/src/document.rs
Normal file
8
client-app/src-tauri/types/src/document.rs
Normal 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,
|
||||
}
|
||||
7
client-app/src-tauri/types/src/lib.rs
Normal file
7
client-app/src-tauri/types/src/lib.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
#[allow(unused_imports)]
|
||||
extern crate serde;
|
||||
extern crate schemars;
|
||||
|
||||
pub mod blob;
|
||||
pub mod document;
|
||||
pub mod workspace;
|
||||
9
client-app/src-tauri/types/src/workspace.rs
Normal file
9
client-app/src-tauri/types/src/workspace.rs
Normal 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,
|
||||
}
|
||||
Reference in New Issue
Block a user