snapshot of https://github.com/ThreeDotsLabs/watermill.git (master, 2026-09-15; blobs > 131072B omitted)
Some checks failed
master / ci (push) Failing after 0s
Some checks failed
master / ci (push) Failing after 0s
This commit is contained in:
53
_examples/basic/6-cqrs-ordered-events/proto/messages.proto
Normal file
53
_examples/basic/6-cqrs-ordered-events/proto/messages.proto
Normal file
@@ -0,0 +1,53 @@
|
||||
syntax = "proto3";
|
||||
package main;
|
||||
|
||||
option go_package = "./main";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
message MessageMetadata {
|
||||
string partition_key = 1;
|
||||
google.protobuf.Timestamp created_at = 2;
|
||||
}
|
||||
|
||||
// Commands
|
||||
message Subscribe {
|
||||
MessageMetadata metadata = 1;
|
||||
|
||||
string subscriber_id = 2;
|
||||
string email = 3;
|
||||
}
|
||||
|
||||
message Unsubscribe {
|
||||
MessageMetadata metadata = 1;
|
||||
|
||||
string subscriber_id = 2;
|
||||
}
|
||||
|
||||
message UpdateEmail {
|
||||
MessageMetadata metadata = 1;
|
||||
|
||||
string subscriber_id = 2;
|
||||
string new_email = 3;
|
||||
}
|
||||
|
||||
// Events
|
||||
message SubscriberSubscribed {
|
||||
MessageMetadata metadata = 1;
|
||||
|
||||
string subscriber_id = 2;
|
||||
string email = 3;
|
||||
}
|
||||
|
||||
message SubscriberUnsubscribed {
|
||||
MessageMetadata metadata = 1;
|
||||
|
||||
string subscriber_id = 2;
|
||||
}
|
||||
|
||||
message SubscriberEmailUpdated {
|
||||
MessageMetadata metadata = 1;
|
||||
|
||||
string subscriber_id = 2;
|
||||
string new_email = 3;
|
||||
}
|
||||
Reference in New Issue
Block a user