From f2a3ad40da8a2de492f011f41b09709d3323bcff Mon Sep 17 00:00:00 2001 From: OMGeeky Date: Thu, 2 May 2024 23:13:46 +0200 Subject: [PATCH] add notifier common data --- Cargo.lock | 3 ++- Cargo.toml | 3 ++- src/lib.rs | 9 +++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 404d36a..1cf0637 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2583,8 +2583,9 @@ dependencies = [ [[package]] name = "twba-common" -version = "0.2.2" +version = "0.2.3" dependencies = [ + "serde", "tracing", "tracing-appender", "tracing-subscriber", diff --git a/Cargo.toml b/Cargo.toml index e06c866..7201df0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "twba-common" -version = "0.2.2" +version = "0.2.3" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -13,3 +13,4 @@ tracing-appender = "0.2" twba-backup-config = { version = "0.1", git = "https://github.com/OMGeeky/backup_config.git" } twba-local-db = { version = "0.2", git = "https://github.com/OMGeeky/twitch_backup.local_db.git" } +serde = { version = "1.0.199", features = ["derive"] } diff --git a/src/lib.rs b/src/lib.rs index 88ef40e..4f2f10b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -54,3 +54,12 @@ pub fn file_tracer( let file = file.with_max_level(level); (guard, file) } + +pub mod notify { + use serde::{Deserialize, Serialize}; + + #[derive(Clone, Debug, Deserialize, Serialize)] + pub struct NotificationRequest { + message: String, + } +}