init serv file

This commit is contained in:
2025-08-13 22:07:41 +08:00
parent 3747a2c65e
commit e0492e1d74
33 changed files with 4108 additions and 168 deletions

View File

@@ -3,20 +3,20 @@ name = "gotify-ws"
version = "0.1.0"
edition = "2024"
[lib]
name = "gotify_ws"
path = "src/lib.rs"
[dependencies]
#diesel = { version = "2.2.12", features = ["r2d2", "serde_json", "sqlite"] }
env_logger = "0.11.8"
futures = "0.3.31"
log = "0.4.27"
#r2d2 = "0.8.10"
#r2d2_sqlite = "0.31.0"
#libsqlite3-sys = { version = "0.35.0", features = ["bundled"] }
env_logger.workspace = true
futures.workspace = true
log.workspace = true
# 或如果是通过 rusqlite 依赖:
rusqlite = { version = "0.32.1", features = ["bundled"] }
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.142"
tokio = { version = "1.47.1", features = ["full"] }
rusqlite.workspace = true
serde.workspace = true
serde_json.workspace = true
tokio.workspace = true
tokio-tungstenite = { version = "0.27.0", features = ["native-tls"] }
regex = "1.11.1"
sea-orm = { version = "1.1.14", features = ["sqlx-sqlite", "runtime-tokio-rustls", "macros"] }
chrono = "0.4.41"
regex.workspace = true
sea-orm.workspace = true
chrono.workspace = true

View File

@@ -0,0 +1,2 @@
pub mod model;
pub mod utils;

View File

@@ -1,6 +1,6 @@
mod model;
mod tests;
mod utils;
pub mod utils;
use crate::model::ssh_connection::{ActiveModel, SSHConnection};
use crate::utils::sql::sqlite;
@@ -12,7 +12,7 @@ use tokio_tungstenite::tungstenite::client::IntoClientRequest;
use utils::logger;
#[tokio::main]
async fn main() {
pub async fn main() {
logger::init_logger();
let addr = "wss://home.hzer.xyz/gotify/stream?token=CDIwYlYJuxWxVr5"
.into_client_request()