Skip to main content

ResourceBackend

Trait ResourceBackend 

Source
pub trait ResourceBackend: Send + Sync {
    // Required methods
    fn get_domain_enabled<'a, 'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 ServiceState,
        domain_id: &'a str,
    ) -> Pin<Box<dyn Future<Output = Result<bool, ResourceProviderError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn create_domain<'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 ServiceState,
        domain: DomainCreate,
    ) -> Pin<Box<dyn Future<Output = Result<Domain, ResourceProviderError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn create_project<'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 ServiceState,
        project: ProjectCreate,
    ) -> Pin<Box<dyn Future<Output = Result<Project, ResourceProviderError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn delete_domain<'a, 'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 ServiceState,
        id: &'a str,
    ) -> Pin<Box<dyn Future<Output = Result<(), ResourceProviderError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn delete_project<'a, 'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 ServiceState,
        id: &'a str,
    ) -> Pin<Box<dyn Future<Output = Result<(), ResourceProviderError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_domain<'a, 'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 ServiceState,
        domain_id: &'a str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Domain>, ResourceProviderError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_domain_by_name<'a, 'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 ServiceState,
        domain_name: &'a str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Domain>, ResourceProviderError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_project<'a, 'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 ServiceState,
        project_id: &'a str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Project>, ResourceProviderError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_project_by_name<'a, 'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 ServiceState,
        name: &'a str,
        domain_id: &'a str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Project>, ResourceProviderError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_project_parents<'a, 'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 ServiceState,
        project_id: &'a str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Project>>, ResourceProviderError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn list_domains<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        state: &'life1 ServiceState,
        params: &'life2 DomainListParameters,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Domain>, ResourceProviderError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn list_projects<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        state: &'life1 ServiceState,
        params: &'life2 ProjectListParameters,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Project>, ResourceProviderError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Resource driver interface.

Required Methods§

Source

fn get_domain_enabled<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, domain_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<bool, ResourceProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get enabled field of the domain.

Source

fn create_domain<'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, domain: DomainCreate, ) -> Pin<Box<dyn Future<Output = Result<Domain, ResourceProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create new domain.

Source

fn create_project<'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, project: ProjectCreate, ) -> Pin<Box<dyn Future<Output = Result<Project, ResourceProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create new project.

Source

fn delete_domain<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), ResourceProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Delete domain by the ID

Source

fn delete_project<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), ResourceProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Delete project by the ID

Source

fn get_domain<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, domain_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Option<Domain>, ResourceProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get single domain by ID

Source

fn get_domain_by_name<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, domain_name: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Option<Domain>, ResourceProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get single domain by Name

Source

fn get_project<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, project_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Option<Project>, ResourceProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get single project by ID

Source

fn get_project_by_name<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, name: &'a str, domain_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Option<Project>, ResourceProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get single project by Name and Domain ID

Source

fn get_project_parents<'a, 'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServiceState, project_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Project>>, ResourceProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get project parents

Source

fn list_domains<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, state: &'life1 ServiceState, params: &'life2 DomainListParameters, ) -> Pin<Box<dyn Future<Output = Result<Vec<Domain>, ResourceProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

List domains.

Source

fn list_projects<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, state: &'life1 ServiceState, params: &'life2 ProjectListParameters, ) -> Pin<Box<dyn Future<Output = Result<Vec<Project>, ResourceProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

List projects.

Implementors§