Skip to main content

OnePasswordDriver

Struct OnePasswordDriver 

Source
pub struct OnePasswordDriver { /* private fields */ }

Implementations§

Source§

impl OnePasswordDriver

Source

pub fn new(token: TokenSource) -> OnePasswordDriver

op from $ISB_OP_BIN, else the first op on $PATH.

Source

pub fn with_binary(self, op: impl Into<PathBuf>) -> Self

Trait Implementations§

Source§

impl Driver for OnePasswordDriver

Source§

fn list(&self, _org: &OrgId) -> Result<Vec<SecretMeta>>

A vault is not this org’s to enumerate: references are listed where they are used (stacks), not here.

Source§

fn name(&self) -> &str

The name compose files and --driver use.
Source§

fn get(&self, org: &OrgId, name: &str) -> Result<(Vec<u8>, u64)>

The value and its version.
Source§

fn version(&self, org: &OrgId, name: &str) -> Result<u64>

The current version only: cheap, for polling.
Source§

fn inspect(&self, org: &OrgId, name: &str) -> Result<SecretMeta>

Source§

fn create( &self, org: &OrgId, name: &str, _value: &[u8], _labels: &BTreeMap<String, String>, ) -> Result<SecretMeta>

A new secret at version 1; fails if it exists.
Source§

fn set(&self, org: &OrgId, name: &str, _value: &[u8]) -> Result<u64>

A new value; returns the new version. Creates the secret if missing.
Source§

fn delete(&self, org: &OrgId, name: &str) -> Result<()>

Source§

fn refresh(&self, org: &OrgId, name: &str) -> Result<SecretMeta>

Re-read the value from its source now (external drivers cache and poll). A no-op for drivers that are their own source.
Source§

fn reencrypt(&self, _org: Option<&OrgId>) -> Result<usize>

Re-encrypt every value (in one org, or all) to the current recipients. Returns how many. A no-op for drivers that do not encrypt.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V