Skip to main content

BindingsProviderApi

Trait BindingsProviderApi 

Source
pub trait BindingsProviderApi:
    Send
    + Sync
    + Debug {
    // Required methods
    fn load_storage<'life0, 'life1, 'async_trait>(
        &'life0 self,
        binding_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Storage>, AlienError<ErrorData>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn load_build<'life0, 'life1, 'async_trait>(
        &'life0 self,
        binding_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Build>, AlienError<ErrorData>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn load_artifact_registry<'life0, 'life1, 'async_trait>(
        &'life0 self,
        binding_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ArtifactRegistry>, AlienError<ErrorData>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn load_vault<'life0, 'life1, 'async_trait>(
        &'life0 self,
        binding_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Vault>, AlienError<ErrorData>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn load_kv<'life0, 'life1, 'async_trait>(
        &'life0 self,
        binding_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Kv>, AlienError<ErrorData>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn load_queue<'life0, 'life1, 'async_trait>(
        &'life0 self,
        binding_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Queue>, AlienError<ErrorData>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn load_function<'life0, 'life1, 'async_trait>(
        &'life0 self,
        binding_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Function>, AlienError<ErrorData>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn load_container<'life0, 'life1, 'async_trait>(
        &'life0 self,
        binding_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Container>, AlienError<ErrorData>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn load_service_account<'life0, 'life1, 'async_trait>(
        &'life0 self,
        binding_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ServiceAccount>, AlienError<ErrorData>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
}
Expand description

A provider must implement methods to load the various types of bindings based on environment variables or other configuration sources.

Required Methods§

Source

fn load_storage<'life0, 'life1, 'async_trait>( &'life0 self, binding_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Storage>, AlienError<ErrorData>>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Given a binding identifier, builds a Storage implementation.

Source

fn load_build<'life0, 'life1, 'async_trait>( &'life0 self, binding_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Build>, AlienError<ErrorData>>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Given a binding identifier, builds a Build implementation.

Source

fn load_artifact_registry<'life0, 'life1, 'async_trait>( &'life0 self, binding_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ArtifactRegistry>, AlienError<ErrorData>>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Given a binding identifier, builds an ArtifactRegistry implementation.

Source

fn load_vault<'life0, 'life1, 'async_trait>( &'life0 self, binding_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Vault>, AlienError<ErrorData>>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Given a binding identifier, builds a Vault implementation.

Source

fn load_kv<'life0, 'life1, 'async_trait>( &'life0 self, binding_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Kv>, AlienError<ErrorData>>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Given a binding identifier, builds a KV implementation.

Source

fn load_queue<'life0, 'life1, 'async_trait>( &'life0 self, binding_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Queue>, AlienError<ErrorData>>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Given a binding identifier, builds a Queue implementation.

Source

fn load_function<'life0, 'life1, 'async_trait>( &'life0 self, binding_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Function>, AlienError<ErrorData>>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Given a binding identifier, builds a Function implementation.

Source

fn load_container<'life0, 'life1, 'async_trait>( &'life0 self, binding_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Container>, AlienError<ErrorData>>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Given a binding identifier, builds a Container implementation.

Source

fn load_service_account<'life0, 'life1, 'async_trait>( &'life0 self, binding_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ServiceAccount>, AlienError<ErrorData>>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Given a binding identifier, builds a ServiceAccount implementation.

Implementors§