Crate credentials

Source
Expand description

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.
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§

Error
An error returned by credentials.

Functions§

file
Fetch the value of a file-style credential.
var
Fetch the value of an environment-variable-style credential.

Type Aliases§

Result
A result returned by functions in Credentials.