aboutsummaryrefslogtreecommitdiffstats
path: root/lib/shared-svc/src/lib.rs
diff options
context:
space:
mode:
authorrtkay123 <dev@kanjala.com>2026-02-09 17:54:46 +0200
committerrtkay123 <dev@kanjala.com>2026-02-09 17:54:46 +0200
commita9630ecdc459068ca51ee2d7be3837d609840842 (patch)
tree3bf6d1da4aefbaa351a36a0c63228bcdcf6b4917 /lib/shared-svc/src/lib.rs
parentd2339ca8869af12c0fd8cf6fc87986f06b487de9 (diff)
downloadsellershut-a9630ecdc459068ca51ee2d7be3837d609840842.tar.bz2
sellershut-a9630ecdc459068ca51ee2d7be3837d609840842.zip
feat: connect to database
Diffstat (limited to 'lib/shared-svc/src/lib.rs')
-rw-r--r--lib/shared-svc/src/lib.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/shared-svc/src/lib.rs b/lib/shared-svc/src/lib.rs
index 92d9c32..d4852a5 100644
--- a/lib/shared-svc/src/lib.rs
+++ b/lib/shared-svc/src/lib.rs
@@ -1,12 +1,19 @@
#[cfg(feature = "cache")]
pub mod cache;
+#[cfg(feature = "database")]
+pub mod database;
+
use thiserror::Error;
#[derive(Error, Debug)]
pub enum ServiceError {
- #[error("data store disconnected")]
+ #[error("cache error")]
+ #[cfg(feature = "cache")]
Cache(#[from] redis::RedisError),
+ #[error("database error")]
+ #[cfg(feature = "database")]
+ Database(#[from] sqlx::Error),
#[error("the data for key `{0}` is not available")]
Redaction(String),
#[error("invalid header (expected {expected:?}, found {found:?})")]