Merge remote-tracking branch 'origin/v2.3.0release' into v2.3.0release

This commit is contained in:
Gordon 2022-09-21 16:09:31 +08:00
commit 5534c2a8f8
28 changed files with 373 additions and 141 deletions

View File

@ -214,7 +214,7 @@ func main() {
organizationGroup.POST("/get_department_member", organization.GetDepartmentMember)
organizationGroup.POST("/delete_user_in_department", organization.DeleteUserInDepartment)
organizationGroup.POST("/get_user_in_organization", organization.GetUserInOrganization)
}
initGroup := r.Group("/init")

2
go.mod
View File

@ -24,7 +24,7 @@ require (
github.com/go-playground/validator/v10 v10.11.0
github.com/go-redis/redis/v8 v8.11.5
github.com/gogo/protobuf v1.3.2
github.com/golang-jwt/jwt/v4 v4.1.0
github.com/golang-jwt/jwt/v4 v4.4.2
github.com/golang/protobuf v1.5.2
github.com/gorilla/websocket v1.4.2
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0

4
go.sum
View File

@ -249,8 +249,8 @@ github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang-jwt/jwt/v4 v4.1.0 h1:XUgk2Ex5veyVFVeLm0xhusUTQybEbexJXrvPNOKkSY0=
github.com/golang-jwt/jwt/v4 v4.1.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs=
github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY=
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=

View File

@ -657,3 +657,40 @@ func DeleteUserInDepartment(c *gin.Context) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api return ", apiResp)
c.JSON(http.StatusOK, apiResp)
}
func GetUserInOrganization(c *gin.Context) {
req := api.GetUserInOrganizationReq{}
if err := c.BindJSON(&req); err != nil {
log.NewError(req.OperationID, "BindJSON failed ", err.Error())
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
err, _ := token_verify.ParseTokenGetUserID(c.Request.Header.Get("token"), req.OperationID)
if err != nil {
errMsg := "ParseTokenGetUserID failed " + err.Error() + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName, req.OperationID)
if etcdConn == nil {
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
reqPb := &rpc.GetUserInOrganizationReq{OperationID: req.OperationID, UserIDList: req.UserIDList}
client := rpc.NewOrganizationClient(etcdConn)
respPb, err := client.GetUserInOrganization(context.Background(), reqPb)
if err != nil {
errMsg := "rpc DeleteUserInDepartment failed " + err.Error() + reqPb.String()
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
apiResp := api.GetUserInOrganizationResp{CommResp: api.CommResp{ErrCode: respPb.ErrCode, ErrMsg: respPb.ErrMsg}, OrganizationUserList: respPb.OrganizationUsers}
apiResp.Data = jsonData.JsonDataList(apiResp.OrganizationUserList)
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api return ", apiResp)
c.JSON(http.StatusOK, apiResp)
}

View File

@ -519,7 +519,7 @@ func sendMessageToPush(message *pbMsg.MsgDataToMQ, pushToUserID string) {
rpcPushMsg := pbPush.PushMsgReq{OperationID: message.OperationID, MsgData: message.MsgData, PushToUserID: pushToUserID}
mqPushMsg := pbMsg.PushMsgDataToMQ{OperationID: message.OperationID, MsgData: message.MsgData, PushToUserID: pushToUserID}
grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImPushName, message.OperationID)
if grpcConn == nil {
if grpcConn != nil {
log.Error(rpcPushMsg.OperationID, "rpc dial failed", "push data", rpcPushMsg.String())
pid, offset, err := producer.SendMessage(&mqPushMsg, mqPushMsg.PushToUserID, rpcPushMsg.OperationID)
if err != nil {

View File

@ -535,7 +535,7 @@ func (rpc *rpcChat) sendMsgToKafka(m *pbChat.MsgDataToMQ, key string, status str
if m.MsgData.ContentType == constant.SignalingNotification {
rpcPushMsg := pbPush.PushMsgReq{OperationID: m.OperationID, MsgData: m.MsgData, PushToUserID: key}
grpcConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImPushName, m.OperationID)
if grpcConn != nil {
if grpcConn == nil {
log.Error(rpcPushMsg.OperationID, "rpc dial failed", "push data", rpcPushMsg.String())
return errors.New("grpcConn is nil")
}

View File

@ -552,3 +552,24 @@ func (s *organizationServer) GetDepartmentRelatedGroupIDList(ctx context.Context
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
}
func (s *organizationServer) GetUserInOrganization(_ context.Context, req *rpc.GetUserInOrganizationReq) (resp *rpc.GetUserInOrganizationResp, err error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp = &rpc.GetUserInOrganizationResp{}
organizationUserList, err := imdb.GetOrganizationUsers(req.UserIDList)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), req.UserIDList)
resp.ErrCode = constant.ErrDB.ErrCode
resp.ErrMsg = err.Error()
return resp, nil
}
for _, v := range organizationUserList {
organizationUser := &open_im_sdk.OrganizationUser{}
utils.CopyStructFields(organizationUser, v)
organizationUser.CreateTime = uint32(v.CreateTime.Unix())
organizationUser.Birth = uint32(v.CreateTime.Unix())
resp.OrganizationUsers = append(resp.OrganizationUsers, organizationUser)
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
}

View File

@ -108,3 +108,14 @@ type DeleteUserInDepartmentReq struct {
type DeleteUserInDepartmentResp struct {
CommResp
}
type GetUserInOrganizationReq struct {
OperationID string `json:"operationID" binding:"required"`
UserIDList []string `json:"userIDList" binding:"required"`
}
type GetUserInOrganizationResp struct {
CommResp
OrganizationUserList []*open_im_sdk.OrganizationUser `json:"-"`
Data []map[string]interface{} `json:"data" swaggerignore:"true"`
}

View File

@ -62,6 +62,12 @@ func GetOrganizationUser(userID string) (error, *db.OrganizationUser) {
return err, &organizationUser
}
func GetOrganizationUsers(userIDList []string) ([]*db.OrganizationUser, error) {
var organizationUserList []*db.OrganizationUser
err := db.DB.MysqlDB.DefaultGormDB().Table("organization_users").Where("user_id in (?)", userIDList).Find(&organizationUserList).Error
return organizationUserList, err
}
func UpdateOrganizationUser(organizationUser *db.OrganizationUser, args map[string]interface{}) error {
if err := db.DB.MysqlDB.DefaultGormDB().Table("organization_users").Where("user_id=?", organizationUser.UserID).Updates(organizationUser).Error; err != nil {
return err

View File

@ -475,6 +475,9 @@ func GetGroupMemberNumFromCache(groupID string) (int64, error) {
return strconv.Itoa(int(num)), nil
}
groupMember, err := db.DB.Rc.Fetch(groupMemberNumCache+groupID, time.Second*30*60, getGroupMemberNum)
if err != nil {
return 0, utils.Wrap(err, "")
}
num, err := strconv.Atoi(groupMember)
return int64(num), err
}

View File

@ -179,19 +179,6 @@ func ParseTokenGetUserID(token string, operationID string) (error, string) {
func ParseToken(tokensString, operationID string) (claims *Claims, err error) {
claims, err = GetClaimFromToken(tokensString)
if err != nil {
//if errors.Is(err, constant.ErrTokenUnknown) {
// errMsg := "GetClaimFromToken failed ErrTokenUnknown " + err.Error()
// log.Error(operationID, errMsg)
//}
//info := err.(constant.ErrInfo)
//log.Error(operationID, "detail info , ", info.ErrCode, info.ErrMsg)
//
//e := errors.Unwrap(err)
//if errors.Is(e, constant.ErrTokenUnknown) {
// errMsg := "ParseToken failed ErrTokenUnknown " + e.Error()
// log.Error(operationID, errMsg)
//}
return nil, utils.Wrap(err, "")
}

View File

@ -1,6 +1,6 @@
syntax = "proto3";
option go_package = "./admin_cms;admin_cms";
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
option go_package = "Open_IM/pkg/proto/admin_cms;admin_cms";
import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
package admin_cms;

View File

@ -1,7 +1,7 @@
syntax = "proto3";
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
package pbAuth;
option go_package = "./auth;pbAuth";
option go_package = "Open_IM/pkg/proto/auth;pbAuth";
message CommonResp{
int32 errCode = 1;

View File

@ -6,12 +6,25 @@ for ((i = 0; i < ${#all_proto[*]}; i++)); do
proto=${all_proto[$i]}
protoc -I ../../../ -I ./ --go_out=plugins=grpc:. $proto
s=`echo $proto | sed 's/ //g'`
v=${s//proto/pb.go}
protoc-go-inject-tag -input=./$v
echo "protoc --go_out=plugins=grpc:." $proto
done
echo "proto file generate success..."
echo "proto file generate success"
j=0
for file in $(find ./Open_IM -name "*.go"); do # Not recommended, will break on whitespace
filelist[j]=$file
j=`expr $j + 1`
done
for ((i = 0; i < ${#filelist[*]}; i++)); do
proto=${filelist[$i]}
cp $proto ${proto#*./Open_IM/pkg/proto/}
done
rm Open_IM -rf
#find ./ -type f -path "*.pb.go"|xargs sed -i 's/\".\/sdk_ws\"/\"Open_IM\/pkg\/proto\/sdk_ws\"/g'
find ./ -type f -path "*.pb.go"|xargs sed -i 's/\".\/sdk_ws\"/\"Open_IM\/pkg\/proto\/sdk_ws\"/g'

View File

@ -1,6 +1,5 @@
syntax = "proto3";
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
option go_package = "./cache;cache";
option go_package = "Open_IM/pkg/proto/cache;cache";
package cache;
message CommonResp{

View File

@ -1,5 +1,5 @@
syntax = "proto3";
option go_package = "./conversation;conversation";
option go_package = "Open_IM/pkg/proto/conversation;conversation";
package conversation;
message CommonResp{

View File

@ -1,6 +1,6 @@
syntax = "proto3";
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
option go_package = "./friend;friend";
import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
option go_package = "Open_IM/pkg/proto/friend;friend";
package friend;
message CommonResp{
@ -167,6 +167,6 @@ service friend{
rpc setFriendRemark(SetFriendRemarkReq) returns(SetFriendRemarkResp);
rpc importFriend(ImportFriendReq) returns(ImportFriendResp);
rpc CheckFriendFromCache(IsFriendReq) returns(IsFriendResp);
rpc CheckBlockFromCache(IsInBlackListReq) returns(IsFriendResp);
// rpc CheckFriendFromCache(IsFriendReq) returns(IsFriendResp);
// rpc CheckBlockFromCache(IsInBlackListReq) returns(IsFriendResp);
}

View File

@ -1,7 +1,7 @@
syntax = "proto3";
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
import "Open_IM/pkg/proto/sdk_ws/wrappers.proto";
option go_package = "./group;group";
import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
import "Open-IM-Server/pkg/proto/sdk_ws/wrappers.proto";
option go_package = "Open_IM/pkg/proto/group;group";
package group;
message CommonResp{

View File

@ -1,6 +1,6 @@
syntax = "proto3";
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
option go_package = "./msg;msg";
import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
option go_package = "Open_IM/pkg/proto/msg;msg";
package msg;
message MsgDataToMQ{

View File

@ -1,6 +1,6 @@
syntax = "proto3";
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
option go_package = "./office;office";
import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
option go_package = "Open_IM/pkg/proto/office;office";
package office;
message CommonResp{

View File

@ -37,7 +37,7 @@ func (m *CreateDepartmentReq) Reset() { *m = CreateDepartmentReq{} }
func (m *CreateDepartmentReq) String() string { return proto.CompactTextString(m) }
func (*CreateDepartmentReq) ProtoMessage() {}
func (*CreateDepartmentReq) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{0}
return fileDescriptor_organization_a66b64589e547186, []int{0}
}
func (m *CreateDepartmentReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateDepartmentReq.Unmarshal(m, b)
@ -91,7 +91,7 @@ func (m *CreateDepartmentResp) Reset() { *m = CreateDepartmentResp{} }
func (m *CreateDepartmentResp) String() string { return proto.CompactTextString(m) }
func (*CreateDepartmentResp) ProtoMessage() {}
func (*CreateDepartmentResp) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{1}
return fileDescriptor_organization_a66b64589e547186, []int{1}
}
func (m *CreateDepartmentResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateDepartmentResp.Unmarshal(m, b)
@ -145,7 +145,7 @@ func (m *UpdateDepartmentReq) Reset() { *m = UpdateDepartmentReq{} }
func (m *UpdateDepartmentReq) String() string { return proto.CompactTextString(m) }
func (*UpdateDepartmentReq) ProtoMessage() {}
func (*UpdateDepartmentReq) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{2}
return fileDescriptor_organization_a66b64589e547186, []int{2}
}
func (m *UpdateDepartmentReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateDepartmentReq.Unmarshal(m, b)
@ -198,7 +198,7 @@ func (m *UpdateDepartmentResp) Reset() { *m = UpdateDepartmentResp{} }
func (m *UpdateDepartmentResp) String() string { return proto.CompactTextString(m) }
func (*UpdateDepartmentResp) ProtoMessage() {}
func (*UpdateDepartmentResp) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{3}
return fileDescriptor_organization_a66b64589e547186, []int{3}
}
func (m *UpdateDepartmentResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateDepartmentResp.Unmarshal(m, b)
@ -245,7 +245,7 @@ func (m *GetSubDepartmentReq) Reset() { *m = GetSubDepartmentReq{} }
func (m *GetSubDepartmentReq) String() string { return proto.CompactTextString(m) }
func (*GetSubDepartmentReq) ProtoMessage() {}
func (*GetSubDepartmentReq) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{4}
return fileDescriptor_organization_a66b64589e547186, []int{4}
}
func (m *GetSubDepartmentReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSubDepartmentReq.Unmarshal(m, b)
@ -299,7 +299,7 @@ func (m *GetSubDepartmentResp) Reset() { *m = GetSubDepartmentResp{} }
func (m *GetSubDepartmentResp) String() string { return proto.CompactTextString(m) }
func (*GetSubDepartmentResp) ProtoMessage() {}
func (*GetSubDepartmentResp) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{5}
return fileDescriptor_organization_a66b64589e547186, []int{5}
}
func (m *GetSubDepartmentResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSubDepartmentResp.Unmarshal(m, b)
@ -353,7 +353,7 @@ func (m *DeleteDepartmentReq) Reset() { *m = DeleteDepartmentReq{} }
func (m *DeleteDepartmentReq) String() string { return proto.CompactTextString(m) }
func (*DeleteDepartmentReq) ProtoMessage() {}
func (*DeleteDepartmentReq) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{6}
return fileDescriptor_organization_a66b64589e547186, []int{6}
}
func (m *DeleteDepartmentReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteDepartmentReq.Unmarshal(m, b)
@ -406,7 +406,7 @@ func (m *DeleteDepartmentResp) Reset() { *m = DeleteDepartmentResp{} }
func (m *DeleteDepartmentResp) String() string { return proto.CompactTextString(m) }
func (*DeleteDepartmentResp) ProtoMessage() {}
func (*DeleteDepartmentResp) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{7}
return fileDescriptor_organization_a66b64589e547186, []int{7}
}
func (m *DeleteDepartmentResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteDepartmentResp.Unmarshal(m, b)
@ -452,7 +452,7 @@ func (m *GetDepartmentParentIDListReq) Reset() { *m = GetDepartmentParen
func (m *GetDepartmentParentIDListReq) String() string { return proto.CompactTextString(m) }
func (*GetDepartmentParentIDListReq) ProtoMessage() {}
func (*GetDepartmentParentIDListReq) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{8}
return fileDescriptor_organization_a66b64589e547186, []int{8}
}
func (m *GetDepartmentParentIDListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetDepartmentParentIDListReq.Unmarshal(m, b)
@ -499,7 +499,7 @@ func (m *GetDepartmentParentIDListResp) Reset() { *m = GetDepartmentPare
func (m *GetDepartmentParentIDListResp) String() string { return proto.CompactTextString(m) }
func (*GetDepartmentParentIDListResp) ProtoMessage() {}
func (*GetDepartmentParentIDListResp) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{9}
return fileDescriptor_organization_a66b64589e547186, []int{9}
}
func (m *GetDepartmentParentIDListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetDepartmentParentIDListResp.Unmarshal(m, b)
@ -554,7 +554,7 @@ func (m *CreateOrganizationUserReq) Reset() { *m = CreateOrganizationUse
func (m *CreateOrganizationUserReq) String() string { return proto.CompactTextString(m) }
func (*CreateOrganizationUserReq) ProtoMessage() {}
func (*CreateOrganizationUserReq) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{10}
return fileDescriptor_organization_a66b64589e547186, []int{10}
}
func (m *CreateOrganizationUserReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateOrganizationUserReq.Unmarshal(m, b)
@ -614,7 +614,7 @@ func (m *CreateOrganizationUserResp) Reset() { *m = CreateOrganizationUs
func (m *CreateOrganizationUserResp) String() string { return proto.CompactTextString(m) }
func (*CreateOrganizationUserResp) ProtoMessage() {}
func (*CreateOrganizationUserResp) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{11}
return fileDescriptor_organization_a66b64589e547186, []int{11}
}
func (m *CreateOrganizationUserResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateOrganizationUserResp.Unmarshal(m, b)
@ -661,7 +661,7 @@ func (m *UpdateOrganizationUserReq) Reset() { *m = UpdateOrganizationUse
func (m *UpdateOrganizationUserReq) String() string { return proto.CompactTextString(m) }
func (*UpdateOrganizationUserReq) ProtoMessage() {}
func (*UpdateOrganizationUserReq) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{12}
return fileDescriptor_organization_a66b64589e547186, []int{12}
}
func (m *UpdateOrganizationUserReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateOrganizationUserReq.Unmarshal(m, b)
@ -714,7 +714,7 @@ func (m *UpdateOrganizationUserResp) Reset() { *m = UpdateOrganizationUs
func (m *UpdateOrganizationUserResp) String() string { return proto.CompactTextString(m) }
func (*UpdateOrganizationUserResp) ProtoMessage() {}
func (*UpdateOrganizationUserResp) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{13}
return fileDescriptor_organization_a66b64589e547186, []int{13}
}
func (m *UpdateOrganizationUserResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateOrganizationUserResp.Unmarshal(m, b)
@ -761,7 +761,7 @@ func (m *CreateDepartmentMemberReq) Reset() { *m = CreateDepartmentMembe
func (m *CreateDepartmentMemberReq) String() string { return proto.CompactTextString(m) }
func (*CreateDepartmentMemberReq) ProtoMessage() {}
func (*CreateDepartmentMemberReq) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{14}
return fileDescriptor_organization_a66b64589e547186, []int{14}
}
func (m *CreateDepartmentMemberReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateDepartmentMemberReq.Unmarshal(m, b)
@ -814,7 +814,7 @@ func (m *CreateDepartmentMemberResp) Reset() { *m = CreateDepartmentMemb
func (m *CreateDepartmentMemberResp) String() string { return proto.CompactTextString(m) }
func (*CreateDepartmentMemberResp) ProtoMessage() {}
func (*CreateDepartmentMemberResp) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{15}
return fileDescriptor_organization_a66b64589e547186, []int{15}
}
func (m *CreateDepartmentMemberResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateDepartmentMemberResp.Unmarshal(m, b)
@ -861,7 +861,7 @@ func (m *GetUserInDepartmentReq) Reset() { *m = GetUserInDepartmentReq{}
func (m *GetUserInDepartmentReq) String() string { return proto.CompactTextString(m) }
func (*GetUserInDepartmentReq) ProtoMessage() {}
func (*GetUserInDepartmentReq) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{16}
return fileDescriptor_organization_a66b64589e547186, []int{16}
}
func (m *GetUserInDepartmentReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserInDepartmentReq.Unmarshal(m, b)
@ -915,7 +915,7 @@ func (m *GetUserInDepartmentResp) Reset() { *m = GetUserInDepartmentResp
func (m *GetUserInDepartmentResp) String() string { return proto.CompactTextString(m) }
func (*GetUserInDepartmentResp) ProtoMessage() {}
func (*GetUserInDepartmentResp) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{17}
return fileDescriptor_organization_a66b64589e547186, []int{17}
}
func (m *GetUserInDepartmentResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserInDepartmentResp.Unmarshal(m, b)
@ -969,7 +969,7 @@ func (m *UpdateUserInDepartmentReq) Reset() { *m = UpdateUserInDepartmen
func (m *UpdateUserInDepartmentReq) String() string { return proto.CompactTextString(m) }
func (*UpdateUserInDepartmentReq) ProtoMessage() {}
func (*UpdateUserInDepartmentReq) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{18}
return fileDescriptor_organization_a66b64589e547186, []int{18}
}
func (m *UpdateUserInDepartmentReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateUserInDepartmentReq.Unmarshal(m, b)
@ -1022,7 +1022,7 @@ func (m *UpdateUserInDepartmentResp) Reset() { *m = UpdateUserInDepartme
func (m *UpdateUserInDepartmentResp) String() string { return proto.CompactTextString(m) }
func (*UpdateUserInDepartmentResp) ProtoMessage() {}
func (*UpdateUserInDepartmentResp) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{19}
return fileDescriptor_organization_a66b64589e547186, []int{19}
}
func (m *UpdateUserInDepartmentResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateUserInDepartmentResp.Unmarshal(m, b)
@ -1070,7 +1070,7 @@ func (m *DeleteUserInDepartmentReq) Reset() { *m = DeleteUserInDepartmen
func (m *DeleteUserInDepartmentReq) String() string { return proto.CompactTextString(m) }
func (*DeleteUserInDepartmentReq) ProtoMessage() {}
func (*DeleteUserInDepartmentReq) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{20}
return fileDescriptor_organization_a66b64589e547186, []int{20}
}
func (m *DeleteUserInDepartmentReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteUserInDepartmentReq.Unmarshal(m, b)
@ -1130,7 +1130,7 @@ func (m *DeleteUserInDepartmentResp) Reset() { *m = DeleteUserInDepartme
func (m *DeleteUserInDepartmentResp) String() string { return proto.CompactTextString(m) }
func (*DeleteUserInDepartmentResp) ProtoMessage() {}
func (*DeleteUserInDepartmentResp) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{21}
return fileDescriptor_organization_a66b64589e547186, []int{21}
}
func (m *DeleteUserInDepartmentResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteUserInDepartmentResp.Unmarshal(m, b)
@ -1177,7 +1177,7 @@ func (m *DeleteOrganizationUserReq) Reset() { *m = DeleteOrganizationUse
func (m *DeleteOrganizationUserReq) String() string { return proto.CompactTextString(m) }
func (*DeleteOrganizationUserReq) ProtoMessage() {}
func (*DeleteOrganizationUserReq) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{22}
return fileDescriptor_organization_a66b64589e547186, []int{22}
}
func (m *DeleteOrganizationUserReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteOrganizationUserReq.Unmarshal(m, b)
@ -1230,7 +1230,7 @@ func (m *DeleteOrganizationUserResp) Reset() { *m = DeleteOrganizationUs
func (m *DeleteOrganizationUserResp) String() string { return proto.CompactTextString(m) }
func (*DeleteOrganizationUserResp) ProtoMessage() {}
func (*DeleteOrganizationUserResp) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{23}
return fileDescriptor_organization_a66b64589e547186, []int{23}
}
func (m *DeleteOrganizationUserResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteOrganizationUserResp.Unmarshal(m, b)
@ -1277,7 +1277,7 @@ func (m *GetDepartmentMemberReq) Reset() { *m = GetDepartmentMemberReq{}
func (m *GetDepartmentMemberReq) String() string { return proto.CompactTextString(m) }
func (*GetDepartmentMemberReq) ProtoMessage() {}
func (*GetDepartmentMemberReq) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{24}
return fileDescriptor_organization_a66b64589e547186, []int{24}
}
func (m *GetDepartmentMemberReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetDepartmentMemberReq.Unmarshal(m, b)
@ -1331,7 +1331,7 @@ func (m *GetDepartmentMemberResp) Reset() { *m = GetDepartmentMemberResp
func (m *GetDepartmentMemberResp) String() string { return proto.CompactTextString(m) }
func (*GetDepartmentMemberResp) ProtoMessage() {}
func (*GetDepartmentMemberResp) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{25}
return fileDescriptor_organization_a66b64589e547186, []int{25}
}
func (m *GetDepartmentMemberResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetDepartmentMemberResp.Unmarshal(m, b)
@ -1384,7 +1384,7 @@ func (m *GetDepartmentRelatedGroupIDListReq) Reset() { *m = GetDepartmen
func (m *GetDepartmentRelatedGroupIDListReq) String() string { return proto.CompactTextString(m) }
func (*GetDepartmentRelatedGroupIDListReq) ProtoMessage() {}
func (*GetDepartmentRelatedGroupIDListReq) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{26}
return fileDescriptor_organization_a66b64589e547186, []int{26}
}
func (m *GetDepartmentRelatedGroupIDListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetDepartmentRelatedGroupIDListReq.Unmarshal(m, b)
@ -1431,7 +1431,7 @@ func (m *GetDepartmentRelatedGroupIDListResp) Reset() { *m = GetDepartme
func (m *GetDepartmentRelatedGroupIDListResp) String() string { return proto.CompactTextString(m) }
func (*GetDepartmentRelatedGroupIDListResp) ProtoMessage() {}
func (*GetDepartmentRelatedGroupIDListResp) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_2845c40b2de0bcf0, []int{27}
return fileDescriptor_organization_a66b64589e547186, []int{27}
}
func (m *GetDepartmentRelatedGroupIDListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetDepartmentRelatedGroupIDListResp.Unmarshal(m, b)
@ -1472,6 +1472,106 @@ func (m *GetDepartmentRelatedGroupIDListResp) GetGroupIDList() []string {
return nil
}
type GetUserInOrganizationReq struct {
UserIDList []string `protobuf:"bytes,1,rep,name=userIDList" json:"userIDList,omitempty"`
OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetUserInOrganizationReq) Reset() { *m = GetUserInOrganizationReq{} }
func (m *GetUserInOrganizationReq) String() string { return proto.CompactTextString(m) }
func (*GetUserInOrganizationReq) ProtoMessage() {}
func (*GetUserInOrganizationReq) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_a66b64589e547186, []int{28}
}
func (m *GetUserInOrganizationReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserInOrganizationReq.Unmarshal(m, b)
}
func (m *GetUserInOrganizationReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetUserInOrganizationReq.Marshal(b, m, deterministic)
}
func (dst *GetUserInOrganizationReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetUserInOrganizationReq.Merge(dst, src)
}
func (m *GetUserInOrganizationReq) XXX_Size() int {
return xxx_messageInfo_GetUserInOrganizationReq.Size(m)
}
func (m *GetUserInOrganizationReq) XXX_DiscardUnknown() {
xxx_messageInfo_GetUserInOrganizationReq.DiscardUnknown(m)
}
var xxx_messageInfo_GetUserInOrganizationReq proto.InternalMessageInfo
func (m *GetUserInOrganizationReq) GetUserIDList() []string {
if m != nil {
return m.UserIDList
}
return nil
}
func (m *GetUserInOrganizationReq) GetOperationID() string {
if m != nil {
return m.OperationID
}
return ""
}
type GetUserInOrganizationResp struct {
ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"`
ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"`
OrganizationUsers []*sdk_ws.OrganizationUser `protobuf:"bytes,3,rep,name=organizationUsers" json:"organizationUsers,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetUserInOrganizationResp) Reset() { *m = GetUserInOrganizationResp{} }
func (m *GetUserInOrganizationResp) String() string { return proto.CompactTextString(m) }
func (*GetUserInOrganizationResp) ProtoMessage() {}
func (*GetUserInOrganizationResp) Descriptor() ([]byte, []int) {
return fileDescriptor_organization_a66b64589e547186, []int{29}
}
func (m *GetUserInOrganizationResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserInOrganizationResp.Unmarshal(m, b)
}
func (m *GetUserInOrganizationResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetUserInOrganizationResp.Marshal(b, m, deterministic)
}
func (dst *GetUserInOrganizationResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetUserInOrganizationResp.Merge(dst, src)
}
func (m *GetUserInOrganizationResp) XXX_Size() int {
return xxx_messageInfo_GetUserInOrganizationResp.Size(m)
}
func (m *GetUserInOrganizationResp) XXX_DiscardUnknown() {
xxx_messageInfo_GetUserInOrganizationResp.DiscardUnknown(m)
}
var xxx_messageInfo_GetUserInOrganizationResp proto.InternalMessageInfo
func (m *GetUserInOrganizationResp) GetErrCode() int32 {
if m != nil {
return m.ErrCode
}
return 0
}
func (m *GetUserInOrganizationResp) GetErrMsg() string {
if m != nil {
return m.ErrMsg
}
return ""
}
func (m *GetUserInOrganizationResp) GetOrganizationUsers() []*sdk_ws.OrganizationUser {
if m != nil {
return m.OrganizationUsers
}
return nil
}
func init() {
proto.RegisterType((*CreateDepartmentReq)(nil), "organization.CreateDepartmentReq")
proto.RegisterType((*CreateDepartmentResp)(nil), "organization.CreateDepartmentResp")
@ -1501,6 +1601,8 @@ func init() {
proto.RegisterType((*GetDepartmentMemberResp)(nil), "organization.GetDepartmentMemberResp")
proto.RegisterType((*GetDepartmentRelatedGroupIDListReq)(nil), "organization.GetDepartmentRelatedGroupIDListReq")
proto.RegisterType((*GetDepartmentRelatedGroupIDListResp)(nil), "organization.GetDepartmentRelatedGroupIDListResp")
proto.RegisterType((*GetUserInOrganizationReq)(nil), "organization.GetUserInOrganizationReq")
proto.RegisterType((*GetUserInOrganizationResp)(nil), "organization.GetUserInOrganizationResp")
}
// Reference imports to suppress errors if they are not otherwise used.
@ -1528,6 +1630,7 @@ type OrganizationClient interface {
UpdateUserInDepartment(ctx context.Context, in *UpdateUserInDepartmentReq, opts ...grpc.CallOption) (*UpdateUserInDepartmentResp, error)
GetDepartmentMember(ctx context.Context, in *GetDepartmentMemberReq, opts ...grpc.CallOption) (*GetDepartmentMemberResp, error)
GetDepartmentRelatedGroupIDList(ctx context.Context, in *GetDepartmentRelatedGroupIDListReq, opts ...grpc.CallOption) (*GetDepartmentRelatedGroupIDListResp, error)
GetUserInOrganization(ctx context.Context, in *GetUserInOrganizationReq, opts ...grpc.CallOption) (*GetUserInOrganizationResp, error)
}
type organizationClient struct {
@ -1664,6 +1767,15 @@ func (c *organizationClient) GetDepartmentRelatedGroupIDList(ctx context.Context
return out, nil
}
func (c *organizationClient) GetUserInOrganization(ctx context.Context, in *GetUserInOrganizationReq, opts ...grpc.CallOption) (*GetUserInOrganizationResp, error) {
out := new(GetUserInOrganizationResp)
err := grpc.Invoke(ctx, "/organization.organization/GetUserInOrganization", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Organization service
type OrganizationServer interface {
@ -1681,6 +1793,7 @@ type OrganizationServer interface {
UpdateUserInDepartment(context.Context, *UpdateUserInDepartmentReq) (*UpdateUserInDepartmentResp, error)
GetDepartmentMember(context.Context, *GetDepartmentMemberReq) (*GetDepartmentMemberResp, error)
GetDepartmentRelatedGroupIDList(context.Context, *GetDepartmentRelatedGroupIDListReq) (*GetDepartmentRelatedGroupIDListResp, error)
GetUserInOrganization(context.Context, *GetUserInOrganizationReq) (*GetUserInOrganizationResp, error)
}
func RegisterOrganizationServer(s *grpc.Server, srv OrganizationServer) {
@ -1939,6 +2052,24 @@ func _Organization_GetDepartmentRelatedGroupIDList_Handler(srv interface{}, ctx
return interceptor(ctx, in, info, handler)
}
func _Organization_GetUserInOrganization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUserInOrganizationReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrganizationServer).GetUserInOrganization(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/organization.organization/GetUserInOrganization",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrganizationServer).GetUserInOrganization(ctx, req.(*GetUserInOrganizationReq))
}
return interceptor(ctx, in, info, handler)
}
var _Organization_serviceDesc = grpc.ServiceDesc{
ServiceName: "organization.organization",
HandlerType: (*OrganizationServer)(nil),
@ -1999,70 +2130,78 @@ var _Organization_serviceDesc = grpc.ServiceDesc{
MethodName: "GetDepartmentRelatedGroupIDList",
Handler: _Organization_GetDepartmentRelatedGroupIDList_Handler,
},
{
MethodName: "GetUserInOrganization",
Handler: _Organization_GetUserInOrganization_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "organization/organization.proto",
}
func init() {
proto.RegisterFile("organization/organization.proto", fileDescriptor_organization_2845c40b2de0bcf0)
proto.RegisterFile("organization/organization.proto", fileDescriptor_organization_a66b64589e547186)
}
var fileDescriptor_organization_2845c40b2de0bcf0 = []byte{
// 869 bytes of a gzipped FileDescriptorProto
0x1f, 0x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78, 0xea, 0x54, 0x95, 0xc5, 0xe6, 0x74, 0x55, 0xd9, 0x98, 0x4c,
0x3c, 0xa4, 0x51, 0x4d, 0x23, 0x38, 0x8d, 0x48, 0x02, 0xc6, 0x69, 0x44, 0x93, 0x65, 0x33, 0x98,
0x9e, 0xd5, 0xa2, 0x46, 0x76, 0xb4, 0xb8, 0x23, 0xe5, 0xd8, 0xdc, 0x9d, 0x62, 0x97, 0xcc, 0x9e,
0xa6, 0x06, 0x65, 0x0f, 0xd3, 0x54, 0x9c, 0x6e, 0xa3, 0x7c, 0x2f, 0x26, 0x29, 0x8b, 0x6d, 0xb1,
0xf0, 0x7b, 0x81, 0x2a, 0x0b, 0xd9, 0xd3, 0xe2, 0xb4, 0x33, 0xe6, 0xd5, 0x8c, 0x82, 0xb4, 0x3b,
0xc5, 0x2e, 0xc1, 0xc8, 0x57, 0x03, 0x36, 0x27, 0x24, 0x71, 0xf2, 0x6c, 0x0c, 0x14, 0x5a, 0x67,
0xcc, 0xe7, 0x37, 0x3c, 0x21, 0xd8, 0xab, 0x8d, 0x0f, 0x8f, 0x4a, 0x91, 0xff, 0x78, 0x2f, 0xe5,
0x45, 0x73, 0x29, 0xf8, 0x49, 0xf7, 0xe2, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x63, 0xff, 0x09,
0x1d, 0xf8, 0x13, 0x00, 0x00,
var fileDescriptor_organization_a66b64589e547186 = []byte{
// 938 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4f, 0x4f, 0xe3, 0x46,
0x14, 0x97, 0x09, 0xa5, 0xf0, 0x88, 0xaa, 0x74, 0xa0, 0xa9, 0xe3, 0x16, 0x08, 0x06, 0x4a, 0x44,
0xa5, 0xa4, 0xa5, 0xc7, 0xde, 0x4a, 0xaa, 0x10, 0xa9, 0x34, 0xad, 0x2b, 0x0e, 0x54, 0x95, 0x22,
0xa7, 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40, 0x51, 0xdf, 0x3b, 0x64, 0x65, 0x89, 0x4d, 0x4d, 0x56, 0x36, 0xa5,
0x15, 0x8d, 0xdd, 0x28, 0xd7, 0x51, 0xbd, 0x1b, 0x35, 0x1d, 0x48, 0xef, 0x46, 0x6d, 0xb7, 0xe8,
0xf0, 0xdf, 0x07, 0x72, 0x57, 0x47, 0xfb, 0x4a, 0xdc, 0x35, 0xf3, 0x88, 0x75, 0x90, 0xe2, 0x96,
0xe8, 0x3d, 0x45, 0x8d, 0xd6, 0x7b, 0x3a, 0x4d, 0x95, 0x74, 0x17, 0xc5, 0xbc, 0x98, 0xa5, 0x2c,
0x71, 0xc6, 0xd4, 0xe7, 0x85, 0x56, 0x59, 0xe8, 0x3d, 0x25, 0x4e, 0xfb, 0x53, 0x5e, 0xcd, 0x24,
0x48, 0x07, 0x29, 0x6e, 0x31, 0x82, 0x5e, 0x18, 0xb0, 0x33, 0xa3, 0x8b, 0xa1, 0x9f, 0xa6, 0x88,
0xd2, 0x36, 0x5a, 0xeb, 0xe7, 0x7b, 0x72, 0x30, 0x82, 0x9e, 0xc2, 0x37, 0xda, 0x9e, 0x83, 0x7e,
0x48, 0x48, 0x03, 0xa9, 0xef, 0x59, 0x87, 0xa9, 0xee, 0x31, 0xf2, 0xdb, 0xd6, 0xbf, 0xdf, 0x55,
0x63, 0xbf, 0x4c, 0x7f, 0x15, 0x0f, 0x9d, 0x15, 0xfe, 0x3f, 0xf4, 0x97, 0x4f, 0x01, 0x00, 0x00,
0xff, 0xff, 0xd0, 0x99, 0xbc, 0xd7, 0x63, 0x15, 0x00, 0x00,
}

View File

@ -1,6 +1,6 @@
syntax = "proto3";
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
option go_package = "./organization;organization";
import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
option go_package = "Open_IM/pkg/proto/organization;organization";
package organization;
@ -171,6 +171,17 @@ message GetDepartmentRelatedGroupIDListResp {
repeated string groupIDList = 3;
}
message GetUserInOrganizationReq{
repeated string userIDList = 1;
string operationID = 2;
}
message GetUserInOrganizationResp{
int32 errCode = 1;
string errMsg = 2;
repeated server_api_params.OrganizationUser organizationUsers = 3;
}
service organization{
rpc CreateDepartment(CreateDepartmentReq) returns(CreateDepartmentResp);
rpc UpdateDepartment(UpdateDepartmentReq) returns(UpdateDepartmentResp);
@ -189,6 +200,8 @@ service organization{
rpc UpdateUserInDepartment(UpdateUserInDepartmentReq) returns(UpdateUserInDepartmentResp);
rpc GetDepartmentMember(GetDepartmentMemberReq) returns(GetDepartmentMemberResp);
rpc GetDepartmentRelatedGroupIDList(GetDepartmentRelatedGroupIDListReq) returns(GetDepartmentRelatedGroupIDListResp);
rpc GetUserInOrganization(GetUserInOrganizationReq) returns(GetUserInOrganizationResp);
}

View File

@ -8,9 +8,12 @@ all_proto=(
group/group.proto
user/user.proto
rtc/rtc.proto
chat/chat.proto
msg/msg.proto
push/push.proto
relay/relay.proto
sdk_ws/ws.proto
conversation/conversation.proto
office/office.proto
cache/cache.proto
organization/organization.proto
)

View File

@ -1,6 +1,6 @@
syntax = "proto3";
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
option go_package = "./push;pbPush";
import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
option go_package = "Open_IM/pkg/proto/push;pbPush";
package push;
message PushMsgReq {

View File

@ -1,6 +1,6 @@
syntax = "proto3";
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
option go_package = "./relay;pbRelay";
import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
option go_package = "Open_IM/pkg/proto/relay;pbRelay";
package relay;
message OnlinePushMsgReq {

View File

@ -1,5 +1,5 @@
syntax = "proto3";
option go_package = "./rtc;rtc";
option go_package = "Open_IM/pkg/proto/rtc;rtc";
package proto;
message CommonResp{

View File

@ -1,6 +1,6 @@
syntax = "proto3";
import "Open_IM/pkg/proto/sdk_ws/wrappers.proto";
option go_package = "./sdk_ws;server_api_params";
import "Open-IM-Server/pkg/proto/sdk_ws/wrappers.proto";
option go_package = "Open_IM/pkg/proto/sdk_ws;server_api_params";
package server_api_params;

View File

@ -1,7 +1,7 @@
syntax = "proto3";
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
import "Open_IM/pkg/proto/conversation/conversation.proto";
option go_package = "./user;user";
import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
import "Open-IM-Server/pkg/proto/conversation/conversation.proto";
option go_package = "Open_IM/pkg/proto/user;user";
package user;
message CommonResp{