114 lines
2.7 KiB
Protocol Buffer
114 lines
2.7 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";
|
|
import "groupsmember.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) {}
|
|
//////////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) {}
|
|
rpc UnsubscribeMember(UnsubscribeMemberRequest) returns (UnsubscribeMemberResponse) {}
|
|
}
|
|
|
|
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;
|
|
}
|
|
//////////////////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;
|
|
}
|
|
message UnsubscribeMemberRequest {
|
|
string id = 44;
|
|
}
|
|
|
|
message UnsubscribeMemberResponse {
|
|
string id = 45;
|
|
}
|