Skip to main content

EnvScopeProvider

Trait EnvScopeProvider 

Source
pub trait EnvScopeProvider: Send + Sync {
    // Required method
    fn resolve_env_scope<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name_or_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Resolves an environment name-or-id to the scope string used by the underlying SecretsStore.

Typically backed by the API’s EnvironmentStorage plus the env_scope(..) helper, which produces strings of the form env:{env_id} (global) or project:{pid}:env:{env_id} (project-scoped).

This trait is consumed by SecretsResolver when resolving the $secret://<env>/<KEY> URL-like reference form.

Required Methods§

Source

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

Return the scope string for the given env (name or id).

§Errors

Returns an error if the env does not exist or cannot be resolved.

Implementors§