[−][src]Struct sheesy_vault::Vault
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
Implementations
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 dyn 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 dyn 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 dyn Write
) -> Result<Vec<Key>, Error>
pub fn recipient_keys(
&self,
ctx: &mut Context,
gpg_keys_dir: Option<&Path>,
output: &mut dyn Write
) -> Result<Vec<Key>, Error>
[src]
&self,
ctx: &mut Context,
gpg_keys_dir: Option<&Path>,
output: &mut dyn 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(
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 dyn 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 dyn Write
) -> Result<Self, 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 dyn Write
) -> Result<(), Error>
[src]
&mut self,
selector: &str,
output: &mut dyn Write
) -> Result<(), Error>
pub fn add_partition(
&mut self,
path: &Path,
name: Option<&str>,
gpg_key_ids: &[String],
recipients_file: Option<&Path>,
output: &mut dyn Write
) -> Result<(), Error>
[src]
&mut self,
path: &Path,
name: Option<&str>,
gpg_key_ids: &[String],
recipients_file: Option<&Path>,
output: &mut dyn 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 dyn Write
) -> Result<(), Error>
[src]
&self,
gpg_key_ids: &[String],
sign: SigningMode,
signing_key_id: Option<&str>,
partitions: &[String],
output: &mut dyn 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 init_recipients(
&self,
gpg_key_ids: &[String],
output: &mut dyn Write
) -> Result<(), Error>
[src]
&self,
gpg_key_ids: &[String],
output: &mut dyn Write
) -> Result<(), Error>
pub fn print_recipients(
&self,
output: &mut dyn Write,
error: &mut dyn Write
) -> Result<(), Error>
[src]
&self,
output: &mut dyn Write,
error: &mut dyn Write
) -> Result<(), Error>
impl Vault
[src]
pub fn remove_recipients(
&self,
gpg_key_ids: &[String],
partitions: &[String],
output: &mut dyn Write
) -> Result<(), Error>
[src]
&self,
gpg_key_ids: &[String],
partitions: &[String],
output: &mut dyn 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 dyn Write
) -> Result<Vec<String>, Error>
[src]
&self,
gpg_ctx: &mut Context,
gpg_keys_dir: &Path,
gpg_key_ids: &[String],
output: &mut dyn 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 dyn Write
) -> Result<(), Error>
[src]
&self,
ctx: &mut Context,
model: &TrustModel,
gpg_keys_dir: Option<&Path>,
has_multiple_partitions: bool,
output: &mut dyn Write
) -> Result<(), Error>
impl Vault
[src]
pub fn edit(
&self,
path: &Path,
editor: &Path,
mode: CreateMode,
try_encrypt: bool,
output: &mut dyn Write
) -> Result<(), Error>
[src]
&self,
path: &Path,
editor: &Path,
mode: CreateMode,
try_encrypt: bool,
output: &mut dyn Write
) -> Result<(), Error>
pub fn decrypt(&self, path: &Path, w: &mut dyn Write) -> Result<PathBuf, Error>
[src]
pub fn remove(
&self,
specs: &[PathBuf],
output: &mut dyn Write
) -> Result<(), Error>
[src]
&self,
specs: &[PathBuf],
output: &mut dyn Write
) -> Result<(), Error>
pub fn encrypt_buffer(
&self,
input: &[u8],
gpg_keys_dir: Option<&Path>,
output: &mut dyn Write
) -> Result<Vec<u8>, Error>
[src]
&self,
input: &[u8],
gpg_keys_dir: Option<&Path>,
output: &mut dyn 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 dyn Write
) -> Result<(), Error>
[src]
&self,
specs: &[VaultSpec],
mode: WriteMode,
dst_mode: Destination,
output: &mut dyn Write
) -> Result<(), Error>
Trait Implementations
impl Clone for Vault
[src]
impl Debug for Vault
[src]
impl Default for Vault
[src]
impl<'de> Deserialize<'de> for Vault
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for Vault
[src]
impl Hash for Vault
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Vault> for Vault
[src]
impl Serialize for Vault
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for Vault
[src]
impl StructuralPartialEq for Vault
[src]
Auto Trait Implementations
impl RefUnwindSafe for Vault
impl Send for Vault
impl Sync for Vault
impl Unpin for Vault
impl UnwindSafe for Vault
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src where
Scheme: ApproxScheme,
[src]
Scheme: ApproxScheme,
type Err = NoError
The error type produced by a failed conversion.
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
[src]
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
[src]
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, Dst> ConvAsUtil<Dst> for T
[src]
fn approx(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, DefaultApprox>,
[src]
Self: ApproxInto<Dst, DefaultApprox>,
fn approx_by<Scheme>(self) -> Result<Dst, Self::Err> where
Scheme: ApproxScheme,
Self: ApproxInto<Dst, Scheme>,
[src]
Scheme: ApproxScheme,
Self: ApproxInto<Dst, Scheme>,
impl<T> ConvUtil for T
[src]
fn approx_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, DefaultApprox>,
[src]
Self: ApproxInto<Dst, DefaultApprox>,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Scheme: ApproxScheme,
Self: ApproxInto<Dst, Scheme>,
[src]
Scheme: ApproxScheme,
Self: ApproxInto<Dst, Scheme>,
fn into_as<Dst>(self) -> Dst where
Self: Into<Dst>,
[src]
Self: Into<Dst>,
fn try_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: TryInto<Dst>,
[src]
Self: TryInto<Dst>,
fn value_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: ValueInto<Dst>,
[src]
Self: ValueInto<Dst>,
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<Src> TryFrom<Src> for Src
[src]
type Err = NoError
The error type produced by a failed conversion.
fn try_from(src: Src) -> Result<Src, <Src as TryFrom<Src>>::Err>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<Src, Dst> TryInto<Dst> for Src where
Dst: TryFrom<Src>,
[src]
Dst: TryFrom<Src>,
type Err = <Dst as TryFrom<Src>>::Err
The error type produced by a failed conversion.
fn try_into(self) -> Result<Dst, <Src as TryInto<Dst>>::Err>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<Src> ValueFrom<Src> for Src
[src]
type Err = NoError
The error type produced by a failed conversion.
fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
[src]
impl<Src, Dst> ValueInto<Dst> for Src where
Dst: ValueFrom<Src>,
[src]
Dst: ValueFrom<Src>,