refactored notificatoin / tgsettle responsibility boundaries

This commit is contained in:
Stephan D
2026-02-19 18:56:59 +01:00
parent 47f0a3d890
commit 2fd8a6ebb7
73 changed files with 3705 additions and 681 deletions

View File

@@ -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;
}