credentials 0.5.0

Fetch secrets from either environment variables or Hashicorp's Vault

Crate credentials [] [src]

Access secure credentials at runtime with multiple backends.

For more information, see the homepage.

use credentials;
use std::env;

env::set_var("PASSWORD", "secret");
assert_eq!("secret", credentials::var("PASSWORD").unwrap());

Structs

Client

A client which fetches secrets. Under normal circumstances, it's usually easier to use the static credentials::var and credentials::file methods instead, but you may need to use this to customize behavior.

Error
Options

Options which can be passed to Client::new.

Secretfile

A basic interface for loading a Secretfile and listing the various variables and files contained inside.

SecretfileKeys

An iterator over the keys mentioned in a Secretfile.

Enums

ErrorKind

Traits

ChainErr

Functions

file

Fetch the value of a file-style credential.

var

Fetch the value of an environment-variable-style credential.

Type Definitions

Result