kjuulh 534b2e4a23
feat: with items
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-06-04 11:02:51 +02:00

23 lines
495 B
Rust

use std::sync::Arc;
use async_trait::async_trait;
use como_domain::Context;
pub type DynUserService = Arc<dyn UserService + Send + Sync>;
#[async_trait]
pub trait UserService {
async fn add_user(
&self,
context: &Context,
username: String,
password: String,
) -> anyhow::Result<String>;
async fn validate_user(
&self,
context: &Context,
username: String,
password: String,
) -> anyhow::Result<Option<String>>;
}