Skip to main content

OrganizationOps

Trait OrganizationOps 

Source
pub trait OrganizationOps:
    Send
    + Sync
    + 'static {
    type Organization: AuthOrganization;

    // Required methods
    fn create_organization<'life0, 'async_trait>(
        &'life0 self,
        org: CreateOrganization,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Organization, AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn get_organization_by_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Organization>, AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn get_organization_by_slug<'life0, 'life1, 'async_trait>(
        &'life0 self,
        slug: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Organization>, AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn update_organization<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
        update: UpdateOrganization,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Organization, AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn delete_organization<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn list_user_organizations<'life0, 'life1, 'async_trait>(
        &'life0 self,
        user_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Self::Organization>, AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
}
Expand description

Organization persistence operations.

Required Associated Types§

Required Methods§

Source

fn create_organization<'life0, 'async_trait>( &'life0 self, org: CreateOrganization, ) -> Pin<Box<dyn Future<Output = Result<Self::Organization, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source

fn get_organization_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Organization>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn get_organization_by_slug<'life0, 'life1, 'async_trait>( &'life0 self, slug: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Organization>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn update_organization<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, update: UpdateOrganization, ) -> Pin<Box<dyn Future<Output = Result<Self::Organization, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn delete_organization<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn list_user_organizations<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Self::Organization>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Implementors§