71 lines
1.4 KiB
Protocol Buffer
71 lines
1.4 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 "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) {}
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
message SubscribeEventResponse {
|
|
bool ok = 22;
|
|
}
|
|
|
|
message UnsubscribeEventRequest {
|
|
string subscriber = 30;
|
|
string eventid = 31;
|
|
}
|
|
|
|
message UnsubscribeEventResponse {
|
|
bool ok = 32;
|
|
} |