-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathservices.proto
51 lines (34 loc) · 940 Bytes
/
services.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
syntax = "proto3";
package goChat;
// Defines the service between client and server.
service Chat {
rpc RouteChat(stream ChatMessage) returns (stream ChatMessage) {}
rpc UnRegister(ClientInfo) returns (Empty) {}
rpc Register(ClientInfo) returns (Empty) {}
rpc CreateGroup(GroupInfo) returns (Empty) {}
rpc JoinGroup(GroupInfo) returns (Empty) {}
rpc GetGroupList(Empty) returns (GroupList) {}
rpc GetGroupClientList(GroupInfo) returns (ClientList) {}
rpc GetClientList(Empty) returns (ClientList) {}
rpc LeaveRoom(GroupInfo) returns (Empty) {}
}
message Empty {
}
message ChatMessage {
string sender = 1;
string receiver = 2;
string message = 3;
}
message ClientInfo {
string sender = 1;
}
message GroupInfo {
string client = 1;
string groupName = 2;
}
message GroupList {
repeated string groups = 1;
}
message ClientList {
repeated string clients = 1;
}