2019-07-07 21:12:13 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package Aurora.Proto.Events;
|
|
|
|
|
|
|
|
import "Proto/general.proto";
|
|
|
|
import "Proto/party.proto";
|
|
|
|
|
|
|
|
service RemoteEventService {
|
|
|
|
//Party Service
|
2019-07-12 15:34:06 +00:00
|
|
|
rpc GetEvents(EventsRequest) returns (stream BaseEvent) {};
|
2019-07-07 21:12:13 +00:00
|
|
|
rpc SubscribeToEvents(SubscribeRequest) returns(SubscriptionResponse);
|
|
|
|
rpc UnsubscribeFromEvents(UnsubscribeRequest) returns (SubscriptionResponse);
|
|
|
|
rpc UnsubscribeFromAll(UnsubscribeAllRequest) returns (SubscriptionResponse);
|
|
|
|
}
|
|
|
|
|
2019-07-12 15:34:06 +00:00
|
|
|
message EventsRequest {
|
|
|
|
string clientId = 1;
|
|
|
|
}
|
|
|
|
|
2019-07-07 21:12:13 +00:00
|
|
|
/* Subscription messages */
|
|
|
|
message SubscribeRequest {
|
|
|
|
repeated EventType eventTypes = 1;
|
2019-07-12 15:34:06 +00:00
|
|
|
string clientId = 2;
|
2019-07-07 21:12:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message UnsubscribeRequest {
|
|
|
|
repeated EventType eventTypes = 1;
|
2019-07-12 15:34:06 +00:00
|
|
|
string clientId = 2;
|
2019-07-07 21:12:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message UnsubscribeAllRequest {
|
2019-07-12 15:34:06 +00:00
|
|
|
string clientId = 1;
|
2019-07-07 21:12:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message SubscriptionResponse {
|
|
|
|
bool successful = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Event Types */
|
|
|
|
enum EventType {
|
|
|
|
PartyMemberJoined = 0;
|
|
|
|
PartyMemberLeft = 1;
|
|
|
|
}
|
|
|
|
message BaseEvent {
|
|
|
|
EventType eventType = 1;
|
2019-07-12 15:34:06 +00:00
|
|
|
string clientKey = 2;
|
|
|
|
|
2019-07-07 21:12:13 +00:00
|
|
|
oneof derivedEvent {
|
2019-07-12 15:34:06 +00:00
|
|
|
PartyMemberJoinedEvent partyMemberJoinedEvent = 3;
|
|
|
|
PartyMemberLeftEvent partyMemberLeftEvent = 4;
|
2019-07-07 21:12:13 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message PartyMemberJoinedEvent {
|
2019-07-12 15:34:06 +00:00
|
|
|
Aurora.Proto.Party.PartyMember member = 3;
|
2019-07-07 21:12:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message PartyMemberLeftEvent {
|
2019-07-12 15:34:06 +00:00
|
|
|
Aurora.Proto.Party.PartyMember member = 3;
|
2019-07-07 21:12:13 +00:00
|
|
|
}
|