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
31
32
33
34
35
36
#![deny(unsafe_code)]
#![deny(missing_docs)]
#![deny(missing_doc_code_examples)]

//! # SchemeGuardian
//! Secrets Authrorization, Authentication, Verification and Encryption Manager with Key-Value Storage
//! 

use lazy_static::*;
use secrecy::Secret;

pub use global::{Role, Target, SGSecret};
    /// Contains global types and methods
pub mod global;
pub use secrets::{secrets_engine, passphrase_engine, csprng, branca_engine, Lease, auth_storage};
    /// secrets module
pub mod secrets;

    /// Module containing constants that live for the entirety of the program
pub mod sg_statics;

pub use errors::SGError;
    /// Module containing error handling using failure for the Rust `?` type
pub mod errors;
    

#[macro_export]
lazy_static! {
        /// Create a static for branca token generation secret key for branca tokens
   pub static ref SG_SECRET_KEYS: Secret<sg_statics::SgTomlSecrets> = {
       sg_statics::SGConfig::new().secrets()
   };
}

    // Secrets engine handles Authenticate/Authorize, Create, Read, Update and Delete (ACRUD) for all secrets