Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ service events {
message Event {
string ID = 1; // Event identifier
google.protobuf.Timestamp Timestamp = 2; // When the event occurred
enum EventType {
enum EventSeverity {
Normal = 0; // Default type is normal
Warning = 1; // The event was a warning
Error = 2; // The event was an error
}
EventType Type = 3; // What type of event it is (e.g., Warning, Normal)
string Reason = 4; // The reason for the event (e.g., BackupSucceeded, ShellProvisioned)
string Message = 5; // Message contains the specific information about the event
EventSeverity Severity = 3; // What type of event it is (e.g., Warning, Normal)
string Type = 4; // The reason for the event (e.g., BackupSucceeded, ShellProvisioned)
string Message = 5; // Message contains the specific information about the event
}

/**
Expand Down
12 changes: 6 additions & 6 deletions internal/server/mock/events/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@ var mockEvents = []*pb.Event{
{
Timestamp: timestamppb.New(time.Date(2025, 3, 1, 0, 0, 0, 0, time.UTC).Round(time.Minute)),
ID: "ABCDXXXX",
Type: pb.Event_Normal,
Reason: "ConfigSet",
Severity: pb.Event_Normal,
Type: "ConfigSet",
Message: "A config was set: api.key",
},
{
Timestamp: timestamppb.New(time.Date(2025, 2, 1, 0, 0, 0, 0, time.UTC).Round(time.Minute)),
ID: "ABCDYYYY",
Type: pb.Event_Warning,
Reason: "ErrorRate",
Severity: pb.Event_Warning,
Type: "ErrorRate",
Message: "Elevated error rate has been detected",
},
{
Timestamp: timestamppb.New(time.Date(2025, 1, 1, 0, 0, 0, 0, time.UTC).Round(time.Minute)),
ID: "ABCDZZZZ",
Type: pb.Event_Error,
Reason: "BackupFailed",
Severity: pb.Event_Error,
Type: "BackupFailed",
Message: "The following backup failed with the ID: xxxxxxxxxxxxxxxxx",
},
}
Expand Down
102 changes: 51 additions & 51 deletions pb/events.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.