55 lines
1.9 KiB
Rust
55 lines
1.9 KiB
Rust
use phf::phf_map;
|
|
|
|
pub struct AirlineDefinition<'a> {
|
|
pub iata_code: &'a str,
|
|
pub name: &'a str,
|
|
pub boarding_policy: &'a str,
|
|
pub seat_class_policy: &'a str,
|
|
|
|
pub boarding_pass_background_colour: &'a str,
|
|
|
|
pub frequent_flyer_program_name: Option<&'a str>,
|
|
|
|
pub logo_url: &'a str,
|
|
pub alliance_logo_url: Option<&'a str>,
|
|
pub hero_image_logo_url: Option<&'a str>,
|
|
pub boarding_privilege_logo_url: Option<&'a str>,
|
|
}
|
|
|
|
pub const TSA_PRECHECK_LOGO: &str = "https://p.lukegb.com/raw/MiserablyDirectPiglet.jpg";
|
|
|
|
pub static AIRLINE_DATA: phf::Map<&'static str, AirlineDefinition<'static>> = phf_map! {
|
|
"VS" => AirlineDefinition{
|
|
iata_code: "VS",
|
|
name: "Virgin Atlantic",
|
|
boarding_policy: "GROUP_BASED",
|
|
seat_class_policy: "CABIN_BASED",
|
|
|
|
boarding_pass_background_colour: "#4f145b",
|
|
|
|
frequent_flyer_program_name: Some("Flying Club"),
|
|
|
|
logo_url: "https://p.lukegb.com/raw/VirtuallyCrispViper.png",
|
|
alliance_logo_url: None,
|
|
hero_image_logo_url: Some("https://p.lukegb.com/raw/FormerlyDistinctToad.png"),
|
|
boarding_privilege_logo_url: Some("https://p.lukegb.com/raw/DefinitelyVerifiedTitmouse.png"),
|
|
},
|
|
"BA" => AirlineDefinition{
|
|
iata_code: "BA",
|
|
name: "British Airways",
|
|
boarding_policy: "GROUP_BASED",
|
|
seat_class_policy: "CLASS_BASED",
|
|
|
|
//boarding_pass_background_colour: "#b38f47", // BA Gold
|
|
//alliance_logo_url: Some("https://p.lukegb.com/raw/UltimatelySunnyMacaque.png"),
|
|
|
|
boarding_pass_background_colour: "#ffffff", // BA no-status
|
|
alliance_logo_url: Some("https://p.lukegb.com/raw/MultiplyAptHedgehog.png"),
|
|
|
|
frequent_flyer_program_name: Some("Executive Club Gold"),
|
|
|
|
logo_url: "https://p.lukegb.com/raw/HorriblyGreatTitmouse.png",
|
|
hero_image_logo_url: None,
|
|
boarding_privilege_logo_url: Some("https://p.lukegb.com/raw/VerticallyJustKoala.png"),
|
|
},
|
|
};
|