168 lines
3.8 KiB
Protocol Buffer
168 lines
3.8 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
option csharp_namespace = "Aurora.Services.Signal";
|
|
|
|
package signal;
|
|
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
import "google/protobuf/field_mask.proto";
|
|
import "google/protobuf/empty.proto";
|
|
|
|
|
|
service Signal {
|
|
//**************
|
|
//Party Resource
|
|
//**************
|
|
//Get Party
|
|
rpc ListParties(ListPartiesRequest) returns (ListPartiesResponse);
|
|
|
|
rpc GetParty(GetPartyRequest) returns (Party);
|
|
|
|
rpc UpdateParty(UpdatePartyRequest) returns (Party);
|
|
|
|
rpc CreateParty(CreatePartyRequest) returns (Party);
|
|
|
|
rpc DeleteParty(DeletePartyRequest) returns (google.protobuf.Empty);
|
|
|
|
|
|
//***************************
|
|
//EventSubscriptions Resource
|
|
//***************************
|
|
//List
|
|
rpc ListEventSubscriptions(ListEventSubscriptionsRequest) returns (ListEventSubscriptionsResponse);
|
|
|
|
//Create
|
|
rpc SubscribeToEvent(EventSubscriptionRequest) returns (EventSubscription);
|
|
|
|
//Delete
|
|
rpc DeleteEventSubscription(DeleteEventSubscriptionRequest) returns (google.protobuf.Empty);
|
|
|
|
//CUSTOM: Create EventSubscription List
|
|
rpc SubscribeToEvents(EventSubscriptionListRequest) returns (EventSubscriptionListResponse);
|
|
|
|
//CUSTOM: Delete all
|
|
rpc DeleteAllEventSubscriptions(DeleteAllEventSubscriptionsRequest) returns (google.protobuf.Empty);
|
|
|
|
//*****
|
|
//Event
|
|
//*****
|
|
//Get
|
|
rpc GetEventStream(GetEventsRequest) returns (stream BaseEvent) {};
|
|
}
|
|
|
|
message Party {
|
|
//The resource name of the party
|
|
string name = 1;
|
|
string id = 2;
|
|
string display_name = 3;
|
|
string description = 4;
|
|
string host_ip = 5;
|
|
google.protobuf.Timestamp created_on = 6;
|
|
}
|
|
|
|
message PartyListItem {
|
|
string name = 1;
|
|
string id = 2;
|
|
}
|
|
|
|
message ListPartiesRequest {
|
|
int32 page_size = 1;
|
|
string page_token = 2;
|
|
string order_by = 3;
|
|
SortDirection order_direction = 4;
|
|
}
|
|
|
|
enum SortDirection {
|
|
Asc = 0;
|
|
Desc = 1;
|
|
}
|
|
|
|
message ListPartiesResponse {
|
|
repeated PartyListItem parties = 1;
|
|
string next_page_token = 2;
|
|
}
|
|
|
|
message GetPartyRequest {
|
|
string party_id = 1;
|
|
}
|
|
|
|
message CreatePartyRequest {
|
|
string party_id = 1;
|
|
Party party = 2;
|
|
}
|
|
|
|
message DeletePartyRequest {
|
|
string party_id = 1;
|
|
}
|
|
|
|
message UpdatePartyRequest {
|
|
Party party = 1;
|
|
google.protobuf.FieldMask update_mask = 2;
|
|
}
|
|
|
|
/* Event Types */
|
|
enum EventType {
|
|
NewPartiesAvailable = 0;
|
|
}
|
|
|
|
message NewPartiesAvailableEvent {
|
|
}
|
|
|
|
message BaseEvent {
|
|
//Resource name of the event ?
|
|
string name = 1;
|
|
EventType event_type = 2;
|
|
oneof derivedEvent {
|
|
NewPartiesAvailableEvent new_parties_available_event = 3;
|
|
}
|
|
}
|
|
|
|
message EventSubscription {
|
|
EventType type = 2;
|
|
}
|
|
|
|
message ListEventSubscriptionsRequest {
|
|
//Resource name of parent to the subscription list (The member)
|
|
string parent = 1;
|
|
int32 page_size = 2;
|
|
string page_token = 3;
|
|
}
|
|
|
|
message ListEventSubscriptionsResponse {
|
|
repeated EventSubscription subscriptions = 1;
|
|
string next_page_token = 2;
|
|
}
|
|
|
|
message EventSubscriptionRequest {
|
|
//Resource name of the parent to the subscription list (The member)
|
|
string parent = 1;
|
|
EventSubscription event_subscription = 2;
|
|
}
|
|
|
|
message DeleteEventSubscriptionRequest {
|
|
//Resource name of the subscription to delete
|
|
string parent = 1;
|
|
EventType type = 2;
|
|
}
|
|
|
|
message EventSubscriptionListRequest {
|
|
//Resource name of the parent to the subscription list (The member)
|
|
string parent = 1;
|
|
repeated EventSubscription event_subscriptions = 2;
|
|
}
|
|
|
|
message EventSubscriptionListResponse {
|
|
repeated EventSubscription event_subscriptions = 1;
|
|
}
|
|
|
|
message DeleteAllEventSubscriptionsRequest {
|
|
//Resource name of the parent to the subscription list (the member)
|
|
string parent = 1;
|
|
}
|
|
|
|
message GetEventsRequest {
|
|
//Resource name of the parent to the event stream (the member)
|
|
string parent = 1;
|
|
}
|