[−][src]Struct runkr::Runkr
Methods
impl Runkr
[src]
pub fn new(address: &str) -> Runkr
[src]
pub fn new_text_secret(
&mut self,
secret_name: &str,
content: &str
) -> Result<Value, String>
[src]
&mut self,
secret_name: &str,
content: &str
) -> Result<Value, String>
new_text_secret creates and writes a secret
Returns
json like object decoded into a Response object
{
"msg" : "<feedback message>",
}
pub fn new_ssh_key(&mut self, secret_name: &str) -> Result<Value, String>
[src]
new_ssh_key creates a new ecdsa key and stores it as a secret
Returns
json like object decoded into a Response object
{
"msg" : "<feedback message>",
}
pub fn new_file_secret(
&mut self,
secret_name: &str,
file_path: &str
) -> Result<Value, String>
[src]
&mut self,
secret_name: &str,
file_path: &str
) -> Result<Value, String>
new_file_secret creates a secret with the content of an specified file
Returns
json like object decoded into a Response object
{
"msg" : "<feedback message>",
}
pub fn new_group(&mut self, group_name: &str) -> Result<Value, String>
[src]
new_group creates a new group
Returns
json like object decoded into a Response object
{
"msg" : "<feedback message>",
}
pub fn import_ssh_key(
&mut self,
secret_name: &str,
file_path: &str
) -> Result<Value, String>
[src]
&mut self,
secret_name: &str,
file_path: &str
) -> Result<Value, String>
import_ssh_key uploads an ecdsa key to Bunkr
Returns
json like object decoded into a Response object
{
"msg" : "<feedback message>",
}
pub fn list_secrets(&mut self) -> Result<Value, String>
[src]
list_secrets retrieves Bunkr stored secret names and hierarchy
Returns
json like object decoded into a Response object
{
"msg" : "",
"content" : {
"secrets" : [string], # secrets names
"devices" : {
"<device name>" : [string], # secrets names
...
},
"groups" : {
"<group name>" : [string], # secrets names
...
},
}
}
pub fn list_devices(&mut self) -> Result<Value, String>
[src]
list_devices retrieves Bunkr attached devices
Returns
json like object decoded into a Response object
{
"msg" : "",
"devices" : [string] # devices names
}
pub fn list_groups(&mut self) -> Result<Value, String>
[src]
list_groups retrieves Bunkr attached devices
Returns
json like object decoded into a Response object
{
"msg" : "",
"groups" : [string] # group names
}
pub fn send_device(
&mut self,
device_name: Option<&str>
) -> Result<Value, String>
[src]
&mut self,
device_name: Option<&str>
) -> Result<Value, String>
send_device generates a device sharing link/s
Returns
json like object decoded into a Response object
{
"msg" : "<feedback message>",
"url_raw" : "<shared static url>",
"url_short" : "<shared short url>",
}
pub fn receive_device(&mut self, url: &str) -> Result<Value, String>
[src]
receive_device links a links a new device to Bunkr
Returns
json like object decoded into a Response object
{
"msg" : "<feedback message>",
}
pub fn remove_device(&mut self, device_name: &str) -> Result<Value, String>
[src]
remove_device removes a device link from Bunkr
Returns
json like object decoded into a Response object
{
"msg" : "<feedback message>",
}
pub fn remove_local(&mut self, secret_name: &str) -> Result<Value, String>
[src]
remove_local removes a secret reference from Bunkr (it does not delete the secret)
Returns
json like object decoded into a Response object
{
"msg" : "<feedback message>",
}
pub fn rename(
&mut self,
old_name: &str,
new_name: &str
) -> Result<Value, String>
[src]
&mut self,
old_name: &str,
new_name: &str
) -> Result<Value, String>
rename a secret, group or device
Returns
json like object decoded into a Response object
{
"msg" : "<feedback message>",
}
pub fn create(
&mut self,
secret_name: &str,
secret_type: SecretType
) -> Result<Value, String>
[src]
&mut self,
secret_name: &str,
secret_type: SecretType
) -> Result<Value, String>
create a new secret
Returns
json like object decoded into a Response object
{
"msg" : "<feedback message>",
}
pub fn write(
&mut self,
secret_name: &str,
content: &str,
content_type: Option<ContentType>
) -> Result<Value, String>
[src]
&mut self,
secret_name: &str,
content: &str,
content_type: Option<ContentType>
) -> Result<Value, String>
write dumps content into the specified secret If content_type is None, b64 mode is use by default
Returns
json like object decoded into a Response object
{
"msg" : "<feedback message>",
}
pub fn access(
&mut self,
secret_name: &str,
mode: AccessMode,
fpath: Option<&str>
) -> Result<Value, String>
[src]
&mut self,
secret_name: &str,
mode: AccessMode,
fpath: Option<&str>
) -> Result<Value, String>
access the content of a secret It can retrieve the content in plain text, b64 or dump it into a file
Returns
json like object decoded into a Response object
{
"msg" : "<feedback message>",
"mode" : "<access mode>"
"content" : "<secret content just for (b64 and text)>",
}
pub fn grant(
&mut self,
target: &str,
secret_name: &str,
admin: bool
) -> Result<Value, String>
[src]
&mut self,
target: &str,
secret_name: &str,
admin: bool
) -> Result<Value, String>
grant command shares a secret to a device or group
Returns
json like object decoded into a Response object
{
"msg" : "<feedback message>",
"url_raw" : "<shared static url>",
"url_short" : "<shared short url>",
}
pub fn revoke(
&mut self,
target: &str,
secret_name: &str
) -> Result<Value, String>
[src]
&mut self,
target: &str,
secret_name: &str
) -> Result<Value, String>
revoke command removes a capability from a secret to the specified device or group
Returns
json like object decoded into a Response object
{
"msg" : "<feedback message>",
}
pub fn delete(&mut self, secret_name: &str) -> Result<Value, String>
[src]
delete specified secret
Returns
json like object decoded into a Response object
{
"msg" : "<feedback message>",
}
pub fn receive_capability(&mut self, url: &str) -> Result<Value, String>
[src]
receive_capability, load a capability into your Bunkr
Returns
json like object decoded into a Response object
{
"msg" : "<feedback message>",
}
pub fn reset_triples(&mut self, secret_name: &str) -> Result<Value, String>
[src]
reset_triples launches a reseting operation to synchronize the triples in a secret coalition
Returns
json like object decoded into a Response object
{
"msg" : "<feedback message>",
}
pub fn noop(&mut self, secret_name: &str) -> Result<Value, String>
[src]
noop performs a health status operation
Returns
json like object decoded into a Response object
{
"msg" : "<feedback message>",
}
pub fn secret_info(&mut self, secret_name: &str) -> Result<Value, String>
[src]
secret_info return public secret info for the specified secret
Returns
json like object decoded into a Response object
{
"msg" : "<feedback message>",
}
pub fn sign_ecdsa(
&mut self,
secret_name: &str,
hash_content: &str
) -> Result<Value, String>
[src]
&mut self,
secret_name: &str,
hash_content: &str
) -> Result<Value, String>
sign_ecdsa requests a signing with the specified secret content
Returns
json like object decoded into a Response object
{
"msg" : "<feedback message>",
"r" : "<R component of the signature>",
"s" : "<S component of the signature>",
}
pub fn ssh_public_data(&mut self, secret_name: &str) -> Result<Value, String>
[src]
ssh_public_data requests a signing with the specified secret content
Returns
json like object decoded into a Response object
{
"msg" : "<feedback message>",
"public_data" : {
"name" : "<secret name>",
"public_key" : "<b64 encoded public key>",
}
}
pub fn signin(
&mut self,
email: &str,
device_name: &str
) -> Result<Value, String>
[src]
&mut self,
email: &str,
device_name: &str
) -> Result<Value, String>
sigin performs a Bunkr signin process
Returns
json like object decoded into a Response object
{
"msg" : "<feedback message>",
}
pub fn confirm_signin(
&mut self,
email: &str,
code: &str
) -> Result<Value, String>
[src]
&mut self,
email: &str,
code: &str
) -> Result<Value, String>
confirm_signin verifies the sigin verification code to access the Bunkr
Returns
json like object decoded into a Response object
{
"msg" : "<feedback message>",
}
Auto Trait Implementations
impl Send for Runkr
impl Sync for Runkr
impl Unpin for Runkr
impl UnwindSafe for Runkr
impl RefUnwindSafe for Runkr
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[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<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<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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,