Struct CipherStashSecretConfigFile
pub struct CipherStashSecretConfigFile { /* private fields */ }Expand description
Represents the cipherstash.secret.toml configuration file.
To create a new instance of this struct, use the CipherStashSecretConfigFileBuilder.
Implementations§
§impl CipherStashSecretConfigFile
impl CipherStashSecretConfigFile
pub const DEFAULT_FILE_NAME: &'static str = "cipherstash.secret.toml"
pub fn persist(self, file_path: impl AsRef<Path>) -> Result<(), ConfigError>
pub fn persist(self, file_path: impl AsRef<Path>) -> Result<(), ConfigError>
Save the configuration to the given path.
pub fn env_data(&self) -> Result<HashMap<&'static str, String>, ConfigError>
pub fn env_data(&self) -> Result<HashMap<&'static str, String>, ConfigError>
Return the configuration values for use in env file for docker-compose.
Returns a HashMap with the keys CS_CLIENT_KEY and CS_CLIENT_ACCESS_KEY.
The response is wrapped in a Result to match the behavior of the env_data method on CipherStashConfigFile.
pub fn display_env(self) -> String
pub fn display_env(self) -> String
Returns the configuration as an set of environment variables formatted as a single string.
Trait Implementations§
§impl Debug for CipherStashSecretConfigFile
impl Debug for CipherStashSecretConfigFile
§impl<'de> Deserialize<'de> for CipherStashSecretConfigFile
impl<'de> Deserialize<'de> for CipherStashSecretConfigFile
§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
§impl Serialize for CipherStashSecretConfigFile
impl Serialize for CipherStashSecretConfigFile
Auto Trait Implementations§
impl Freeze for CipherStashSecretConfigFile
impl RefUnwindSafe for CipherStashSecretConfigFile
impl Send for CipherStashSecretConfigFile
impl Sync for CipherStashSecretConfigFile
impl Unpin for CipherStashSecretConfigFile
impl UnsafeUnpin for CipherStashSecretConfigFile
impl UnwindSafe for CipherStashSecretConfigFile
Blanket Implementations§
impl<T> AuthStrategyBounds for T
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more