Compare commits

...
2 Commits
Author SHA1 Message Date
phoenix 597af4e84c Change name (#35)
Release Tagging / release (push) Successful in 32s
Rust Build / Rustfmt (push) Successful in 35s
Rust Build / Test Suite (push) Successful in 1m27s
Rust Build / Clippy (push) Successful in 1m12s
Rust Build / build (push) Successful in 55s
Rust Build / Check (push) Successful in 2m37s
Reviewed-on: #35
2026-07-13 11:28:29 -04:00
phoenix 02061bf7a3 Update rust (#34)
Rust Build / Check (push) Successful in 1m21s
Rust Build / build (push) Successful in 2m4s
Rust Build / Clippy (push) Successful in 2m8s
Release Tagging / release (push) Successful in 41s
Rust Build / Rustfmt (push) Successful in 37s
Rust Build / Test Suite (push) Successful in 1m41s
Reviewed-on: phoenix/textsender_models#34
2026-07-10 11:30:31 -04:00
9 changed files with 67 additions and 65 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
name: textsender_models PR name: schedtxt_models PR
on: on:
pull_request: pull_request:
@@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
toolchain: 1.96.1 toolchain: 1.97
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- run: cargo check - run: cargo check
@@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
toolchain: 1.96.1 toolchain: 1.97
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- run: rustup component add rustfmt - run: rustup component add rustfmt
- run: cargo fmt --all -- --check - run: cargo fmt --all -- --check
@@ -40,7 +40,7 @@ jobs:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
toolchain: 1.96.1 toolchain: 1.97
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- run: rustup component add clippy - run: rustup component add clippy
- run: cargo clippy -- -D warnings - run: cargo clippy -- -D warnings
+1 -1
View File
@@ -20,7 +20,7 @@ jobs:
- name: Install Rust - name: Install Rust
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:
toolchain: 1.96.1 toolchain: 1.97
components: cargo components: cargo
- name: Extract Version from Cargo.toml - name: Extract Version from Cargo.toml
+5 -5
View File
@@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
toolchain: 1.96.1 toolchain: 1.97
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- run: cargo check - run: cargo check
@@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
toolchain: 1.96.1 toolchain: 1.97
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- run: cargo test - run: cargo test
@@ -39,7 +39,7 @@ jobs:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
toolchain: 1.96.1 toolchain: 1.97
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- run: rustup component add rustfmt - run: rustup component add rustfmt
- run: cargo fmt --all -- --check - run: cargo fmt --all -- --check
@@ -51,7 +51,7 @@ jobs:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
toolchain: 1.96.1 toolchain: 1.97
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- run: rustup component add clippy - run: rustup component add clippy
- run: cargo clippy -- -D warnings - run: cargo clippy -- -D warnings
@@ -63,6 +63,6 @@ jobs:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: actions-rust-lang/setup-rust-toolchain@v1
with: with:
toolchain: 1.96.1 toolchain: 1.97
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- run: cargo build - run: cargo build
Generated
+37 -37
View File
@@ -91,15 +91,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]] [[package]]
name = "bytes" name = "bytes"
version = "1.12.0" version = "1.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ae3f5d315924270530207e2a68396c3cc547f6dca3fbdca317cfb1a51edb593" checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
[[package]] [[package]]
name = "cc" name = "cc"
version = "1.2.66" version = "1.2.67"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f5d6cac793997bd970000024b2934968efe83b382de4fdcf4fcb46b6ee4ad996" checksum = "e17dd265a7d0f31ef544e1b20e03add05d3b45b491b633b10d67145d2acc1a38"
dependencies = [ dependencies = [
"find-msvc-tools", "find-msvc-tools",
"shlex", "shlex",
@@ -218,18 +218,18 @@ dependencies = [
[[package]] [[package]]
name = "crossbeam-queue" name = "crossbeam-queue"
version = "0.3.12" version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" checksum = "803d13fb3b09d88be9f4dbc29062c66b19bf7170867ceb746d2a8689bf6c7a26"
dependencies = [ dependencies = [
"crossbeam-utils", "crossbeam-utils",
] ]
[[package]] [[package]]
name = "crossbeam-utils" name = "crossbeam-utils"
version = "0.8.21" version = "0.8.22"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17"
[[package]] [[package]]
name = "crypto-common" name = "crypto-common"
@@ -792,9 +792,9 @@ dependencies = [
[[package]] [[package]]
name = "memchr" name = "memchr"
version = "2.8.2" version = "2.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4" checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
[[package]] [[package]]
name = "miniz_oxide" name = "miniz_oxide"
@@ -1012,9 +1012,9 @@ dependencies = [
[[package]] [[package]]
name = "regex" name = "regex"
version = "1.12.4" version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1292b7759ae1cb9ec195452d1390a074f0cd8541ab7a5a8c31cd6db45d4a6ba" checksum = "2a0e75113e14dc5acb068cd0786884f214f1312650a3d36d269f5c4f3cdee8a2"
dependencies = [ dependencies = [
"aho-corasick", "aho-corasick",
"memchr", "memchr",
@@ -1024,9 +1024,9 @@ dependencies = [
[[package]] [[package]]
name = "regex-automata" name = "regex-automata"
version = "0.4.14" version = "0.4.15"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" checksum = "1f388202e4b80542a0921078cc23b6333bcf1409c1e3f86404cae4766a6131db"
dependencies = [ dependencies = [
"aho-corasick", "aho-corasick",
"memchr", "memchr",
@@ -1054,9 +1054,9 @@ dependencies = [
[[package]] [[package]]
name = "rustversion" name = "rustversion"
version = "1.0.22" version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
[[package]] [[package]]
name = "schannel" name = "schannel"
@@ -1067,6 +1067,21 @@ dependencies = [
"windows-sys", "windows-sys",
] ]
[[package]]
name = "schedtxt_models"
version = "0.5.3"
dependencies = [
"const_format",
"dotenvy",
"josekit",
"serde",
"serde_json",
"sqlx",
"time",
"utoipa",
"uuid",
]
[[package]] [[package]]
name = "scopeguard" name = "scopeguard"
version = "1.2.0" version = "1.2.0"
@@ -1451,21 +1466,6 @@ dependencies = [
"windows-sys", "windows-sys",
] ]
[[package]]
name = "textsender_models"
version = "0.5.1"
dependencies = [
"const_format",
"dotenvy",
"josekit",
"serde",
"serde_json",
"sqlx",
"time",
"utoipa",
"uuid",
]
[[package]] [[package]]
name = "thiserror" name = "thiserror"
version = "2.0.18" version = "2.0.18"
@@ -1528,9 +1528,9 @@ dependencies = [
[[package]] [[package]]
name = "tinyvec" name = "tinyvec"
version = "1.11.0" version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f"
dependencies = [ dependencies = [
"tinyvec_macros", "tinyvec_macros",
] ]
@@ -1681,9 +1681,9 @@ dependencies = [
[[package]] [[package]]
name = "uuid" name = "uuid"
version = "1.23.4" version = "1.23.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf80a72845275afea99e7f2b434723d3bc7e38470fcd1c7ed39a599c73319a53" checksum = "ea5fab0d6c3c01ae70085a09cb03d4c7a1d6314e2b3e075392783396d724ca0a"
dependencies = [ dependencies = [
"getrandom", "getrandom",
"js-sys", "js-sys",
@@ -1860,6 +1860,6 @@ dependencies = [
[[package]] [[package]]
name = "zmij" name = "zmij"
version = "1.0.21" version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
+6 -6
View File
@@ -1,16 +1,16 @@
[package] [package]
name = "textsender_models" name = "schedtxt_models"
version = "0.5.1" version = "0.5.3"
edition = "2024" edition = "2024"
rust-version = "1.96.1" rust-version = "1.97"
description = "Models used for the textsender project" description = "Models used for the schedtxt project"
[dependencies] [dependencies]
serde = { version = "1.0.228", features = ["derive"] } serde = { version = "1.0.228", features = ["derive"] }
serde_json = { version = "1.0.150" } serde_json = { version = "1.0.150" }
time = { version = "0.3.49", features = ["formatting", "macros", "parsing", "serde"] } time = { version = "0.3.53", features = ["formatting", "macros", "parsing", "serde"] }
sqlx = { version = "0.9.0", features = ["runtime-tokio", "tls-native-tls", "postgres", "time", "uuid"] } sqlx = { version = "0.9.0", features = ["runtime-tokio", "tls-native-tls", "postgres", "time", "uuid"] }
uuid = { version = "1.23.3", features = ["v4", "serde"] } uuid = { version = "1.23.5", features = ["v4", "serde"] }
dotenvy = { version = "0.15.7" } dotenvy = { version = "0.15.7" }
const_format = { version = "0.2.36" } const_format = { version = "0.2.36" }
josekit = { version = "0.10.3" } josekit = { version = "0.10.3" }
+2
View File
@@ -0,0 +1,2 @@
# schedtxt_models
Models library for the `schedtxt` project.
+2 -2
View File
@@ -40,7 +40,7 @@ pub fn get_root_directory() -> crate::envy::EnvVar {
pub fn get_app_base_api_url() -> crate::envy::EnvVar { pub fn get_app_base_api_url() -> crate::envy::EnvVar {
dotenvy::dotenv().ok(); dotenvy::dotenv().ok();
let key = crate::envy::keys::TEXTSENDER_BASE_API_URL; let key = crate::envy::keys::SCHEDTXT_BASE_API_URL;
let value = std::env::var(key).expect(key); let value = std::env::var(key).expect(key);
crate::envy::init_envvar(key, &value) crate::envy::init_envvar(key, &value)
@@ -48,7 +48,7 @@ pub fn get_app_base_api_url() -> crate::envy::EnvVar {
pub fn get_app_auth_base_api_url() -> crate::envy::EnvVar { pub fn get_app_auth_base_api_url() -> crate::envy::EnvVar {
dotenvy::dotenv().ok(); dotenvy::dotenv().ok();
let key = crate::envy::keys::TEXTSENDER_AUTH_BASE_API_URL; let key = crate::envy::keys::SCHEDTXT_AUTH_BASE_API_URL;
let value = std::env::var(key).expect(key); let value = std::env::var(key).expect(key);
crate::envy::init_envvar(key, &value) crate::envy::init_envvar(key, &value)
+8 -8
View File
@@ -2,7 +2,7 @@
pub const DB_URL: &str = "DATABASE_URL"; pub const DB_URL: &str = "DATABASE_URL";
/// Environment key for secret main key /// Environment key for secret main key
/// Used for the textsender app /// Used for the schedtxt app
pub const SECRET_MAIN_KEY: &str = "SECRET_MAIN_KEY"; pub const SECRET_MAIN_KEY: &str = "SECRET_MAIN_KEY";
/// Environment key for service logins /// Environment key for service logins
@@ -15,11 +15,11 @@ pub const SECRET_KEY: &str = "SECRET_KEY";
/// Environment key for root directory for the textsender app /// Environment key for root directory for the textsender app
pub const ROOT_DIRECTORY: &str = "ROOT_DIRECTORY"; pub const ROOT_DIRECTORY: &str = "ROOT_DIRECTORY";
/// Environment key for textsender api url /// Environment key for schedtxt api url
pub const TEXTSENDER_BASE_API_URL: &str = "TEXTSENDER_BASE_API_URL"; pub const SCHEDTXT_BASE_API_URL: &str = "SCHEDTXT_BASE_API_URL";
/// Environment key for textsender auth api url /// Environment key for textsender auth api url
pub const TEXTSENDER_AUTH_BASE_API_URL: &str = "TEXTSENDER_AUTH_BASE_API_URL"; pub const SCHEDTXT_AUTH_BASE_API_URL: &str = "SCHEDTXT_AUTH_BASE_API_URL";
/// Environment key for App status /// Environment key for App status
pub const APP_ENV: &str = "APP_ENV"; pub const APP_ENV: &str = "APP_ENV";
@@ -41,10 +41,10 @@ pub mod error {
pub const SERVICE_LOGIN: &str = concatcp!(super::SERVICE_PASSPHRASE, " ", GENERAL_ERROR); pub const SERVICE_LOGIN: &str = concatcp!(super::SERVICE_PASSPHRASE, " ", GENERAL_ERROR);
pub const SECRET_KEY: &str = concatcp!(super::SECRET_KEY, " ", GENERAL_ERROR); pub const SECRET_KEY: &str = concatcp!(super::SECRET_KEY, " ", GENERAL_ERROR);
pub const ROOT_DIRECTORY: &str = concatcp!(super::ROOT_DIRECTORY, " ", GENERAL_ERROR); pub const ROOT_DIRECTORY: &str = concatcp!(super::ROOT_DIRECTORY, " ", GENERAL_ERROR);
pub const TEXTSENDER_BASE_API_URL: &str = pub const SCHEDTXT_BASE_API_URL: &str =
concatcp!(super::TEXTSENDER_BASE_API_URL, " ", GENERAL_ERROR); concatcp!(super::SCHEDTXT_BASE_API_URL, " ", GENERAL_ERROR);
pub const TEXTSENDER_AUTH_BASE_API_URL: &str = pub const SCHEDTXT_AUTH_BASE_API_URL: &str =
concatcp!(super::TEXTSENDER_AUTH_BASE_API_URL, " ", GENERAL_ERROR); concatcp!(super::SCHEDTXT_AUTH_BASE_API_URL, " ", GENERAL_ERROR);
pub const APP_ENV: &str = concatcp!(super::APP_ENV, " ", GENERAL_ERROR); pub const APP_ENV: &str = concatcp!(super::APP_ENV, " ", GENERAL_ERROR);
pub const BACKEND_PORT: &str = concatcp!(super::BACKEND_PORT, " ", GENERAL_ERROR); pub const BACKEND_PORT: &str = concatcp!(super::BACKEND_PORT, " ", GENERAL_ERROR);
pub const FRONTEND_URL: &str = concatcp!(super::FRONTEND_URL, " ", GENERAL_ERROR); pub const FRONTEND_URL: &str = concatcp!(super::FRONTEND_URL, " ", GENERAL_ERROR);
+2 -2
View File
@@ -174,8 +174,8 @@ fn init_payload_issued(
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
const TEST_MESSAGE: &str = "Testing for textsender"; const TEST_MESSAGE: &str = "Testing for schedtxt";
const TEST_ISSUER: &str = "textsender-test"; const TEST_ISSUER: &str = "schedtxt-test";
const TEST_AUDIENCE: &str = "area-test"; const TEST_AUDIENCE: &str = "area-test";
const TEST_USER_ID: uuid::Uuid = uuid::uuid!("9ab1c75f-d184-4913-ae99-544b4dcfcb41"); const TEST_USER_ID: uuid::Uuid = uuid::uuid!("9ab1c75f-d184-4913-ae99-544b4dcfcb41");
const TEST_KEY: &str = "8342nhf7ycrt4983q7ryfc93w478ryfc3w9487ryfc342w98i7cy"; const TEST_KEY: &str = "8342nhf7ycrt4983q7ryfc93w478ryfc3w9487ryfc342w98i7cy";