//! Reshape raw stored events into the presentation shape consumed by the UI. //! //! Storage holds the upstream payload verbatim; transformation lives here so //! the rendering can evolve without re-fetching upstream data. use moments_entities::{Event, Source, TimelineItem}; pub mod blog; mod bugzilla; mod gitea; mod github; mod hg; pub fn reshape(event: &Event) -> TimelineItem { match event.source { Source::Github => github::reshape(event), Source::Gitea => gitea::reshape(event), Source::Hg => hg::reshape(event), Source::Bugzilla => bugzilla::reshape(event), Source::Blog => blog::reshape(event), } }