68 lines
1.4 KiB
Protocol Buffer
68 lines
1.4 KiB
Protocol Buffer
//COOPGO Groups Management gRPC service definition
|
|
|
|
syntax = "proto3";
|
|
|
|
option go_package = "git.coopgo.io/coopgo-platform/groups-management/grpcapi";
|
|
|
|
import "groups.proto";
|
|
|
|
service GroupsManagement {
|
|
rpc AddGroup(AddGroupRequest) returns (AddGroupResponse) {}
|
|
rpc GetGroup(GetGroupRequest) returns (GetGroupResponse) {}
|
|
rpc GetGroups(GetGroupsRequest) returns (GetGroupsResponse) {}
|
|
rpc GetGroupsBatch(GetGroupsBatchRequest) returns (GetGroupsBatchResponse) {}
|
|
rpc Subscribe(SubscribeRequest) returns (SubscribeResponse) {}
|
|
rpc Unsubscribe(UnsubscribeRequest) returns (UnsubscribeResponse) {}
|
|
}
|
|
|
|
message AddGroupRequest {
|
|
Group group = 1;
|
|
}
|
|
|
|
message AddGroupResponse {
|
|
Group group = 2;
|
|
}
|
|
|
|
message GetGroupRequest {
|
|
string id = 3;
|
|
string namespace = 4;
|
|
}
|
|
|
|
message GetGroupResponse {
|
|
Group group = 5;
|
|
}
|
|
|
|
message GetGroupsRequest {
|
|
repeated string namespaces = 6;
|
|
string member = 7;
|
|
}
|
|
|
|
message GetGroupsResponse {
|
|
repeated Group groups = 8;
|
|
}
|
|
|
|
message GetGroupsBatchRequest {
|
|
repeated string groupids = 10;
|
|
}
|
|
|
|
message GetGroupsBatchResponse {
|
|
repeated Group groups = 11;
|
|
}
|
|
|
|
message SubscribeRequest {
|
|
string groupid = 20;
|
|
string memberid = 21;
|
|
}
|
|
|
|
message SubscribeResponse {
|
|
bool ok = 22;
|
|
}
|
|
|
|
message UnsubscribeRequest {
|
|
string groupid = 30;
|
|
string memberid = 31;
|
|
}
|
|
|
|
message UnsubscribeResponse {
|
|
bool ok = 32;
|
|
} |