diff --git a/src/identity/application/services/delete_user/mod.rs b/src/identity/application/services/delete_user/mod.rs index 60e57ac..4f54d62 100644 --- a/src/identity/application/services/delete_user/mod.rs +++ b/src/identity/application/services/delete_user/mod.rs @@ -9,10 +9,12 @@ pub mod service; use super::errors::*; #[async_trait::async_trait] -pub trait DeleteUserUseCase { +pub trait DeleteUserUseCase: Send + Sync { async fn delete_user( &self, cmd: command::DeleteUserCommand, //) -> errors::ProcessAuthorizationServiceResult; ); } + +pub type DeleteUserServiceObj = std::sync::Arc; diff --git a/src/identity/application/services/login/mod.rs b/src/identity/application/services/login/mod.rs index 20dc2ba..cc50d1a 100644 --- a/src/identity/application/services/login/mod.rs +++ b/src/identity/application/services/login/mod.rs @@ -9,10 +9,12 @@ pub mod service; use super::errors::*; #[async_trait::async_trait] -pub trait LoginUseCase { +pub trait LoginUseCase: Send + Sync { async fn login( &self, cmd: command::LoginCommand, //) -> errors::ProcessAuthorizationServiceResult; ) -> events::LoginEvent; } + +pub type LoginServiceObj = std::sync::Arc; diff --git a/src/identity/application/services/mark_user_verified/mod.rs b/src/identity/application/services/mark_user_verified/mod.rs index ee33d40..a431639 100644 --- a/src/identity/application/services/mark_user_verified/mod.rs +++ b/src/identity/application/services/mark_user_verified/mod.rs @@ -8,7 +8,9 @@ pub mod service; use super::errors::*; #[async_trait::async_trait] -pub trait MarkUserVerifiedUseCase { +pub trait MarkUserVerifiedUseCase: Send + Sync { async fn mark_user_verified(&self, cmd: command::MarkUserVerifiedCommand) -> IdentityResult<()>; } + +pub type MarkUserVerifiedServiceObj = std::sync::Arc; diff --git a/src/identity/application/services/register_user/mod.rs b/src/identity/application/services/register_user/mod.rs index a84ed1d..7329396 100644 --- a/src/identity/application/services/register_user/mod.rs +++ b/src/identity/application/services/register_user/mod.rs @@ -15,3 +15,5 @@ pub trait RegisterUserUseCase: Send + Sync { cmd: command::RegisterUserCommand, ) -> IdentityResult; } + +pub type RegisterUserServiceObj = std::sync::Arc; diff --git a/src/identity/application/services/resend_verification_email/mod.rs b/src/identity/application/services/resend_verification_email/mod.rs index 8e31b09..019f53f 100644 --- a/src/identity/application/services/resend_verification_email/mod.rs +++ b/src/identity/application/services/resend_verification_email/mod.rs @@ -14,3 +14,5 @@ pub trait ResendVerificationEmailUseCase: Send + Sync { cmd: command::ResendVerificationEmailCommand, ) -> IdentityResult<()>; } + +pub type ResendVerificationEmailServiceObj = std::sync::Arc; diff --git a/src/identity/application/services/update_password/mod.rs b/src/identity/application/services/update_password/mod.rs index c93667e..19caa82 100644 --- a/src/identity/application/services/update_password/mod.rs +++ b/src/identity/application/services/update_password/mod.rs @@ -9,10 +9,12 @@ pub mod service; use super::errors::*; #[async_trait::async_trait] -pub trait UpdatePasswordUseCase { +pub trait UpdatePasswordUseCase: Send + Sync { async fn update_password( &self, cmd: command::UpdatePasswordCommand, //) -> errors::ProcessAuthorizationServiceResult; ) -> events::PasswordUpdatedEvent; } + +pub type UpdatePasswordServiceObj = std::sync::Arc;