First set of changes to use config file instead of hard-coded settings.
This commit is contained in:
+19
-1
@@ -1,11 +1,29 @@
|
||||
use std::collections::{HashMap, HashSet};
|
||||
|
||||
use gtfs_structures::{Agency, Calendar, CalendarDate, RawStopTime, RawTrip, Route, Stop};
|
||||
|
||||
// This is to store the preferences for the GTFS(-R) side of the code.
|
||||
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Preferences {
|
||||
#[serde(rename = "routes")]
|
||||
pub route_numbers: HashSet<String>,
|
||||
|
||||
#[serde(rename = "stops")]
|
||||
pub stop_codes: HashSet<String>,
|
||||
|
||||
#[serde(rename = "data-folder")]
|
||||
pub data_folder: String,
|
||||
|
||||
#[serde(rename = "gtfs-url")]
|
||||
pub gtfs_url: String,
|
||||
|
||||
#[serde(rename = "realtime-url")]
|
||||
pub realtime_url: String,
|
||||
|
||||
#[serde(rename = "realtime-api-key")]
|
||||
pub realtime_api_key: String,
|
||||
|
||||
#[serde(rename = "refresh-seconds")]
|
||||
pub refresh_seconds: u32,
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user