-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheventstore.proto
75 lines (66 loc) · 1.42 KB
/
eventstore.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
syntax = "proto3";
package modelingEvolution.eventStore.grpcProxy;
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
import "google/protobuf/empty.proto";
service GrpcEventStoreProxy {
rpc ReadStream (ReadReq) returns (stream ReadRsp);
rpc WriteStream (WriteReq) returns (WriteRsp);
rpc WriteBlob (stream BlobChunk) returns (BlobData);
}
message BlobChunk {
int32 i = 1;
bytes data = 2;
}
message BlobData {
string url = 1;
int64 writtenBytes = 2;
}
message ReadReq {
//google.protobuf.Timestamp time = 1;
oneof schema {
GenericProjectionSchema genericSchema = 1;
EventTypeProjectionSchema eventTypeSchema = 2;
}
bool fromBeginning = 3;
bool isPersistent = 4;
repeated string sourceEventTypes = 5;
}
message GenericProjectionSchema {
string name = 1;
string streamName = 2;
string script = 3;
}
message EventTypeProjectionSchema
{
string name = 1;
repeated string eventTypes = 2;
}
message ReadRsp {
//google.protobuf.Timestamp time = 1;
UUID typeId = 1;
uint64 seq = 2;
bytes data = 3;
repeated MetadataProperty metadataProps = 4;
}
message MetadataProperty
{
UUID id = 1;
bytes data = 2;
}
message UUID {
bytes value = 1;
}
message WriteReq {
UUID streamId = 1;
UUID typeId = 2;
//uint64 seq = 3;
bytes data = 4;
string version = 5;
//bytes metadata = 5;
}
message WriteRsp {
//uint64 seq = 1;
uint64 status = 1;
}