Initial commit
This commit is contained in:
71
grpcapi/agenda.proto
Normal file
71
grpcapi/agenda.proto
Normal file
@@ -0,0 +1,71 @@
|
||||
//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;
|
||||
}
|
||||
Reference in New Issue
Block a user