SecretStore

Structin fastlyfastly 0.13.1View source
pub struct SecretStore { /* private fields */ }

A Compute Secret Store.

A secret store name has a maximum length of 255 bytes and must contain only letters, numbers, dashes (-), underscores (_), and periods (.).

Methods

contains

View source
fn contains(&self, name: &str) -> Result<bool, LookupError>

Return true if the secret store contains a secret with the given name.

Parameters

self: &Self
name: &str

Returns

from_handle

View source
fn from_handle(handle: SecretStoreHandle) -> Self

Create a SecretStore from a SecretStoreHandle.

Parameters

handle: SecretStoreHandle

Returns

Self
fn get(&self, name: &str) -> Option<Secret>

Lookup a Secret by name in this secret store.

Returns Some(secret) if the secret is found, and None if the secret was not found.

See try_get() for a fallible equivalent of this method.

Parameters

self: &Self
name: &str

Returns

fn open(name: &str) -> Result<Self, OpenError>

Open the Secret Store with the given name.

Parameters

name: &str

Returns

fn try_get(&self, name: &str) -> Result<Option<Secret>, LookupError>

Try to lookup a Secret by name in this secret store.

If successful, this method returns Ok(Some(secret)) if the secret is found, or Ok(None) if the secret was not found.

Parameters

self: &Self
name: &str

Returns

Auto trait implementations

Blanket implementations