aboutsummaryrefslogtreecommitdiffstats
path: root/src/db.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-04-18 04:06:36 -0400
committerJesse Luehrs <doy@tozt.net>2020-04-18 04:14:14 -0400
commitb3c69bf88d973af04433d450a659ef1581d813e2 (patch)
treecb84d2671d2d365f025d8b9bbd714368ed88ce35 /src/db.rs
parentf2e12534b876e73a0c7c4593acb23ac200529309 (diff)
downloadrbw-b3c69bf88d973af04433d450a659ef1581d813e2.tar.gz
rbw-b3c69bf88d973af04433d450a659ef1581d813e2.zip
stop using the api cipher struct publicly
Diffstat (limited to 'src/db.rs')
-rw-r--r--src/db.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/db.rs b/src/db.rs
index 95da739..6e73852 100644
--- a/src/db.rs
+++ b/src/db.rs
@@ -3,6 +3,14 @@ use crate::prelude::*;
use std::io::{Read as _, Write as _};
use tokio::io::{AsyncReadExt as _, AsyncWriteExt as _};
+#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]
+pub struct Entry {
+ pub name: String,
+ pub username: Option<String>,
+ pub password: Option<String>,
+ pub notes: Option<String>,
+}
+
#[derive(serde::Serialize, serde::Deserialize, Default, Debug)]
pub struct Db {
pub access_token: Option<String>,
@@ -11,7 +19,7 @@ pub struct Db {
pub iterations: Option<u32>,
pub protected_key: Option<String>,
- pub ciphers: Vec<crate::api::Cipher>,
+ pub entries: Vec<Entry>,
}
impl Db {