pub struct ResolvedSecrets {
pub bindings: Vec<ResolvedBinding>,
}Expand description
Resolved secret bindings ready for injection into a microVM. Contains the actual secret values (resolved from env or explicit).
Fields§
§bindings: Vec<ResolvedBinding>Implementations§
Source§impl ResolvedSecrets
impl ResolvedSecrets
Sourcepub fn resolve(bindings: &[SecretBinding]) -> Result<Self>
pub fn resolve(bindings: &[SecretBinding]) -> Result<Self>
Resolve all bindings, reading values from environment where needed.
Sourcepub fn to_secret_files(&self) -> Vec<(String, String)>
pub fn to_secret_files(&self) -> Vec<(String, String)>
Generate secret files for the secrets drive. Each binding produces a JSON file with the secret metadata + value.
Sourcepub fn placeholder_env_vars(&self) -> Vec<(String, String)>
pub fn placeholder_env_vars(&self) -> Vec<(String, String)>
Generate placeholder environment variable entries for the config drive. These let tools pass “is API key set?” checks without exposing real values.
Sourcepub fn manifest_json(&self) -> String
pub fn manifest_json(&self) -> String
Generate a manifest summarizing which secrets are bound to which domains. Written to the config drive for the guest agent to read on boot.
Trait Implementations§
Source§impl Clone for ResolvedSecrets
impl Clone for ResolvedSecrets
Source§fn clone(&self) -> ResolvedSecrets
fn clone(&self) -> ResolvedSecrets
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResolvedSecrets
impl Debug for ResolvedSecrets
Source§impl<'de> Deserialize<'de> for ResolvedSecrets
impl<'de> Deserialize<'de> for ResolvedSecrets
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ResolvedSecrets
impl RefUnwindSafe for ResolvedSecrets
impl Send for ResolvedSecrets
impl Sync for ResolvedSecrets
impl Unpin for ResolvedSecrets
impl UnsafeUnpin for ResolvedSecrets
impl UnwindSafe for ResolvedSecrets
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