-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ondrej Prazak <[email protected]>
- Loading branch information
Ondrej Prazak
committed
Jan 26, 2024
1 parent
8774af6
commit 6c138c9
Showing
12 changed files
with
207 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
use public_key::Key; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Debug, Deserialize, Serialize)] | ||
pub struct DidData { | ||
did: String, | ||
verkey: Key, | ||
} | ||
|
||
impl DidData { | ||
pub fn new(did: &str, verkey: Key) -> Self { | ||
Self { | ||
did: did.into(), | ||
verkey, | ||
} | ||
} | ||
|
||
pub fn did(&self) -> &str { | ||
&self.did | ||
} | ||
|
||
pub fn verkey(&self) -> &Key { | ||
&self.verkey | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
use typed_builder::TypedBuilder; | ||
|
||
use crate::wallet::entry_tag::EntryTags; | ||
|
||
#[derive(Debug, Default, Clone, TypedBuilder)] | ||
pub struct Record { | ||
category: String, | ||
name: String, | ||
value: String, | ||
#[builder(default)] | ||
tags: EntryTags, | ||
} | ||
|
||
impl Record { | ||
pub fn value(&self) -> &str { | ||
&self.value | ||
} | ||
|
||
pub fn name(&self) -> &str { | ||
&self.name | ||
} | ||
|
||
pub fn category(&self) -> &str { | ||
&self.category | ||
} | ||
|
||
pub fn tags(&self) -> &EntryTags { | ||
&self.tags | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pub enum SearchFilter { | ||
JsonFilter(String), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.