pub struct GcpResolver { /* private fields */ }Expand description
Resolves secrets from GCP Secret Manager
Mode is auto-negotiated based on environment:
- If
GOOGLE_APPLICATION_CREDENTIALSis set → HTTP mode - Otherwise → CLI mode (uses
gcloudCLI)
The source field in SecretSpec can be:
- A JSON-encoded
GcpSecretConfig - A resource name like “projects/PROJECT/secrets/SECRET/versions/VERSION”
Implementations§
Source§impl GcpResolver
impl GcpResolver
Sourcepub fn new() -> Result<Self, SecretError>
pub fn new() -> Result<Self, SecretError>
Create a new GCP resolver with auto-detected mode
If GCP credentials are available in environment, uses HTTP mode. Otherwise, CLI mode will be used.
§Errors
Returns error if GCP credentials cannot be loaded.
Trait Implementations§
Source§impl Debug for GcpResolver
impl Debug for GcpResolver
Source§impl SecretResolver for GcpResolver
impl SecretResolver for GcpResolver
Source§fn provider_name(&self) -> &'static str
fn provider_name(&self) -> &'static str
Get the provider name for this resolver. Read more
Source§fn resolve<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
spec: &'life2 SecretSpec,
) -> Pin<Box<dyn Future<Output = Result<String, SecretError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn resolve<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
spec: &'life2 SecretSpec,
) -> Pin<Box<dyn Future<Output = Result<String, SecretError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Resolve a single secret by name and spec. Read more
Source§fn resolve_secure<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
spec: &'life2 SecretSpec,
) -> Pin<Box<dyn Future<Output = Result<SecureSecret, SecretError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn resolve_secure<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
spec: &'life2 SecretSpec,
) -> Pin<Box<dyn Future<Output = Result<SecureSecret, SecretError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Resolve a single secret returning a secure value. Read more
Source§fn resolve_all<'life0, 'life1, 'async_trait>(
&'life0 self,
secrets: &'life1 HashMap<String, SecretSpec>,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, String>, SecretError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn resolve_all<'life0, 'life1, 'async_trait>(
&'life0 self,
secrets: &'life1 HashMap<String, SecretSpec>,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, String>, SecretError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Resolve multiple secrets at once (legacy sequential API). Read more
Source§fn resolve_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
secrets: &'life1 HashMap<String, SecretSpec>,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, SecureSecret>, SecretError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn resolve_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
secrets: &'life1 HashMap<String, SecretSpec>,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, SecureSecret>, SecretError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Resolve multiple secrets in batch with concurrent execution. Read more
Source§fn supports_native_batch(&self) -> bool
fn supports_native_batch(&self) -> bool
Check if this resolver supports native batch resolution. Read more
Auto Trait Implementations§
impl Freeze for GcpResolver
impl RefUnwindSafe for GcpResolver
impl Send for GcpResolver
impl Sync for GcpResolver
impl Unpin for GcpResolver
impl UnwindSafe for GcpResolver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more