aurora/aurora-proto/Proto/signal.proto

168 lines
3.8 KiB
Protocol Buffer
Raw Permalink Normal View History

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