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§
Sourcefn 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_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.
Sourcefn 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_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.
Sourcefn 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_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.
Sourcefn 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_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.
Sourcefn 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_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.
Sourcefn 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_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.
Sourcefn 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_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.
Sourcefn 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_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.
Sourcefn 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,
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.