Add support for a configuration file
This commit is contained in:
		
							parent
							
								
									a34dbb7fd3
								
							
						
					
					
						commit
						b9664b43c8
					
				
					 10 changed files with 505 additions and 63 deletions
				
			
		
							
								
								
									
										21
									
								
								src/config.rs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								src/config.rs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,21 @@
 | 
			
		|||
use std::path::PathBuf;
 | 
			
		||||
 | 
			
		||||
use serde::{Deserialize, Serialize};
 | 
			
		||||
 | 
			
		||||
#[derive(Deserialize, Serialize)]
 | 
			
		||||
pub(crate) struct Config {
 | 
			
		||||
    pub(crate) server_url: String,
 | 
			
		||||
    pub(crate) api_key: String,
 | 
			
		||||
 | 
			
		||||
    pub(crate) people: People,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#[derive(Deserialize, Serialize)]
 | 
			
		||||
pub(crate) struct People {
 | 
			
		||||
    pub(crate) sync_date_of_births: SyncDateOfBirths,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#[derive(Deserialize, Serialize)]
 | 
			
		||||
pub(crate) struct SyncDateOfBirths {
 | 
			
		||||
    pub(crate) vcard: PathBuf,
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue