diff options
| author | rtkay123 <dev@kanjala.com> | 2026-02-09 17:54:46 +0200 |
|---|---|---|
| committer | rtkay123 <dev@kanjala.com> | 2026-02-09 17:54:46 +0200 |
| commit | a9630ecdc459068ca51ee2d7be3837d609840842 (patch) | |
| tree | 3bf6d1da4aefbaa351a36a0c63228bcdcf6b4917 /lib/shared-svc/src/lib.rs | |
| parent | d2339ca8869af12c0fd8cf6fc87986f06b487de9 (diff) | |
| download | sellershut-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.rs | 9 |
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:?})")] |
