Skip to content

Commit 9a9f929

Browse files
default for created
1 parent 5d1e87c commit 9a9f929

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/alerts/alert_structs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ use crate::{
4949
/// - Empty strings → Default to current time with a warning
5050
/// - Missing fields → Default to current time
5151
/// - Valid timestamps → Parse normally
52-
pub(crate) fn deserialize_datetime_with_empty_string_fallback<'de, D>(
52+
pub fn deserialize_datetime_with_empty_string_fallback<'de, D>(
5353
deserializer: D,
5454
) -> Result<DateTime<Utc>, D::Error>
5555
where
@@ -81,7 +81,7 @@ where
8181

8282
/// Default function for created timestamp - returns current time
8383
/// This handles the case where created field is missing in deserialization
84-
pub(crate) fn default_created_time() -> DateTime<Utc> {
84+
pub fn default_created_time() -> DateTime<Utc> {
8585
Utc::now()
8686
}
8787

src/alerts/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub use crate::alerts::alert_enums::{
5151
pub use crate::alerts::alert_structs::{
5252
AlertConfig, AlertInfo, AlertRequest, AlertStateEntry, Alerts, AlertsInfo, AlertsInfoByState,
5353
AlertsSummary, BasicAlertFields, Context, DeploymentInfo, RollingWindow, StateTransition,
54-
ThresholdConfig,
54+
ThresholdConfig, default_created_time, deserialize_datetime_with_empty_string_fallback,
5555
};
5656
use crate::alerts::alert_traits::{AlertManagerTrait, AlertTrait};
5757
use crate::alerts::alert_types::ThresholdAlert;

0 commit comments

Comments
 (0)