refactor: rename to gpcommon

This commit is contained in:
Kevin Yue 2023-05-24 10:07:42 +08:00
parent ec0bff1e36
commit f42f0d248e
28 changed files with 30 additions and 30 deletions

40
Cargo.lock generated
View File

@ -51,8 +51,8 @@ checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800"
name = "app"
version = "0.1.0"
dependencies = [
"common",
"env_logger",
"gpcommon",
"log",
"serde",
"serde_json",
@ -357,23 +357,6 @@ dependencies = [
"memchr",
]
[[package]]
name = "common"
version = "0.1.0"
dependencies = [
"async-trait",
"bytes",
"cc",
"data-encoding",
"log",
"ring",
"serde",
"serde_json",
"thiserror",
"tokio",
"tokio-util",
]
[[package]]
name = "convert_case"
version = "0.4.0"
@ -1101,16 +1084,33 @@ dependencies = [
name = "gpclient"
version = "0.1.0"
dependencies = [
"common",
"gpcommon",
"tokio",
]
[[package]]
name = "gpcommon"
version = "0.1.0"
dependencies = [
"async-trait",
"bytes",
"cc",
"data-encoding",
"log",
"ring",
"serde",
"serde_json",
"thiserror",
"tokio",
"tokio-util",
]
[[package]]
name = "gpservice"
version = "0.1.0"
dependencies = [
"common",
"env_logger",
"gpcommon",
"log",
"tokio",
]

View File

@ -1,7 +1,7 @@
[workspace]
members = [
"common",
"gpcommon",
"gpclient",
"gpservice",
"gpauth",

View File

@ -6,5 +6,5 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
common = { path = "../common" }
gpcommon = { path = "../gpcommon" }
tokio = { version = "1.0", features = ["full"] }

View File

@ -1,4 +1,4 @@
use common::{Client, SOCKET_PATH};
use gpcommon::{Client, SOCKET_PATH};
use tokio::{io::AsyncReadExt, net::UnixStream, sync::mpsc};
#[tokio::main]

View File

@ -1,5 +1,5 @@
[package]
name = "common"
name = "gpcommon"
version = "0.1.0"
edition = "2021"

View File

@ -21,7 +21,7 @@ serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
log = "0.4"
env_logger = "0.10"
common = { path = "../../common" }
gpcommon = { path = "../../gpcommon" }
[features]
# by default Tauri runs in production mode

View File

@ -3,7 +3,7 @@
windows_subsystem = "windows"
)]
use common::{Client, ServerApiError, VpnStatus};
use gpcommon::{Client, ServerApiError, VpnStatus};
use env_logger::Env;
use serde::Serialize;
use std::sync::Arc;

View File

@ -6,7 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
common = { path = "../common" }
gpcommon = { path = "../gpcommon" }
tokio = { version = "1", features = ["full"] }
env_logger = "0.10"
log = "0.4"
@ -15,4 +15,4 @@ log = "0.4"
# procfs = "0.15"
[build-dependencies]
common = { path = "../common" }
gpcommon = { path = "../gpcommon" }

View File

@ -1,4 +1,4 @@
use common::sha256_digest;
use gpcommon::sha256_digest;
use std::path::Path;
use std::{env, fs};

View File

@ -1,7 +1,7 @@
include!(concat!(env!("OUT_DIR"), "/client_hash.rs"));
// use aes_gcm::{aead::OsRng, Aes256Gcm, KeyInit};
use common::{server, SOCKET_PATH};
use gpcommon::{server, SOCKET_PATH};
use env_logger::Env;
use log::error;
use tokio::signal;