-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkeys.rs
30 lines (25 loc) · 1.09 KB
/
keys.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//! Contains all valid keys to access the DB values
pub mod config {
//! All valid keys for config DB Tree
use comm_types::ipc::{HiveProbeData, HiveTargetData};
use hive_db::Key;
use lazy_static::lazy_static;
use crate::{config::AppConfig, testprogram::Testprogram};
lazy_static! {
pub static ref APP_CONFIG: Key<'static, AppConfig> = Key::new("app_config");
pub static ref TSS: Key<'static, [bool; 8]> = Key::new("tss");
pub static ref ASSIGNED_TARGETS: Key<'static, HiveTargetData> = Key::new("targets");
pub static ref ASSIGNED_PROBES: Key<'static, HiveProbeData> = Key::new("probes");
pub static ref TESTPROGRAMS: Key<'static, Vec<Testprogram>> = Key::new("testprograms");
pub static ref ACTIVE_TESTPROGRAM: Key<'static, String> = Key::new("active_testprogram");
}
}
pub mod credentials {
//! All valid keys for credentials DB Tree
use comm_types::auth::DbUser;
use hive_db::Key;
use lazy_static::lazy_static;
lazy_static! {
pub static ref USERS: Key<'static, Vec<DbUser>> = Key::new("users");
}
}