refactored notificatoin / tgsettle responsibility boundaries
This commit is contained in:
@@ -4,19 +4,30 @@ import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "github.com/tech/sendico/pkg/generated/gmessaging";
|
||||
|
||||
// NotificationEvent identifies the type and action of an event for routing.
|
||||
message NotificationEvent {
|
||||
string type = 1; // NotificationType
|
||||
string action = 2; // NotificationAction
|
||||
// type is the notification category (e.g. "payment", "account").
|
||||
string type = 1;
|
||||
// action is the specific event action (e.g. "created", "settled").
|
||||
string action = 2;
|
||||
}
|
||||
|
||||
// EventMetadata carries provenance information for a published event.
|
||||
message EventMetadata {
|
||||
// sender identifies the originating service.
|
||||
string sender = 1;
|
||||
string message_id = 2;
|
||||
// message_id is the unique identifier of this event message.
|
||||
string message_id = 2;
|
||||
// timestamp is the time the event was published.
|
||||
google.protobuf.Timestamp timestamp = 3;
|
||||
}
|
||||
|
||||
// Envelope wraps a serialised event payload with routing and metadata.
|
||||
message Envelope {
|
||||
NotificationEvent event = 2; // Notification event with type and action
|
||||
bytes message_data = 3; // Serialized Protobuf message data
|
||||
EventMetadata metadata = 4; // Metadata about the event
|
||||
// event describes the notification type and action for routing.
|
||||
NotificationEvent event = 2;
|
||||
// message_data is the serialised protobuf payload.
|
||||
bytes message_data = 3;
|
||||
// metadata carries provenance information about the event.
|
||||
EventMetadata metadata = 4;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user