statehub_api/v0/events.rs
1//
2// Copyright (c) 2021 RepliXio Ltd. All rights reserved.
3// Use is subject to license terms.
4//
5
6use chrono::{DateTime, Utc};
7use serde::Serialize;
8
9mod impls;
10
11#[derive(Serialize, Debug)]
12pub struct Report<T> {
13 pub reporter: Reporter,
14 pub timestamp: DateTime<Utc>,
15 pub event: T,
16}
17
18#[derive(Serialize, Debug)]
19pub struct Reporter {
20 pub name: String,
21 pub version: String,
22}
23
24#[cfg(test)]
25mod tests;