strm_privacy_driver/test/config.rs
1use std::env;
2use std::env::VarError;
3
4#[derive(Debug, Serialize, Deserialize)]
5pub struct Config {
6 pub client_id: String,
7 pub client_secret: String,
8}
9
10impl Config {
11 pub fn init() -> Result<Self, VarError> {
12 let client_id = env::var("CLIENT_ID")?;
13 let client_secret = env::var("CLIENT_SECRET")?;
14 Ok(Self {
15 client_secret,
16 client_id,
17 })
18 }
19}