plugin.proto 614 Bytes
Newer Older
“李磊”'s avatar
“李磊” committed
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
syntax = "proto3";

package proto;

service Plugin {
  rpc Call(Req) returns (Res) {}
  rpc SendFile(stream FileStream) returns (Res) {}
  rpc Chat(Req) returns (stream Res) {}
}

message Req {
  Header Header = 1;
  bytes Data = 2;
}

message Res {
  Header Header = 1;
  int32 Code = 2;
  string Desc = 3;
  bytes Data = 4;
}

message FileStream {
  Header Header = 1;
  string Name = 2;
  string Purpose = 3;
  int64 TotalSize = 4;
  int64 TotalPart = 5;
  int64 Part = 6;
  bytes Data = 7;
}

message Header {
  string UUID = 1;
  int64 Timestamp = 2;
  string From = 3;
  string To = 4;
  string Func = 5;
}