implement client app
This commit is contained in:
1
src/repository/client_app/mod.rs
Normal file
1
src/repository/client_app/mod.rs
Normal file
@@ -0,0 +1 @@
|
||||
pub mod repos;
|
||||
12
src/repository/client_app/repos.rs
Normal file
12
src/repository/client_app/repos.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
use crate::models::app::CodeLoginData;
|
||||
use crate::models::email::Email;
|
||||
use crate::models::opaque::UserSecretKey;
|
||||
|
||||
pub trait ClientRepo {
|
||||
async fn get_secret_key(&self) -> anyhow::Result<UserSecretKey, String>;
|
||||
async fn set_secret_key(&self, email: &Email,user_secret_key: &UserSecretKey) -> anyhow::Result<(),String>;
|
||||
async fn get_login_data(&self) -> anyhow::Result<CodeLoginData, String>;
|
||||
async fn set_login_data(&self, data: CodeLoginData) -> anyhow::Result<(), String>;
|
||||
async fn set_email(&self, email: &Email) -> anyhow::Result<(), String>;
|
||||
async fn get_email(&self) -> anyhow::Result<Email, String>;
|
||||
}
|
||||
@@ -1 +1,2 @@
|
||||
pub mod opaque;
|
||||
pub(crate) mod client_app;
|
||||
|
||||
Reference in New Issue
Block a user