Added apis
This commit is contained in:
@@ -5,4 +5,11 @@ use async_trait::async_trait;
|
||||
pub type DynUserService = Arc<dyn UserService + Send + Sync>;
|
||||
|
||||
#[async_trait]
|
||||
pub trait UserService {}
|
||||
pub trait UserService {
|
||||
async fn add_user(&self, username: String, password: String) -> anyhow::Result<String>;
|
||||
async fn validate_user(
|
||||
&self,
|
||||
username: String,
|
||||
password: String,
|
||||
) -> anyhow::Result<Option<String>>;
|
||||
}
|
||||
|
Reference in New Issue
Block a user