2022-08-11 15:21:32 +00:00
|
|
|
//COOPGO Groups Management gRPC service definition
|
|
|
|
|
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
option go_package = "git.coopgo.io/coopgo-platform/groups-management/grpcapi";
|
|
|
|
|
|
|
|
import "groups.proto";
|
2022-12-19 08:13:56 +00:00
|
|
|
import "groupsmember.proto";
|
2022-08-11 15:21:32 +00:00
|
|
|
|
|
|
|
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) {}
|
2022-12-19 08:13:56 +00:00
|
|
|
//////////member
|
|
|
|
rpc AddGroupMember(AddGroupMemberRequest) returns (AddGroupMemberResponse) {}
|
|
|
|
rpc GetGroupMember(GetGroupMemberRequest) returns (GetGroupMemberResponse) {}
|
|
|
|
rpc GetGroupsMember(GetGroupsMemberRequest) returns (GetGroupsMemberResponse) {}
|
|
|
|
rpc GetGroupsBatchMember(GetGroupsBatchMemberRequest) returns (GetGroupsBatchMemberResponse) {}
|
|
|
|
rpc SubscribeMember(SubscribeMemberRequest) returns (SubscribeMemberResponse) {}
|
2022-08-11 15:21:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
2022-12-05 16:18:01 +00:00
|
|
|
string member = 7;
|
2022-08-11 15:21:32 +00:00
|
|
|
}
|
|
|
|
message GetGroupsResponse {
|
2022-12-05 16:18:01 +00:00
|
|
|
repeated Group groups = 8;
|
2022-08-11 15:21:32 +00:00
|
|
|
}
|
|
|
|
message GetGroupsBatchRequest {
|
2022-12-05 16:18:01 +00:00
|
|
|
repeated string groupids = 10;
|
2022-08-11 15:21:32 +00:00
|
|
|
}
|
|
|
|
message GetGroupsBatchResponse {
|
2022-12-05 16:18:01 +00:00
|
|
|
repeated Group groups = 11;
|
2022-08-11 15:21:32 +00:00
|
|
|
}
|
|
|
|
message SubscribeRequest {
|
2022-12-05 16:18:01 +00:00
|
|
|
string groupid = 20;
|
|
|
|
string memberid = 21;
|
2022-08-11 15:21:32 +00:00
|
|
|
}
|
|
|
|
message SubscribeResponse {
|
2022-12-05 16:18:01 +00:00
|
|
|
bool ok = 22;
|
2022-08-11 15:21:32 +00:00
|
|
|
}
|
|
|
|
message UnsubscribeRequest {
|
2022-12-05 16:18:01 +00:00
|
|
|
string groupid = 30;
|
|
|
|
string memberid = 31;
|
2022-08-11 15:21:32 +00:00
|
|
|
}
|
|
|
|
message UnsubscribeResponse {
|
2022-12-05 16:18:01 +00:00
|
|
|
bool ok = 32;
|
2022-12-19 08:13:56 +00:00
|
|
|
}
|
|
|
|
//////////////////member
|
|
|
|
|
|
|
|
message AddGroupMemberRequest {
|
|
|
|
GroupMember group = 33;
|
|
|
|
}
|
|
|
|
|
|
|
|
message AddGroupMemberResponse {
|
|
|
|
GroupMember group = 34;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetGroupMemberRequest {
|
|
|
|
string id = 35;
|
|
|
|
string groupid = 36;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetGroupMemberResponse {
|
|
|
|
GroupMember group = 37;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetGroupsMemberRequest {
|
|
|
|
repeated string namespaces = 38;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetGroupsMemberResponse {
|
|
|
|
repeated GroupMember groups = 39;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetGroupsBatchMemberRequest {
|
|
|
|
repeated string groupids = 40;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetGroupsBatchMemberResponse {
|
|
|
|
repeated GroupMember groups = 41;
|
|
|
|
}
|
|
|
|
message SubscribeMemberRequest {
|
|
|
|
GroupMember group = 42;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SubscribeMemberResponse {
|
|
|
|
GroupMember group = 43;
|
|
|
|
}
|