pub trait SecretResolver: Send + Sync {
// Required method
fn get(
&self,
key: &str,
) -> Pin<Box<dyn Future<Output = Result<Option<SecretValue>, OperationError>> + Send + '_>>;
}Expand description
Trait for resolving secrets at operation execution time.
Implementations provide read-only access to encrypted secrets scoped
to the current workflow. The engine passes a resolver through
OperationContext so that operations can fetch credentials without
depending on the store crate.
§Examples
use ironflow_core::operation::{SecretResolver, NoopSecretResolver};
let resolver = NoopSecretResolver;
let result = resolver.get("any_key").await;
assert!(result.unwrap().is_none());Required Methods§
Sourcefn get(
&self,
key: &str,
) -> Pin<Box<dyn Future<Output = Result<Option<SecretValue>, OperationError>> + Send + '_>>
fn get( &self, key: &str, ) -> Pin<Box<dyn Future<Output = Result<Option<SecretValue>, OperationError>> + Send + '_>>
Look up a secret by key.
Returns Ok(Some(value)) if the secret exists, Ok(None) if it
does not, or Err on storage/decryption failure.
§Errors
Returns OperationError::Secret if the underlying store fails.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".