[][src]Struct vdot::Args

pub struct Args {
    pub paths: Vec<String>,
    pub output: PathBuf,
    pub command: Option<String>,
    pub vault_token: String,
    pub vault_address: Url,
    pub verbose: u8,
}

Fields

paths: Vec<String>

Path to the Vault secrets

If duplicate keys are found when providing more than one path the value from the first path will be saved.

Use something like secret/foo-bar for v1 of the Vault key-value secrets engine, and secret/data/foo-bar for v2.

e.g. vdot secret/foo secret/bar

See https://www.vaultproject.io/docs/secrets/kv/index.html for more information.

output: PathBuf

Write to the given file

e.g. vdot --output .env.test secret/foo

command: Option<String>

Command to spawn

This option will spawn the given command with the environment variables downloaded from Vault.

e.g. vdot -c 'npm start' secret/foo

vault_token: String

Vault token used to authenticate requests

This can also be provided by setting the VAULT_TOKEN environment variable.

e.g. vdot --vault-token $(cat ~/.vault-token) secret/foo

See https://www.vaultproject.io/docs/concepts/auth.html#tokens for more information.

vault_address: Url

Vault server address

This can also be provided by setting the VAULT_ADDR environment variable.

e.g. vdot --vault-address http://127.0.0.1:8200 secret/foo

verbose: u8

Verbose mode

Trait Implementations

impl Debug for Args[src]

impl StructOpt for Args[src]

Auto Trait Implementations

impl Send for Args

impl Sync for Args

impl Unpin for Args

impl UnwindSafe for Args

impl RefUnwindSafe for Args

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err