Struct teller_core::teller::Teller

source ·
pub struct Teller { /* private fields */ }

Implementations§

source§

impl Teller

source

pub async fn from_config(config: &Config) -> Result<Self>

Build from config

§Errors

This function will return an error if loading fails

source

pub async fn from_yaml(file: &Path) -> Result<Self>

Build from YAML

§Errors

This function will return an error if loading fails

source

pub async fn collect(&self) -> ProviderResult<Vec<KV>>

Collects kvs from all provider maps in the current configuration

§Errors

This function will return an error if IO fails

source

pub async fn put( &self, kvs: &[KV], map_id: &str, providers: &[String] ) -> Result<()>

Put a list of KVs into a list of providers, on a specified path

§Errors

This function will return an error if put fails

source

pub async fn delete( &self, keys: &[String], map_id: &str, providers: &[String] ) -> Result<()>

Delete a list of keys or a complete path for every provider in the list

§Errors

This function will return an error if delete fails

source

pub fn get_pathmap_on_provider( &self, map_id: &str, provider_name: &String ) -> Result<(&Box<dyn Provider + Send + Sync>, &PathMap)>

Get a provider and pathmap from configuration and registry

§Errors

This function will return an error if operation fails

source

pub async fn run<'a>(&self, cmd: &[&str], opts: &Opts<'a>) -> Result<Output>

Run an external command with provider based environment variables

§Errors

This function will return an error if command fails

source

pub async fn redact<R: BufRead, W: Write>( &self, reader: R, writer: W ) -> Result<()>

Redact streams

§Errors

This function will return an error if Is or collecting keys fails

source

pub async fn template(&self, template: &str) -> Result<String>

Populate a custom template with KVs

§Errors

This function will return an error if template rendering fails

source

pub async fn export<'a>(&self, format: &Format) -> Result<String>

Export KV data

§Errors

This function will return an error if export fails

source

pub fn scan(&self, root: &str, kvs: &[KV], opts: &Opts) -> Result<Vec<Match>>

Scan a folder recursively for secrets or values

§Errors

This function will return an error if IO fails

source

pub async fn copy( &self, from_provider: &str, from_map_id: &str, to_provider: &str, to_map_id: &str, replace: bool ) -> Result<()>

Copy from provider to target provider. Note: replace will first delete data at target, then copy.

§Errors

This function will return an error if copy fails

Auto Trait Implementations§

§

impl Freeze for Teller

§

impl !RefUnwindSafe for Teller

§

impl Send for Teller

§

impl Sync for Teller

§

impl Unpin for Teller

§

impl !UnwindSafe for Teller

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<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more