Moved more code from hotel_service to lib
Some checks failed
Build & test / build (push) Failing after 6s

This commit is contained in:
Martin Berg Alstad
2024-09-08 17:27:20 +02:00
parent 7e2df67fee
commit 80f4af9087
18 changed files with 254 additions and 15 deletions

View File

@ -26,6 +26,7 @@ tower = { version = "0.5", optional = true }
tower-http = { version = "0.5", optional = true, features = ["trace", "cors", "normalize-path"] }
mime = { version = "0.3", optional = true }
# Async
async-trait = { workspace = true }
tokio = { workspace = true, optional = true, features = ["fs", "rt-multi-thread"] }
tokio-util = { version = "0.7", optional = true, features = ["io"] }
# Database
@ -33,6 +34,7 @@ diesel = { workspace = true, optional = true, features = ["postgres"] }
diesel-async = { workspace = true, optional = true, features = ["postgres", "deadpool"] }
diesel-crud-derive = { path = "crates/diesel_crud_derive", optional = true }
diesel-crud-trait = { path = "crates/diesel_crud_trait", optional = true }
diesel_async_migrations = { version = "0.15", optional = true }
deadpool-diesel = { workspace = true, optional = true, features = ["postgres"] }
# Error handling
thiserror = { workspace = true, optional = true }
@ -46,6 +48,9 @@ into-response-derive = { path = "crates/into_response_derive", optional = true }
read-files = { path = "crates/read_files", optional = true }
# Serialization / Deserialization
serde = { version = "1.0", optional = true, features = ["derive"] }
serde_json = { version = "1.0", optional = true }
# Test
testcontainers-modules = { version = "0.10", features = ["postgres"], optional = true }
# Time
chrono = { version = "0.4", optional = true, features = ["serde"] }
# Utils
@ -54,6 +59,7 @@ derive_more = { workspace = true, features = ["from", "constructor"] }
[workspace.dependencies]
# Async
tokio = "1.40"
async-trait = "0.1"
# Database
diesel = "2.2"
diesel-async = "0.5"
@ -70,11 +76,12 @@ derive_more = "1.0"
[features]
axum = ["dep:axum", "dep:tower", "dep:tower-http", "dep:thiserror", "dep:tracing", "dep:tracing-subscriber", "dep:tokio", "dep:mime"]
diesel = ["dep:diesel-crud-trait", "dep:diesel", "dep:diesel-async", "dep:deadpool-diesel"]
diesel = ["dep:diesel-crud-trait", "dep:diesel", "dep:diesel-async", "dep:deadpool-diesel", "dep:diesel_async_migrations"]
io = ["dep:tokio", "dep:tokio-util"]
iter = []
nom = ["dep:nom"]
serde = ["dep:serde"]
serde = ["dep:serde", "dep:serde_json"]
derive = ["dep:into-response-derive", "dep:diesel-crud-derive"]
read-files = ["dep:read-files"]
time = ["dep:chrono"]
test = ["dep:testcontainers-modules"]