use uuid::Uuid; use crate::error::UserResult; use crate::features::UserService; use super::{ AccessKeyView, AddSshKeyCmd, CreateAccessKeyCmd, CreateAccessKeyResp, PushSubscriptionView, RecoveryCodeView, RegenerateRecoveryResp, SshKeyView, UpsertPushCmd, }; use super::usecase; impl UserService { pub async fn list_recovery_codes(&self, caller: Uuid) -> UserResult> { usecase::list_recovery(self, caller).await } pub async fn regenerate_recovery_codes( &self, caller: Uuid, ) -> UserResult { usecase::regenerate_recovery(self, caller).await } pub async fn list_access_keys(&self, caller: Uuid) -> UserResult> { usecase::list_access_keys(self, caller).await } pub async fn create_access_key( &self, caller: Uuid, cmd: CreateAccessKeyCmd, ) -> UserResult { usecase::create_access_key(self, caller, cmd).await } pub async fn delete_access_key(&self, caller: Uuid, key_id: Uuid) -> UserResult<()> { usecase::delete_access_key(self, caller, key_id).await } pub async fn list_ssh_keys(&self, caller: Uuid) -> UserResult> { usecase::list_ssh_keys(self, caller).await } pub async fn add_ssh_key(&self, caller: Uuid, cmd: AddSshKeyCmd) -> UserResult { usecase::add_ssh_key(self, caller, cmd).await } pub async fn delete_ssh_key(&self, caller: Uuid, key_id: Uuid) -> UserResult<()> { usecase::delete_ssh_key(self, caller, key_id).await } pub async fn list_push_subscriptions( &self, caller: Uuid, ) -> UserResult> { usecase::list_push(self, caller).await } pub async fn upsert_push_subscription( &self, caller: Uuid, cmd: UpsertPushCmd, ) -> UserResult { usecase::upsert_push(self, caller, cmd).await } pub async fn delete_push_subscription(&self, caller: Uuid, push_id: Uuid) -> UserResult<()> { usecase::delete_push(self, caller, push_id).await } }