use async_trait::async_trait;
use dco3_crypto::PlainUserKeyPairContainer;
pub use self::models::*;
use super::client::errors::DracoonClientError;
pub mod account;
pub mod keypairs;
pub mod models;
#[async_trait]
pub trait User {
async fn get_user_account(&self) -> Result<UserAccount, DracoonClientError>;
async fn update_user_account(
&self,
update: UpdateUserAccountRequest,
) -> Result<UserAccount, DracoonClientError>;
async fn get_customer_info(&self) -> Result<CustomerData, DracoonClientError>;
}
#[async_trait]
#[allow(clippy::module_name_repetitions)]
pub trait UserAccountKeyPairs {
async fn get_user_keypair(
&self,
secret: &str,
) -> Result<PlainUserKeyPairContainer, DracoonClientError>;
async fn set_user_keypair(&self, secret: &str) -> Result<(), DracoonClientError>;
async fn delete_user_keypair(&self) -> Result<(), DracoonClientError>;
}