...
1syntax = "proto3";
2
3package upload;
4
5
6message Message {
7 string ID = 1;
8 string Type = 2;
9 bytes Payload = 3;
10}
11
12message SendMessageResult {
13 string MessageID = 1;
14 bool IsError = 2;
15 string ErrorCode = 3;
16 string ErrorDescription = 4;
17}
18
19message SendMessagesBatchRequest {
20 string BatchID = 1;
21 repeated Message Messages = 2;
22}
23
24message SendMessagesBatchResponse {
25 string BatchID = 1;
26 repeated SendMessageResult Results = 2;
27 bool HaveErrors = 3;
28}
29
30
31service MessagingService {
32 rpc SendMessage(Message) returns (SendMessageResult) {}
33 rpc SendMessagesBatch(SendMessagesBatchRequest) returns (SendMessagesBatchResponse) {}
34 rpc StreamMessage(stream Message) returns (stream SendMessageResult) {}
35}
View as plain text