🚧 Adds rbw item struct
Signed-off-by: Ash Svitan <selfsigned-ash@proton.me>
This commit is contained in:
+7
-7
@@ -1,24 +1,24 @@
|
||||
use crate::sh;
|
||||
use std::io::{Error, ErrorKind};
|
||||
use serde::Deserialize;
|
||||
use std::io::{Error, ErrorKind};
|
||||
|
||||
const EXECUTABLE: &str = "pass-cli";
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
pub struct Vaults {
|
||||
pub vaults: Vec<Vault>
|
||||
pub vaults: Vec<Vault>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
pub struct Vault {
|
||||
pub name: String,
|
||||
pub vault_id: String,
|
||||
pub share_id: String
|
||||
pub share_id: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
pub struct Items {
|
||||
pub items: Vec<Item>
|
||||
pub items: Vec<Item>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
@@ -29,7 +29,7 @@ pub struct Item {
|
||||
pub content: ItemContent,
|
||||
pub state: String,
|
||||
pub create_time: String,
|
||||
pub modify_time: String
|
||||
pub modify_time: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
@@ -42,7 +42,7 @@ pub struct ItemContent {
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
pub struct ItemContentContent {
|
||||
pub Login: Option<ItemLogin>
|
||||
pub Login: Option<ItemLogin>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
@@ -51,7 +51,7 @@ pub struct ItemLogin {
|
||||
pub username: String,
|
||||
pub password: String,
|
||||
pub urls: Vec<String>,
|
||||
pub totp_uri: String
|
||||
pub totp_uri: String,
|
||||
}
|
||||
|
||||
pub fn check_pass() -> Result<(), Error> {
|
||||
|
||||
Reference in New Issue
Block a user