Add initial services

This commit is contained in:
2022-10-03 23:00:31 +02:00
parent b01b33f7d1
commit 6234cf18e8
22 changed files with 932 additions and 91 deletions

View File

@@ -6,3 +6,25 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
tokio = { version = "1", features = ["full"] }
axum = "0.5.1"
# utilty crates
serde = { version = "1.0.136", features = ["derive"] }
sqlx = { version = "0.5", features = [
"runtime-tokio-rustls",
"postgres",
"time",
] }
serde_json = "1.0.81"
dotenv = "0.15.0"
tracing = "0.1"
tracing-subscriber = "0.3"
anyhow = "1"
validator = { version = "0.15", features = ["derive"] }
async-trait = "0.1"
thiserror = "1"
rust-argon2 = "1.0"
clap = { version = "3", features = ["derive", "env"] }
mockall = "0.11.1"
time = "0.2"

View File

@@ -0,0 +1,8 @@
use std::sync::Arc;
use async_trait::async_trait;
pub type DynItemService = Arc<dyn ItemService + Send + Sync>;
#[async_trait]
pub trait ItemService {}

View File

@@ -1,2 +1,3 @@
pub mod items;
pub mod projects;
pub mod users;

View File

@@ -0,0 +1,8 @@
use std::sync::Arc;
use async_trait::async_trait;
pub type DynProjectService = Arc<dyn ProjectService + Send + Sync>;
#[async_trait]
pub trait ProjectService {}

View File

@@ -0,0 +1,8 @@
use std::sync::Arc;
use async_trait::async_trait;
pub type DynUserService = Arc<dyn UserService + Send + Sync>;
#[async_trait]
pub trait UserService {}