pub struct CoreSvc<G> { /* private fields */ }
Trait Implementations§
Source§impl<G: CoreConfig> OrganizationInvitationsService for CoreSvc<G>
impl<G: CoreConfig> OrganizationInvitationsService for CoreSvc<G>
fn create_organization_invitation<'life0, 'async_trait>(
&'life0 self,
req: Request<CreateOrganizationInvitationRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<OrganizationInvitation>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_organization_invitations_by_organization<'life0, 'async_trait>(
&'life0 self,
req: Request<ListOrganizationInvitationsByOrganizationRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<OrganizationInvitationList>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_orgnization_invites_by_user<'life0, 'async_trait>(
&'life0 self,
req: Request<ListOrgnizationInvitesByUserRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<OrganizationInvitationList>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_organization_invitation<'life0, 'async_trait>(
&'life0 self,
req: Request<GetOrganizationInvitationRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<OrganizationInvitation>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn accept_organization_invitation<'life0, 'async_trait>(
&'life0 self,
req: Request<AcceptOrganizationInvitationRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<OrganizationMember>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn decline_organization_invitation<'life0, 'async_trait>(
&'life0 self,
req: Request<DeclineOrganizationInvitationRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl<G: CoreConfig> OrganizationsService for CoreSvc<G>
impl<G: CoreConfig> OrganizationsService for CoreSvc<G>
fn create_organization<'life0, 'async_trait>(
&'life0 self,
req: Request<CreateOrganizationRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Organization>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_organization<'life0, 'async_trait>(
&'life0 self,
req: Request<GetOrganizationRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Organization>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_organization<'life0, 'async_trait>(
&'life0 self,
req: Request<UpdateOrganizationRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Organization>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_organization_members<'life0, 'async_trait>(
&'life0 self,
req: Request<ListOrganizationMembersRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<OrganizationMembersList>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_organizations_by_user<'life0, 'async_trait>(
&'life0 self,
req: Request<ListOrganizationsByUserRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<OrganizationsList>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_project<'life0, 'async_trait>(
&'life0 self,
req: Request<CreateProjectRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Project>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_projects<'life0, 'async_trait>(
&'life0 self,
req: Request<ListProjectsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ProjectsList>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl<G: CoreConfig> Service<G> for CoreSvc<G>
impl<G: CoreConfig> Service<G> for CoreSvc<G>
Source§async fn run(self, global: Arc<G>, ctx: Context) -> Result<()>
async fn run(self, global: Arc<G>, ctx: Context) -> Result<()>
Run the service.
This function should return a future that is pending as long as the
service is running. When the service finishes without any errors,
the future should resolve to
Ok(())
. As a best practice, the
service should stop as soon as the provided context is done. Read moreSource§impl<G: CoreConfig> SessionsService for CoreSvc<G>
impl<G: CoreConfig> SessionsService for CoreSvc<G>
fn register_with_email<'life0, 'async_trait>(
&'life0 self,
req: Request<RegisterWithEmailRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn complete_register_with_email<'life0, 'async_trait>(
&'life0 self,
req: Request<CompleteRegisterWithEmailRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<NewUserSessionToken>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn login_with_email_options<'life0, 'async_trait>(
&'life0 self,
req: Request<LoginWithEmailOptionsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<LoginWithEmailOptionsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn login_with_email_and_password<'life0, 'async_trait>(
&'life0 self,
req: Request<LoginWithEmailAndPasswordRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<NewUserSessionToken>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn login_with_magic_link<'life0, 'async_trait>(
&'life0 self,
req: Request<LoginWithMagicLinkRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn complete_login_with_magic_link<'life0, 'async_trait>(
&'life0 self,
req: Request<CompleteLoginWithMagicLinkRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<NewUserSessionToken>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn login_with_google<'life0, 'async_trait>(
&'life0 self,
req: Request<LoginWithGoogleRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<LoginWithGoogleResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn complete_login_with_google<'life0, 'async_trait>(
&'life0 self,
req: Request<CompleteLoginWithGoogleRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CompleteLoginWithGoogleResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn login_with_webauthn<'life0, 'async_trait>(
&'life0 self,
req: Request<LoginWithWebauthnRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<NewUserSessionToken>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_user_session_request<'life0, 'async_trait>(
&'life0 self,
req: Request<CreateUserSessionRequestRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<UserSessionRequest>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_user_session_request<'life0, 'async_trait>(
&'life0 self,
req: Request<GetUserSessionRequestRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<UserSessionRequest>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_user_session_request_by_code<'life0, 'async_trait>(
&'life0 self,
req: Request<GetUserSessionRequestByCodeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<UserSessionRequest>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn approve_user_session_request_by_code<'life0, 'async_trait>(
&'life0 self,
req: Request<ApproveUserSessionRequestByCodeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<UserSessionRequest>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn complete_user_session_request<'life0, 'async_trait>(
&'life0 self,
req: Request<CompleteUserSessionRequestRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<NewUserSessionToken>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn validate_mfa_for_user_session<'life0, 'async_trait>(
&'life0 self,
req: Request<ValidateMfaForUserSessionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<UserSession>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn refresh_user_session<'life0, 'async_trait>(
&'life0 self,
req: Request<()>,
) -> Pin<Box<dyn Future<Output = Result<Response<NewUserSessionToken>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn invalidate_user_session<'life0, 'async_trait>(
&'life0 self,
req: Request<()>,
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl<G: CoreConfig> UsersService for CoreSvc<G>
impl<G: CoreConfig> UsersService for CoreSvc<G>
fn get_user<'life0, 'async_trait>(
&'life0 self,
req: Request<GetUserRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<User>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_user<'life0, 'async_trait>(
&'life0 self,
req: Request<UpdateUserRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<User>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_user_emails<'life0, 'async_trait>(
&'life0 self,
req: Request<ListUserEmailsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<UserEmailsList>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_user_email<'life0, 'async_trait>(
&'life0 self,
req: Request<CreateUserEmailRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn complete_create_user_email<'life0, 'async_trait>(
&'life0 self,
req: Request<CompleteCreateUserEmailRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<UserEmail>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_user_email<'life0, 'async_trait>(
&'life0 self,
req: Request<DeleteUserEmailRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<UserEmail>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_webauthn_credential<'life0, 'async_trait>(
&'life0 self,
req: Request<CreateWebauthnCredentialRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CreateWebauthnCredentialResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn complete_create_webauthn_credential<'life0, 'async_trait>(
&'life0 self,
req: Request<CompleteCreateWebauthnCredentialRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<WebauthnCredential>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_webauthn_credentials<'life0, 'async_trait>(
&'life0 self,
req: Request<ListWebauthnCredentialsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<WebauthnCredentialsList>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_webauthn_credential<'life0, 'async_trait>(
&'life0 self,
req: Request<DeleteWebauthnCredentialRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<WebauthnCredential>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_webauthn_challenge<'life0, 'async_trait>(
&'life0 self,
req: Request<CreateWebauthnChallengeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<WebauthnChallenge>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_totp_credential<'life0, 'async_trait>(
&'life0 self,
req: Request<CreateTotpCredentialRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CreateTotpCredentialResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn complete_create_totp_credential<'life0, 'async_trait>(
&'life0 self,
req: Request<CompleteCreateTotpCredentialRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<TotpCredential>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_totp_credentials<'life0, 'async_trait>(
&'life0 self,
req: Request<ListTotpCredentialsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<TotpCredentialsList>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_totp_credential<'life0, 'async_trait>(
&'life0 self,
req: Request<DeleteTotpCredentialRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<TotpCredential>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn regenerate_recovery_codes<'life0, 'async_trait>(
&'life0 self,
req: Request<RegenerateRecoveryCodesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RecoveryCodes>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_user<'life0, 'async_trait>(
&'life0 self,
req: Request<DeleteUserRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<User>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl<G> Freeze for CoreSvc<G>
impl<G> RefUnwindSafe for CoreSvc<G>where
G: RefUnwindSafe,
impl<G> Send for CoreSvc<G>where
G: Send,
impl<G> Sync for CoreSvc<G>where
G: Sync,
impl<G> Unpin for CoreSvc<G>where
G: Unpin,
impl<G> UnwindSafe for CoreSvc<G>where
G: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
Source§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self
to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self
to an expression for Diesel’s query builder. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T, Conn> RunQueryDsl<Conn> for T
impl<T, Conn> RunQueryDsl<Conn> for T
Source§fn execute<'conn, 'query>(
self,
conn: &'conn mut Conn,
) -> <Conn as AsyncConnection>::ExecuteFuture<'conn, 'query>
fn execute<'conn, 'query>( self, conn: &'conn mut Conn, ) -> <Conn as AsyncConnection>::ExecuteFuture<'conn, 'query>
Executes the given command, returning the number of rows affected. Read more
Source§fn load<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>
fn load<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>
Source§fn load_stream<'conn, 'query, U>(
self,
conn: &'conn mut Conn,
) -> Self::LoadFuture<'conn>where
Conn: AsyncConnection,
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'query,
fn load_stream<'conn, 'query, U>(
self,
conn: &'conn mut Conn,
) -> Self::LoadFuture<'conn>where
Conn: AsyncConnection,
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'query,
Source§fn get_result<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>, fn(Self::Stream<'conn>) -> Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>>
fn get_result<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>, fn(Self::Stream<'conn>) -> Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>>
Runs the command, and returns the affected row. Read more
Source§fn get_results<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>
fn get_results<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>
Runs the command, returning an
Vec
with the affected rows. Read moreSource§fn first<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<<Self::Output as LoadQuery<'query, Conn, U>>::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>, fn(<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>) -> Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>>
fn first<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<<Self::Output as LoadQuery<'query, Conn, U>>::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>, fn(<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>) -> Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>>
Attempts to load a single record. Read more