init serv file
This commit is contained in:
@@ -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
|
||||
2
packages/gotify-ws/src/lib.rs
Normal file
2
packages/gotify-ws/src/lib.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
pub mod model;
|
||||
pub mod utils;
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user