84 lines
1.8 KiB
Protocol Buffer
84 lines
1.8 KiB
Protocol Buffer
//COOPGO Agenda gRPC service definition
|
|
|
|
syntax = "proto3";
|
|
|
|
option go_package = "git.coopgo.io/coopgo-platform/agenda/grpcapi";
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
import "google/protobuf/struct.proto";
|
|
import "events.proto";
|
|
|
|
service Agenda {
|
|
rpc CreateEvent(CreateEventRequest) returns (CreateEventResponse) {}
|
|
rpc GetEvent(GetEventRequest) returns (GetEventResponse) {}
|
|
rpc GetEvents(GetEventsRequest) returns (GetEventsResponse) {}
|
|
rpc DeleteEvent(DeleteEventRequest) returns (DeleteEventResponse) {}
|
|
|
|
rpc SubscribeEvent(SubscribeEventRequest) returns (SubscribeEventResponse) {}
|
|
rpc UnsubscribeEvent(UnsubscribeEventRequest) returns (UnsubscribeEventResponse) {}
|
|
rpc DeleteSubscription(DeleteSubscriptionRequest) returns (DeleteSubscriptionResponse) {}
|
|
}
|
|
|
|
message CreateEventRequest {
|
|
Event event = 1;
|
|
}
|
|
|
|
message CreateEventResponse {
|
|
Event event = 2;
|
|
}
|
|
|
|
message GetEventRequest {
|
|
string id = 3;
|
|
}
|
|
|
|
message GetEventResponse {
|
|
Event event = 4;
|
|
}
|
|
|
|
message DeleteEventRequest {
|
|
string id = 5;
|
|
}
|
|
|
|
message DeleteEventResponse {
|
|
bool ok = 6;
|
|
}
|
|
|
|
message GetEventsRequest {
|
|
repeated string namespaces = 10;
|
|
google.protobuf.Timestamp mindate = 11;
|
|
google.protobuf.Timestamp maxdate = 12;
|
|
|
|
}
|
|
|
|
message GetEventsResponse {
|
|
repeated Event events = 13;
|
|
}
|
|
|
|
message SubscribeEventRequest {
|
|
string subscriber = 20;
|
|
string eventid = 21;
|
|
google.protobuf.Struct data = 22;
|
|
}
|
|
|
|
message SubscribeEventResponse {
|
|
bool ok = 29;
|
|
}
|
|
|
|
message UnsubscribeEventRequest {
|
|
string subscriber = 30;
|
|
string eventid = 31;
|
|
}
|
|
|
|
message UnsubscribeEventResponse {
|
|
bool ok = 39;
|
|
}
|
|
|
|
message DeleteSubscriptionRequest {
|
|
string subscriber = 32;
|
|
string eventid = 33;
|
|
google.protobuf.Struct data = 34;
|
|
}
|
|
|
|
message DeleteSubscriptionResponse {
|
|
bool ok = 41;
|
|
} |