Struct sheesy_vault::Vault
[−]
[src]
pub struct Vault { pub name: Option<String>, pub kind: VaultKind, pub index: usize, pub partitions: Vec<Vault>, pub resolved_at: PathBuf, pub vault_path: Option<PathBuf>, pub auto_import: Option<bool>, pub trust_model: Option<TrustModel>, pub secrets: PathBuf, pub gpg_keys: Option<PathBuf>, pub recipients: PathBuf, }
Fields
name: Option<String>
kind: VaultKind
index: usize
partitions: Vec<Vault>
resolved_at: PathBuf
vault_path: Option<PathBuf>
auto_import: Option<bool>
trust_model: Option<TrustModel>
secrets: PathBuf
gpg_keys: Option<PathBuf>
recipients: PathBuf
Methods
impl Vault
[src]
pub fn from_file(path: &Path) -> Result<Vec<Vault>, Error>
[src]
pub fn set_resolved_at(self, vault_file: &Path) -> Result<Self, Error>
[src]
pub fn validate(&self) -> Result<(), Error>
[src]
pub fn to_file(&self, path: &Path, mode: WriteMode) -> Result<(), VaultError>
[src]
pub fn absolute_path(&self, path: &Path) -> PathBuf
[src]
pub fn secrets_path(&self) -> PathBuf
[src]
pub fn url(&self) -> String
[src]
pub fn print_resources(&self, w: &mut Write) -> Result<(), Error>
[src]
pub fn write_recipients_list(
&self,
recipients: &mut Vec<String>
) -> Result<PathBuf, Error>
[src]
&self,
recipients: &mut Vec<String>
) -> Result<PathBuf, Error>
pub fn recipients_path(&self) -> PathBuf
[src]
pub fn recipients_list(&self) -> Result<Vec<String>, Error>
[src]
pub fn keys_by_ids(
&self,
ctx: &mut Context,
ids: &[String],
type_of_ids_for_errors: &str,
gpg_keys_dir: Option<&Path>,
output: &mut Write
) -> Result<Vec<Key>, Error>
[src]
&self,
ctx: &mut Context,
ids: &[String],
type_of_ids_for_errors: &str,
gpg_keys_dir: Option<&Path>,
output: &mut Write
) -> Result<Vec<Key>, Error>
pub fn recipient_keys(
&self,
ctx: &mut Context,
gpg_keys_dir: Option<&Path>,
output: &mut Write
) -> Result<Vec<Key>, Error>
[src]
&self,
ctx: &mut Context,
gpg_keys_dir: Option<&Path>,
output: &mut Write
) -> Result<Vec<Key>, Error>
pub fn find_gpg_keys_dir(&self) -> Result<PathBuf, Error>
[src]
TODO: change this to be similar to find_trust_model()
as it's OK to let partitions override the master vault settings
pub fn gpg_keys_dir_for_auto_import(&self, partition: &Vault) -> Option<PathBuf>
[src]
pub fn gpg_keys_dir(&self) -> Result<PathBuf, Error>
[src]
impl Vault
[src]
pub fn init_recipients(
&self,
gpg_key_ids: &[String],
output: &mut Write
) -> Result<(), Error>
[src]
&self,
gpg_key_ids: &[String],
output: &mut Write
) -> Result<(), Error>
pub fn print_recipients(
&self,
output: &mut Write,
error: &mut Write
) -> Result<(), Error>
[src]
&self,
output: &mut Write,
error: &mut Write
) -> Result<(), Error>
impl Vault
[src]
pub fn add_recipients(
&self,
gpg_key_ids: &[String],
sign: SigningMode,
signing_key_id: Option<&str>,
partitions: &[String],
output: &mut Write
) -> Result<(), Error>
[src]
&self,
gpg_key_ids: &[String],
sign: SigningMode,
signing_key_id: Option<&str>,
partitions: &[String],
output: &mut Write
) -> Result<(), Error>
pub fn find_trust_model(&self, partition: &Vault) -> TrustModel
[src]
pub fn partitions_by_name_or_path(
&self,
partitions: &[String]
) -> Result<Vec<&Vault>, Error>
[src]
&self,
partitions: &[String]
) -> Result<Vec<&Vault>, Error>
impl Vault
[src]
pub fn remove_recipients(
&self,
gpg_key_ids: &[String],
partitions: &[String],
output: &mut Write
) -> Result<(), Error>
[src]
&self,
gpg_key_ids: &[String],
partitions: &[String],
output: &mut Write
) -> Result<(), Error>
impl Vault
[src]
pub fn import_keys(
&self,
gpg_ctx: &mut Context,
gpg_keys_dir: &Path,
gpg_key_ids: &[String],
output: &mut Write
) -> Result<Vec<String>, Error>
[src]
&self,
gpg_ctx: &mut Context,
gpg_keys_dir: &Path,
gpg_key_ids: &[String],
output: &mut Write
) -> Result<Vec<String>, Error>
pub fn find_signing_key(
&self,
ctx: &mut Context,
signing_key_id: Option<&str>
) -> Result<Key, Error>
[src]
&self,
ctx: &mut Context,
signing_key_id: Option<&str>
) -> Result<Key, Error>
pub fn read_fingerprint_file(
&self,
fpr: &str,
gpg_keys_dir: &Path
) -> Result<(PathBuf, Vec<u8>), Error>
[src]
&self,
fpr: &str,
gpg_keys_dir: &Path
) -> Result<(PathBuf, Vec<u8>), Error>
pub fn reencrypt(
&self,
ctx: &mut Context,
model: &TrustModel,
gpg_keys_dir: Option<&Path>,
has_multiple_partitions: bool,
output: &mut Write
) -> Result<(), Error>
[src]
&self,
ctx: &mut Context,
model: &TrustModel,
gpg_keys_dir: Option<&Path>,
has_multiple_partitions: bool,
output: &mut Write
) -> Result<(), Error>
impl Vault
[src]
pub fn init(
secrets: &Path,
gpg_key_ids: &[String],
gpg_keys_dir: &Path,
recipients_file: &Path,
vault_path: &Path,
name: Option<String>,
trust_model: Option<TrustModel>,
auto_import: Option<bool>,
output: &mut Write
) -> Result<Self, Error>
[src]
secrets: &Path,
gpg_key_ids: &[String],
gpg_keys_dir: &Path,
recipients_file: &Path,
vault_path: &Path,
name: Option<String>,
trust_model: Option<TrustModel>,
auto_import: Option<bool>,
output: &mut Write
) -> Result<Self, Error>
impl Vault
[src]
pub fn edit(
&self,
path: &Path,
editor: &Path,
mode: &CreateMode,
try_encrypt: bool,
output: &mut Write
) -> Result<(), Error>
[src]
&self,
path: &Path,
editor: &Path,
mode: &CreateMode,
try_encrypt: bool,
output: &mut Write
) -> Result<(), Error>
pub fn decrypt(&self, path: &Path, w: &mut Write) -> Result<PathBuf, Error>
[src]
pub fn remove(&self, specs: &[PathBuf], output: &mut Write) -> Result<(), Error>
[src]
pub fn encrypt_buffer(
&self,
input: &[u8],
gpg_keys_dir: Option<&Path>,
output: &mut Write
) -> Result<Vec<u8>, Error>
[src]
&self,
input: &[u8],
gpg_keys_dir: Option<&Path>,
output: &mut Write
) -> Result<Vec<u8>, Error>
pub fn partition_by_owned_path(
&self,
path: PathBuf
) -> Result<(&Vault, PathBuf), Error>
[src]
&self,
path: PathBuf
) -> Result<(&Vault, PathBuf), Error>
pub fn partition_by_owned_spec(
&self,
spec: VaultSpec
) -> Result<(&Vault, VaultSpec), Error>
[src]
&self,
spec: VaultSpec
) -> Result<(&Vault, VaultSpec), Error>
pub fn partition_by_spec(
&self,
spec: &VaultSpec
) -> Result<(&Vault, VaultSpec), Error>
[src]
&self,
spec: &VaultSpec
) -> Result<(&Vault, VaultSpec), Error>
pub fn encrypt(
&self,
specs: &[VaultSpec],
mode: WriteMode,
dst_mode: Destination,
output: &mut Write
) -> Result<(), Error>
[src]
&self,
specs: &[VaultSpec],
mode: WriteMode,
dst_mode: Destination,
output: &mut Write
) -> Result<(), Error>
impl Vault
[src]
pub fn all_in_order(&self) -> Vec<&Vault>
[src]
pub fn serialize(&self) -> Result<(), Error>
[src]
pub fn partition_index<'a, I>(
selector: &str,
partitions: I,
leader_index: Option<usize>
) -> Result<usize, Error> where
I: IntoIterator<Item = &'a Vault>,
[src]
selector: &str,
partitions: I,
leader_index: Option<usize>
) -> Result<usize, Error> where
I: IntoIterator<Item = &'a Vault>,
pub fn remove_partition(
&mut self,
selector: &str,
output: &mut Write
) -> Result<(), Error>
[src]
&mut self,
selector: &str,
output: &mut Write
) -> Result<(), Error>
pub fn add_partition(
&mut self,
path: &Path,
name: Option<&str>,
gpg_key_ids: &[String],
recipients_file: Option<&Path>,
output: &mut Write
) -> Result<(), Error>
[src]
&mut self,
path: &Path,
name: Option<&str>,
gpg_key_ids: &[String],
recipients_file: Option<&Path>,
output: &mut Write
) -> Result<(), Error>
Trait Implementations
impl Debug for Vault
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for Vault
[src]
fn eq(&self, __arg_0: &Vault) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Vault) -> bool
[src]
This method tests for !=
.
impl Eq for Vault
[src]
impl Clone for Vault
[src]
fn clone(&self) -> Vault
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Hash for Vault
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more