Feat: add vault module
This commit is contained in:
22
vault/src/session.rs
Normal file
22
vault/src/session.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
//! Session manager for the vault crate (optional)
|
||||
|
||||
use crate::data::KeyspaceData;
|
||||
use std::collections::HashMap;
|
||||
|
||||
pub struct SessionManager {
|
||||
unlocked_keyspaces: HashMap<String, KeyspaceData>,
|
||||
current_keyspace: Option<String>,
|
||||
current_keypair: Option<String>,
|
||||
// ...
|
||||
}
|
||||
|
||||
impl SessionManager {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
unlocked_keyspaces: HashMap::new(),
|
||||
current_keyspace: None,
|
||||
current_keypair: None,
|
||||
}
|
||||
}
|
||||
// ... methods for unlock, lock, select, timeout, etc.
|
||||
}
|
||||
Reference in New Issue
Block a user