wooly-vault/src/vault.rs

21 lines
351 B
Rust
Raw Normal View History

2024-09-05 17:18:08 +02:00
use std::sync::Arc;
pub type VaultRef = Arc<Vault>;
#[derive(Debug, Clone, PartialEq)]
pub struct Vault {
secret: String,
}
impl Vault {
pub fn new(secret: &str) -> VaultRef {
let v = Self {
secret: secret.to_string(),
};
Arc::new(v)
}
pub fn secret(&self) -> &str {
&self.secret
}
}