mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-08-06 16:02:17 +00:00
22 lines
603 B
Rust
22 lines
603 B
Rust
![]() |
use flowy_derive::ProtoBuf_Enum;
|
||
|
use flowy_notification::NotificationBuilder;
|
||
|
|
||
|
const OBSERVABLE_SOURCE: &str = "storage";
|
||
|
|
||
|
#[derive(ProtoBuf_Enum, Debug, Default)]
|
||
|
pub(crate) enum StorageNotification {
|
||
|
#[default]
|
||
|
FileStorageLimitExceeded = 0,
|
||
|
}
|
||
|
|
||
|
impl std::convert::From<StorageNotification> for i32 {
|
||
|
fn from(notification: StorageNotification) -> Self {
|
||
|
notification as i32
|
||
|
}
|
||
|
}
|
||
|
|
||
|
#[tracing::instrument(level = "trace")]
|
||
|
pub(crate) fn make_notification(ty: StorageNotification) -> NotificationBuilder {
|
||
|
NotificationBuilder::new("appflowy_file_storage_notification", ty, OBSERVABLE_SOURCE)
|
||
|
}
|