Skip to content

Commit

Permalink
Add mapper_msg filetype
Browse files Browse the repository at this point in the history
  • Loading branch information
vihu committed Jun 30, 2023
1 parent c4cc3ce commit ad055db
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions file_store/src/file_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ pub const INVALID_DATA_TRANSFER_SESSION_INGEST_REPORT: &str =
pub const VALID_DATA_TRANSFER_SESSION: &str = "valid_data_transfer_session";
pub const PRICE_REPORT: &str = "price_report";
pub const MOBILE_REWARD_SHARE: &str = "mobile_reward_share";
pub const MAPPER_MSG: &str = "mapper_msg";

#[derive(Debug, PartialEq, Eq, Clone, Serialize, Copy, strum::EnumCount)]
#[serde(rename_all = "snake_case")]
Expand Down Expand Up @@ -160,6 +161,7 @@ pub enum FileType {
SubscriberLocationReq,
SubscriberLocationIngestReport,
VerifiedSubscriberLocationIngestReport,
MapperMsg,
}

impl fmt::Display for FileType {
Expand Down Expand Up @@ -199,6 +201,7 @@ impl fmt::Display for FileType {
Self::ValidDataTransferSession => VALID_DATA_TRANSFER_SESSION,
Self::PriceReport => PRICE_REPORT,
Self::MobileRewardShare => MOBILE_REWARD_SHARE,
Self::MapperMsg => MAPPER_MSG,
};
f.write_str(s)
}
Expand Down Expand Up @@ -241,6 +244,7 @@ impl FileType {
Self::ValidDataTransferSession => VALID_DATA_TRANSFER_SESSION,
Self::PriceReport => PRICE_REPORT,
Self::MobileRewardShare => MOBILE_REWARD_SHARE,
Self::MapperMsg => MAPPER_MSG,
}
}
}
Expand Down Expand Up @@ -283,6 +287,7 @@ impl FromStr for FileType {
VALID_DATA_TRANSFER_SESSION => Self::ValidDataTransferSession,
PRICE_REPORT => Self::PriceReport,
MOBILE_REWARD_SHARE => Self::MobileRewardShare,
MAPPER_MSG => Self::MapperMsg,
_ => return Err(Error::from(io::Error::from(io::ErrorKind::InvalidInput))),
};
Ok(result)
Expand Down

0 comments on commit ad055db

Please sign in to comment.