Compare commits

..

1 Commits

Author SHA1 Message Date
wangchuxiao
8cc4e30bae fix docker-compose 2022-04-24 10:47:08 +08:00
63 changed files with 1010 additions and 4284 deletions

View File

@@ -30,11 +30,11 @@ func main() {
gin.SetMode(gin.ReleaseMode)
f, _ := os.Create("../logs/api.log")
gin.DefaultWriter = io.MultiWriter(f)
gin.SetMode(gin.DebugMode)
r := gin.Default()
r.Use(utils.CorsHandler())
log.Info("load config: ", config.Config)
log.Info("load config: ", config.Config)
// user routing group, which handles user registration and login services
userRouterGroup := r.Group("/user")
{
@@ -42,9 +42,6 @@ func main() {
userRouterGroup.POST("/get_users_info", user.GetUsersInfo) //1
userRouterGroup.POST("/get_self_user_info", user.GetSelfUserInfo) //1
userRouterGroup.POST("/get_users_online_status", user.GetUsersOnlineStatus) //1
userRouterGroup.POST("/get_users_info_from_cache", user.GetUsersInfoFromCache)
userRouterGroup.POST("/get_user_friend_from_cache", user.GetFriendIDListFromCache)
userRouterGroup.POST("/get_black_list_from_cache", user.GetBlackIDListFromCache)
}
//friend routing group
friendRouterGroup := r.Group("/friend")
@@ -132,7 +129,6 @@ func main() {
conversationGroup.POST("/set_conversation", conversation.SetConversation)
conversationGroup.POST("/batch_set_conversation", conversation.BatchSetConversations)
conversationGroup.POST("/set_recv_msg_opt", conversation.SetRecvMsgOpt)
conversationGroup.POST("/modify_conversation_field", conversation.ModifyConversationField)
}
// office
officeGroup := r.Group("/office")
@@ -177,7 +173,7 @@ func main() {
}
go apiThird.MinioInit()
ginPort := flag.Int("port", 10002, "get ginServerPort from cmd,default 10000 as port")
ginPort := flag.Int("port", 10000, "get ginServerPort from cmd,default 10000 as port")
flag.Parse()
fmt.Println("start api server, port: ", *ginPort)
err := r.Run(":" + strconv.Itoa(*ginPort))

View File

@@ -3,9 +3,7 @@ package main
import (
"Open_IM/internal/cms_api"
"Open_IM/pkg/utils"
"flag"
"fmt"
"strconv"
"github.com/gin-gonic/gin"
)
@@ -14,10 +12,6 @@ func main() {
gin.SetMode(gin.ReleaseMode)
router := cms_api.NewGinRouter()
router.Use(utils.CorsHandler())
ginPort := flag.Int("port", 10006, "get ginServerPort from cmd,default 8000 as port")
flag.Parse()
fmt.Println("start cms api server, port: ", ginPort)
router.Run(":" + strconv.Itoa(*ginPort))
fmt.Println("start cms api server, port: ", 8000)
router.Run(":" + "8000")
}
//

View File

@@ -23,7 +23,7 @@ func main() {
r := gin.Default()
r.Use(utils.CorsHandler())
authRouterGroup := r.Group("/demo")
authRouterGroup := r.Group("/auth")
{
authRouterGroup.POST("/code", register.SendVerificationCode)
authRouterGroup.POST("/verify", register.Verify)

View File

@@ -1,24 +0,0 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=open_im_cache
BIN_DIR=../../../bin/
all: gotool build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
run:
@go run ./
gotool:
go fmt ./
go vet ./
install:
make build
mv ${BINARY_NAME} ${BIN_DIR}
clean:
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi

View File

@@ -1,16 +0,0 @@
package main
import (
rpcCache "Open_IM/internal/rpc/cache"
"flag"
"fmt"
)
func main() {
rpcPort := flag.Int("port", 10600, "RpcToken default listen port 10800")
flag.Parse()
fmt.Println("start auth rpc server, port: ", *rpcPort)
rpcServer := rpcCache.NewCacheServer(*rpcPort)
rpcServer.Run()
}

View File

@@ -1,24 +0,0 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=open_im_conversation
BIN_DIR=../../../bin/
all: gotool build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
run:
@go run ./
gotool:
go fmt ./
go vet ./
install:
make build
mv ${BINARY_NAME} ${BIN_DIR}
clean:
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi

View File

@@ -1,16 +0,0 @@
package main
import (
rpcConversation "Open_IM/internal/rpc/conversation"
"flag"
"fmt"
)
func main() {
rpcPort := flag.Int("port", 11400, "RpcConversation default listen port 11300")
flag.Parse()
fmt.Println("start conversation rpc server, port: ", *rpcPort)
rpcServer := rpcConversation.NewRpcConversationServer(*rpcPort)
rpcServer.Run()
}

View File

@@ -76,24 +76,24 @@ endpoints:
rpc_office: openim_rpc_office
api:
openImApiPort: [ 10002 ] #api服务端口默认即可需要开放此端口或做nginx转发
openImApiPort: [ 10000 ] #api服务端口默认即可需要开放此端口或做nginx转发
cmsapi:
openImCmsApiPort: [ 10006 ] #管理后台api服务端口默认即可需要开放此端口或做nginx转发
openImCmsApiPort: [ 8000 ] #管理后台api服务端口默认即可需要开放此端口或做nginx转发
sdk:
openImSdkWsPort: [ 10003 ] #jssdk服务端口默认即可项目中使用jssdk才需开放此端口或做nginx转发
openImSdkWsPort: [ 30000 ] #jssdk服务端口默认即可项目中使用jssdk才需开放此端口或做nginx转发
#对象存储服务以下配置二选一目前支持两种腾讯云和minio二者配置好其中一种即可如果使用minio参考https://doc.rentsoft.cn/#/qa/minio搭建minio服务器
credential: #腾讯cos发送图片、视频、文件时需要请自行申请后替换必须修改
tencent:
appID: 1302656840
region: ap-chengdu
bucket: echat-1302656840
secretID: AKIDGNYVChzIQinu7QEgtNp0hnNgqcV8vZTC1
secretKey: kz15vW83qM6dBUWIq681eBZA0c0vlIbe1
secretID: AKIDGNYVChzIQinu7QEgtNp0hnNgqcV8vZTC
secretKey: kz15vW83qM6dBUWIq681eBZA0c0vlIbe
minio: #MinIO 发送图片、视频、文件时需要,请自行申请后替换,必须修改。 客户端初始化InitSDK中 object_storage参数为minio
bucket: openim
location: us-east-1
endpoint: http://127.0.0.1:10005 #minio外网ip 这个ip是给客户端访问的
endpointInner: http://127.0.0.1:10005 #minio内网地址 如果im server 可以通过内网访问到 minio就可以填写
endpoint: http://127.0.0.1:9000 #minio外网ip 这个ip是给客户端访问的
endpointInner: http://127.0.0.1:9000 #minio内网地址 如果im server 可以通过内网访问到 minio就可以填写
endpointInnerEnable: true #是否启用minio内网地址 启用可以让桶初始化IM server连接minio走内网地址访问
accessKeyID: user12345
secretAccessKey: key12345
@@ -111,20 +111,18 @@ credential: #腾讯cos发送图片、视频、文件时需要请自行申
rpcport: #rpc服务端口 默认即可
openImUserPort: [ 10110 ]
openImFriendPort: [ 10120 ]
openImMessagePort: [ 10130 ]
openImMessageGatewayPort: [ 10140 ]
openImGroupPort: [ 10150 ]
openImAuthPort: [ 10160 ]
openImPushPort: [ 10170 ]
openImStatisticsPort: [ 10180 ]
openImMessageCmsPort: [ 10190 ]
openImAdminCmsPort: [ 10200 ]
openImOfficePort: [ 10210 ]
openImOrganizationPort: [ 10220 ]
openImConversationPort: [ 10230 ]
openImCachePort: [10240]
openImUserPort: [ 10100 ]
openImFriendPort: [ 10200 ]
openImOfflineMessagePort: [ 10300 ]
openImOnlineRelayPort: [ 10400 ]
openImGroupPort: [ 10500 ]
openImAuthPort: [ 10600 ]
openImPushPort: [ 10700 ]
openImStatisticsPort: [ 10800 ]
openImMessageCmsPort: [ 10900 ]
openImAdminCmsPort: [ 11000 ]
openImOfficePort: [ 11100 ]
openImOrganizationPort: [ 11200 ]
c2c:
callbackBeforeSendMsg:
switch: false
@@ -148,8 +146,6 @@ rpcregistername: #rpc注册服务名默认即可
openImAdminCMSName: AdminCMS
openImOfficeName: Office
openImOrganizationName: Organization
openImConversationName: Conversation
openImCacheName: Cache
log:
storageLocation: ../logs/
@@ -168,7 +164,7 @@ modulename: #日志文件按模块命名,默认即可
pushName: push
longconnsvr:
openImWsPort: [ 10001 ] # ws服务端口默认即可要开放此端口或做nginx转发
openImWsPort: [ 17778 ] # ws服务端口默认即可要开放此端口或做nginx转发
websocketMaxConnNum: 10000
websocketMaxMsgLen: 4096
websocketTimeOut: 10
@@ -636,7 +632,7 @@ notification:
demoswitch: true
demo:
#demo对外服务端口默认即可需要开放此端口或做nginx转发
openImDemoPort: [ 10004 ]
openImDemoPort: [ 42233 ]
alismsverify: #阿里云短信配置,在阿里云申请成功后修改以下四项,必须修改
accessKeyId: LTAI5tJPkn4HuuePdiLdGqe7
accessKeySecret: 4n9OJ7ZCVN1U6KeHDAtOyNeVZcjOuV

View File

@@ -17,9 +17,8 @@ import (
func UserRegister(c *gin.Context) {
params := api.UserRegisterReq{}
if err := c.BindJSON(&params); err != nil {
errMsg := " BindJSON failed " + err.Error()
log.NewError("0", errMsg)
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": errMsg})
log.NewError("0", "BindJSON failed ", err.Error())
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
return
}
@@ -38,24 +37,22 @@ func UserRegister(c *gin.Context) {
client := rpc.NewAuthClient(etcdConn)
reply, err := client.UserRegister(context.Background(), req)
if err != nil {
errMsg := req.OperationID + " " + "client.UserRegister failed " + err.Error() + req.String()
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
log.NewError(req.OperationID, "call rpc err ", err.Error())
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "internal service err"})
return
}
if reply.CommonResp.ErrCode != 0 {
errMsg := req.OperationID + " " + " client.UserRegister failed " + reply.CommonResp.ErrMsg + req.String()
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
log.NewError(req.OperationID, "UserRegister failed ", err)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": reply.CommonResp.ErrMsg})
return
}
pbDataToken := &rpc.UserTokenReq{Platform: params.Platform, FromUserID: params.UserID, OperationID: params.OperationID}
replyToken, err := client.UserToken(context.Background(), pbDataToken)
if err != nil {
errMsg := req.OperationID + " " + " client.UserToken failed " + err.Error() + pbDataToken.String()
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
log.NewError(req.OperationID, "UserToken failed ", err.Error(), pbDataToken)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
return
}
resp := api.UserRegisterResp{CommResp: api.CommResp{ErrCode: replyToken.CommonResp.ErrCode, ErrMsg: replyToken.CommonResp.ErrMsg},
@@ -68,16 +65,14 @@ func UserRegister(c *gin.Context) {
func UserToken(c *gin.Context) {
params := api.UserTokenReq{}
if err := c.BindJSON(&params); err != nil {
errMsg := " BindJSON failed " + err.Error()
log.NewError("0", errMsg)
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": errMsg})
log.NewError("0", "BindJSON failed ", err.Error())
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
return
}
if params.Secret != config.Config.Secret {
errMsg := params.OperationID + " params.Secret != config.Config.Secret "
log.NewError(params.OperationID, "params.Secret != config.Config.Secret", params.Secret, config.Config.Secret)
c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": errMsg})
c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "not authorized"})
return
}
req := &rpc.UserTokenReq{Platform: params.Platform, FromUserID: params.UserID, OperationID: params.OperationID}
@@ -86,9 +81,8 @@ func UserToken(c *gin.Context) {
client := rpc.NewAuthClient(etcdConn)
reply, err := client.UserToken(context.Background(), req)
if err != nil {
errMsg := req.OperationID + " UserToken failed " + err.Error() + req.String()
log.NewError(req.OperationID, errMsg)
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
log.NewError(req.OperationID, "UserToken failed ", err.Error(), req.String())
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
return
}
resp := api.UserTokenResp{CommResp: api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg},

View File

@@ -5,7 +5,6 @@ import (
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/log"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
pbConversation "Open_IM/pkg/proto/conversation"
pbUser "Open_IM/pkg/proto/user"
"Open_IM/pkg/utils"
"context"
@@ -45,37 +44,6 @@ func SetConversation(c *gin.Context) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
c.JSON(http.StatusOK, resp)
}
func ModifyConversationField(c *gin.Context) {
var (
req api.ModifyConversationFieldReq
resp api.ModifyConversationFieldResp
reqPb pbConversation.ModifyConversationFieldReq
)
if err := c.BindJSON(&req); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error())
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()})
return
}
reqPb.Conversation = &pbConversation.Conversation{}
err := utils.CopyStructFields(&reqPb, req)
err = utils.CopyStructFields(reqPb.Conversation, req.Conversation)
if err != nil {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", reqPb.String())
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImConversationName)
client := pbConversation.NewConversationClient(etcdConn)
respPb, err := client.ModifyConversationField(context.Background(), &reqPb)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "SetConversation rpc failed, ", reqPb.String(), err.Error())
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": "GetAllConversationMsgOpt rpc failed, " + err.Error()})
return
}
resp.ErrMsg = respPb.CommonResp.ErrMsg
resp.ErrCode = respPb.CommonResp.ErrCode
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp)
c.JSON(http.StatusOK, resp)
}
func BatchSetConversations(c *gin.Context) {
var (

View File

@@ -730,7 +730,3 @@ func SetGroupMemberNickname(c *gin.Context) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api return ", resp)
c.JSON(http.StatusOK, resp)
}
func GetGroupMemberIDListFromCache(c *gin.Context) {
}

View File

@@ -201,7 +201,8 @@ func GetWorkMomentByID(c *gin.Context) {
if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
}
resp.Data.WorkMoment = &apiStruct.WorkMoment{LikeUserList: []*apiStruct.WorkMomentUser{}, Comments: []*apiStruct.Comment{}, AtUserList: []*apiStruct.WorkMomentUser{}}
//resp.Data.WorkMoment = respPb.WorkMoment
resp.Data.WorkMoment = &apiStruct.WorkMoment{}
if err := utils.CopyStructFields(&resp.Data.WorkMoment, respPb.WorkMoment); err != nil {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
}
@@ -222,7 +223,7 @@ func GetUserWorkMoments(c *gin.Context) {
return
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
ok, opUserID := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
ok, userID := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
if !ok {
log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token"))
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"})
@@ -233,8 +234,7 @@ func GetUserWorkMoments(c *gin.Context) {
PageNumber: req.PageNumber,
ShowNumber: req.ShowNumber,
}
reqPb.OpUserID = opUserID
reqPb.UserID = req.UserID
reqPb.UserID = userID
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName)
client := pbOffice.NewOfficeServiceClient(etcdConn)
respPb, err := client.GetUserWorkMoments(context.Background(), &reqPb)
@@ -243,49 +243,11 @@ func GetUserWorkMoments(c *gin.Context) {
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserWorkMoments rpc server failed" + err.Error()})
return
}
resp.Data.WorkMoments = []*apiStruct.WorkMoment{}
if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
}
//if err := utils.CopyStructFields(&resp.Data.WorkMoments, respPb.WorkMoments); err != nil {
// log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
//}
for _, v := range respPb.WorkMoments {
workMoment := apiStruct.WorkMoment{
WorkMomentID: v.WorkMomentID,
UserID: v.UserID,
Content: v.Content,
FaceURL: v.FaceURL,
UserName: v.UserName,
CreateTime: v.CreateTime,
Comments: make([]*apiStruct.Comment, len(v.Comments)),
LikeUserList: make([]*apiStruct.WorkMomentUser, len(v.LikeUserList)),
AtUserList: make([]*apiStruct.WorkMomentUser, len(v.AtUserList)),
}
for i, comment := range v.Comments {
workMoment.Comments[i] = &apiStruct.Comment{
UserID: comment.UserID,
UserName: comment.UserName,
ReplyUserID: comment.ReplyUserID,
ReplyUserName: comment.ReplyUserName,
ContentID: comment.ContentID,
Content: comment.Content,
CreateTime: comment.CreateTime,
}
}
for i, likeUser := range v.LikeUserList {
workMoment.LikeUserList[i] = &apiStruct.WorkMomentUser{
UserID: likeUser.UserID,
UserName: likeUser.UserName,
}
}
for i, atUser := range v.AtUserList {
workMoment.AtUserList[i] = &apiStruct.WorkMomentUser{
UserID: atUser.UserID,
UserName: atUser.UserName,
}
}
resp.Data.WorkMoments = append(resp.Data.WorkMoments, &workMoment)
if err := utils.CopyStructFields(&resp.Data.WorkMoments, respPb.WorkMoments); err != nil {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
}
resp.Data.ShowNumber = respPb.Pagination.ShowNumber
resp.Data.CurrentPage = respPb.Pagination.CurrentPage
@@ -329,46 +291,8 @@ func GetUserFriendWorkMoments(c *gin.Context) {
if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
}
//if err := utils.CopyStructFields(&resp.Data.WorkMoments, respPb.WorkMoments); err != nil {
// log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
//}
resp.Data.WorkMoments = []*apiStruct.WorkMoment{}
for _, v := range respPb.WorkMoments {
workMoment := apiStruct.WorkMoment{
WorkMomentID: v.WorkMomentID,
UserID: v.UserID,
Content: v.Content,
FaceURL: v.FaceURL,
UserName: v.UserName,
CreateTime: v.CreateTime,
Comments: make([]*apiStruct.Comment, len(v.Comments)),
LikeUserList: make([]*apiStruct.WorkMomentUser, len(v.LikeUserList)),
AtUserList: make([]*apiStruct.WorkMomentUser, len(v.AtUserList)),
}
for i, comment := range v.Comments {
workMoment.Comments[i] = &apiStruct.Comment{
UserID: comment.UserID,
UserName: comment.UserName,
ReplyUserID: comment.ReplyUserID,
ReplyUserName: comment.ReplyUserName,
ContentID: comment.ContentID,
Content: comment.Content,
CreateTime: comment.CreateTime,
}
}
for i, likeUser := range v.LikeUserList {
workMoment.LikeUserList[i] = &apiStruct.WorkMomentUser{
UserID: likeUser.UserID,
UserName: likeUser.UserName,
}
}
for i, atUser := range v.AtUserList {
workMoment.AtUserList[i] = &apiStruct.WorkMomentUser{
UserID: atUser.UserID,
UserName: atUser.UserName,
}
}
resp.Data.WorkMoments = append(resp.Data.WorkMoments, &workMoment)
if err := utils.CopyStructFields(&resp.Data.WorkMoments, respPb.WorkMoments); err != nil {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
}
resp.Data.ShowNumber = respPb.Pagination.ShowNumber
resp.Data.CurrentPage = respPb.Pagination.CurrentPage

View File

@@ -7,7 +7,6 @@ import (
"context"
"github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials"
"github.com/minio/minio-go/v7/pkg/policy"
url2 "net/url"
)
@@ -59,10 +58,10 @@ func MinioInit() {
}
}
// 自动化桶public的代码
err = minioClient.SetBucketPolicy(context.Background(), config.Config.Credential.Minio.Bucket, policy.BucketPolicyReadWrite)
if err != nil {
log.NewDebug("", utils.GetSelfFuncName(), "SetBucketPolicy failed please set in web", err.Error())
return
}
//err = minioClient.SetBucketPolicy(context.Background(), config.Config.Credential.Minio.Bucket, policy.BucketPolicyReadWrite)
//if err != nil {
// log.NewError("", utils.GetSelfFuncName(), "SetBucketPolicy failed please set in web", err.Error())
// return
//}
log.NewInfo(operationID, utils.GetSelfFuncName(), "minio create and set policy success")
}

View File

@@ -8,7 +8,6 @@ import (
"Open_IM/pkg/common/log"
"Open_IM/pkg/common/token_verify"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
cacheRpc "Open_IM/pkg/proto/cache"
pbRelay "Open_IM/pkg/proto/relay"
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
rpc "Open_IM/pkg/proto/user"
@@ -19,214 +18,6 @@ import (
"strings"
)
func GetUsersInfoFromCache(c *gin.Context) {
params := api.GetUsersInfoReq{}
if err := c.BindJSON(&params); err != nil {
log.NewError("0", "BindJSON failed ", err.Error())
c.JSON(http.StatusBadRequest, gin.H{"errCode": http.StatusBadRequest, "errMsg": err.Error()})
return
}
req := &rpc.GetUserInfoReq{}
utils.CopyStructFields(req, &params)
var ok bool
ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
if !ok {
log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token"))
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"})
return
}
log.NewInfo(params.OperationID, "GetUserInfo args ", req.String())
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName)
client := rpc.NewUserClient(etcdConn)
RpcResp, err := client.GetUserInfo(context.Background(), req)
if err != nil {
log.NewError(req.OperationID, "GetUserInfo failed ", err.Error(), req.String())
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"})
return
}
var publicUserInfoList []*open_im_sdk.PublicUserInfo
for _, v := range RpcResp.UserInfoList {
publicUserInfoList = append(publicUserInfoList,
&open_im_sdk.PublicUserInfo{UserID: v.UserID, Nickname: v.Nickname, FaceURL: v.FaceURL, Gender: v.Gender, Ex: v.Ex})
}
resp := api.GetUsersInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, UserInfoList: publicUserInfoList}
resp.Data = jsonData.JsonDataList(resp.UserInfoList)
log.NewInfo(req.OperationID, "GetUserInfo api return ", resp)
c.JSON(http.StatusOK, resp)
}
//func GetUsersInfoFromCache(c *gin.Context) {
// params := api.GetUsersInfoReq{}
// if err := c.BindJSON(&params); err != nil {
// log.NewError("0", "BindJSON failed ", err.Error())
// c.JSON(http.StatusBadRequest, gin.H{"errCode": http.StatusBadRequest, "errMsg": err.Error()})
// return
// }
// getUserInfoReq := &rpc.GetUserInfoReq{}
// getUserInfoReq.OperationID = params.OperationID
// var ok bool
// ok, getUserInfoReq.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), getUserInfoReq.OperationID)
// if !ok {
// log.NewError(getUserInfoReq.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token"))
// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"})
// return
// }
// log.NewInfo(params.OperationID, "GetUserInfo args ", getUserInfoReq.String())
// reqCacheGetUserInfo := &cacheRpc.GetUserInfoFromCacheReq{}
// utils.CopyStructFields(reqCacheGetUserInfo, &params)
// var userInfoList []*open_im_sdk.UserInfo
// var publicUserInfoList []*open_im_sdk.PublicUserInfo
// etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName)
// cacheClient := cacheRpc.NewCacheClient(etcdConn)
// cacheResp, err := cacheClient.GetUserInfoFromCache(context.Background(), reqCacheGetUserInfo)
// if err != nil {
// log.NewError(getUserInfoReq.OperationID, utils.GetSelfFuncName(), "GetUserInfo failed", err.Error())
// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed: " + err.Error()})
// return
// }
// if cacheResp.CommonResp.ErrCode != 0 {
// log.NewError(getUserInfoReq.OperationID, utils.GetSelfFuncName(), "GetUserInfo failed", cacheResp.CommonResp)
// resp := api.GetUsersInfoResp{CommResp: api.CommResp{ErrCode: cacheResp.CommonResp.ErrCode, ErrMsg: cacheResp.CommonResp.ErrMsg}}
// resp.Data = []map[string]interface{}{}
// log.NewInfo(getUserInfoReq.OperationID, "GetUserInfo api return ", resp)
// c.JSON(http.StatusOK, resp)
// return
// }
// log.NewInfo(getUserInfoReq.OperationID, utils.GetSelfFuncName(), "cacheResp:", cacheResp.String())
// userInfoList = cacheResp.UserInfoList
// var needCacheUserIDList []string
// for _, userID := range reqCacheGetUserInfo.UserIDList {
// isGetUserInfoFromCache := false
// for _, cacheUser := range userInfoList {
// if cacheUser.UserID == userID {
// isGetUserInfoFromCache = true
// }
// }
// if !isGetUserInfoFromCache {
// needCacheUserIDList = append(needCacheUserIDList, userID)
// }
// }
// if len(needCacheUserIDList) == 0 {
// log.NewInfo(getUserInfoReq.OperationID, utils.GetSelfFuncName(), "get all userInfo from cache success")
// for _, v := range userInfoList {
// publicUserInfoList = append(publicUserInfoList,
// &open_im_sdk.PublicUserInfo{UserID: v.UserID, Nickname: v.Nickname, FaceURL: v.FaceURL, Gender: v.Gender, Ex: v.Ex})
// }
// resp := api.GetUsersInfoResp{CommResp: api.CommResp{ErrCode: cacheResp.CommonResp.ErrCode, ErrMsg: cacheResp.CommonResp.ErrMsg}, UserInfoList: publicUserInfoList}
// resp.Data = jsonData.JsonDataList(resp.UserInfoList)
// log.NewInfo(getUserInfoReq.OperationID, "GetUserInfo api return ", resp)
// c.JSON(http.StatusOK, resp)
// return
// }
//
// log.NewDebug(getUserInfoReq.OperationID, utils.GetSelfFuncName(), "need cache user list", needCacheUserIDList)
// getUserInfoReq.UserIDList = needCacheUserIDList
// etcdConn = getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName)
// client := rpc.NewUserClient(etcdConn)
// rpcResp, err := client.GetUserInfo(context.Background(), getUserInfoReq)
// if err != nil {
// log.NewError(getUserInfoReq.OperationID, "GetUserInfo failed ", err.Error(), getUserInfoReq.String())
// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed" + err.Error()})
// return
// }
// if rpcResp.CommonResp.ErrCode != 0 {
// log.NewError(getUserInfoReq.OperationID, utils.GetSelfFuncName(), "GetUserInfo failed", cacheResp.CommonResp)
// resp := api.GetUsersInfoResp{CommResp: api.CommResp{ErrCode: cacheResp.CommonResp.ErrCode, ErrMsg: cacheResp.CommonResp.ErrMsg}}
// resp.Data = []map[string]interface{}{}
// log.NewInfo(getUserInfoReq.OperationID, "GetUserInfo api return ", resp)
// c.JSON(http.StatusOK, resp)
// return
// }
// userInfoList = append(userInfoList, rpcResp.UserInfoList...)
// cacheUpdateUserInfoReq := &cacheRpc.UpdateUserInfoToCacheReq{
// UserInfoList: rpcResp.UserInfoList,
// OperationID: getUserInfoReq.OperationID,
// }
// _, err = cacheClient.UpdateUserInfoToCache(context.Background(), cacheUpdateUserInfoReq)
// if err != nil {
// log.NewError(getUserInfoReq.OperationID, "GetUserInfo failed ", err.Error())
// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed:" + err.Error()})
// return
// }
// userInfoList = rpcResp.UserInfoList
// for _, v := range userInfoList {
// publicUserInfoList = append(publicUserInfoList,
// &open_im_sdk.PublicUserInfo{UserID: v.UserID, Nickname: v.Nickname, FaceURL: v.FaceURL, Gender: v.Gender, Ex: v.Ex})
// }
// resp := api.GetUsersInfoResp{CommResp: api.CommResp{ErrCode: rpcResp.CommonResp.ErrCode, ErrMsg: rpcResp.CommonResp.ErrMsg}, UserInfoList: publicUserInfoList}
// resp.Data = jsonData.JsonDataList(resp.UserInfoList)
// log.NewInfo(getUserInfoReq.OperationID, "GetUserInfo api return ", resp)
// c.JSON(http.StatusOK, resp)
//}
func GetFriendIDListFromCache(c *gin.Context) {
var (
req api.GetFriendIDListFromCacheReq
resp api.GetFriendIDListFromCacheResp
reqPb cacheRpc.GetFriendIDListFromCacheReq
respPb *cacheRpc.GetFriendIDListFromCacheResp
)
if err := c.BindJSON(&req); err != nil {
log.NewError(req.OperationID, "BindJSON failed ", err.Error())
c.JSON(http.StatusBadRequest, gin.H{"errCode": http.StatusBadRequest, "errMsg": err.Error()})
return
}
reqPb.OperationID = req.OperationID
var ok bool
ok, reqPb.UserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
if !ok {
log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token"))
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"})
return
}
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName)
client := cacheRpc.NewCacheClient(etcdConn)
respPb, err := client.GetFriendIDListFromCache(context.Background(), &reqPb)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetFriendIDListFromCache", err.Error())
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed:" + err.Error()})
return
}
resp.UserIDList = respPb.UserIDList
resp.CommResp = api.CommResp{ErrMsg: respPb.CommonResp.ErrMsg, ErrCode: respPb.CommonResp.ErrCode}
c.JSON(http.StatusOK, resp)
}
func GetBlackIDListFromCache(c *gin.Context) {
var (
req api.GetBlackIDListFromCacheReq
resp api.GetBlackIDListFromCacheResp
reqPb cacheRpc.GetBlackIDListFromCacheReq
respPb *cacheRpc.GetBlackIDListFromCacheResp
)
if err := c.BindJSON(&req); err != nil {
log.NewError(req.OperationID, "BindJSON failed ", err.Error())
c.JSON(http.StatusBadRequest, gin.H{"errCode": http.StatusBadRequest, "errMsg": err.Error()})
return
}
reqPb.OperationID = req.OperationID
var ok bool
ok, reqPb.UserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
if !ok {
log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token"))
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"})
return
}
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName)
client := cacheRpc.NewCacheClient(etcdConn)
respPb, err := client.GetBlackIDListFromCache(context.Background(), &reqPb)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetFriendIDListFromCache", err.Error())
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed:" + err.Error()})
return
}
resp.UserIDList = respPb.UserIDList
resp.CommResp = api.CommResp{ErrMsg: respPb.CommonResp.ErrMsg, ErrCode: respPb.CommonResp.ErrCode}
c.JSON(http.StatusOK, resp)
}
func GetUsersInfo(c *gin.Context) {
params := api.GetUsersInfoReq{}
if err := c.BindJSON(&params); err != nil {

View File

@@ -15,7 +15,7 @@ import (
func NewGinRouter() *gin.Engine {
gin.SetMode(gin.ReleaseMode)
baseRouter := gin.Default()
router := baseRouter.Group("/cms")
router := baseRouter.Group("/api")
router.Use(middleware.CorsHandler())
adminRouterGroup := router.Group("/admin")
{

View File

@@ -42,11 +42,11 @@ func Login(c *gin.Context) {
return
}
if r.Password != params.Password {
log.NewError(params.OperationID, "password err", params.Password, account, r.Password, r.Account)
log.NewError(params.OperationID, "password err", params.Password, account, r.Password, r.Account)
c.JSON(http.StatusOK, gin.H{"errCode": constant.PasswordErr, "errMsg": "password err"})
return
}
url := fmt.Sprintf("http://%s:%d/auth/user_token", utils.ServerIP, config.Config.Api.GinPort[0])
url := fmt.Sprintf("http://%s:10000/auth/user_token", utils.ServerIP)
openIMGetUserToken := api.UserTokenReq{}
openIMGetUserToken.OperationID = params.OperationID
openIMGetUserToken.Platform = params.Platform

View File

@@ -53,7 +53,7 @@ func SetPassword(c *gin.Context) {
return
}
}
url := fmt.Sprintf("http://%s:%d/auth/user_register", utils.ServerIP, config.Config.Api.GinPort[0])
url := fmt.Sprintf("http://%s:10000/auth/user_register", utils.ServerIP)
openIMRegisterReq := api.UserRegisterReq{}
openIMRegisterReq.OperationID = params.OperationID
openIMRegisterReq.Platform = params.Platform

View File

@@ -54,7 +54,7 @@ func (ws *WServer) wsHandler(w http.ResponseWriter, r *http.Request) {
query := r.URL.Query()
conn, err := ws.wsUpGrader.Upgrade(w, r, nil) //Conn is obtained through the upgraded escalator
if err != nil {
log.ErrorByKv("upgrade http conn err", "", "err", err, query)
log.ErrorByKv("upgrade http conn err", "", "err", err)
return
} else {
//Connection mapping relationship,
@@ -196,7 +196,6 @@ func (ws *WServer) addUserConn(uid string, platformID int32, conn *UserConn, tok
func (ws *WServer) delUserConn(conn *UserConn) {
rwLock.Lock()
defer rwLock.Unlock()
operationID := utils.OperationIDGenerator()
var platform, uid string
if oldStringMap, ok := ws.wsConnToUser[conn]; ok {
for k, v := range oldStringMap {
@@ -213,9 +212,9 @@ func (ws *WServer) delUserConn(conn *UserConn) {
for _, v := range ws.wsUserToConn {
count = count + len(v)
}
log.NewWarn(operationID, "WS delete operation", "", "wsUser deleted", ws.wsUserToConn, "disconnection_uid", uid, "disconnection_platform", platform, "online_user_num", len(ws.wsUserToConn), "online_conn_num", count)
log.WarnByKv("WS delete operation", "", "wsUser deleted", ws.wsUserToConn, "disconnection_uid", uid, "disconnection_platform", platform, "online_user_num", len(ws.wsUserToConn), "online_conn_num", count)
} else {
log.NewWarn(operationID, "WS delete operation", "", "wsUser deleted", ws.wsUserToConn, "disconnection_uid", uid, "disconnection_platform", platform, "online_user_num", len(ws.wsUserToConn))
log.WarnByKv("WS delete operation", "", "wsUser deleted", ws.wsUserToConn, "disconnection_uid", uid, "disconnection_platform", platform, "online_user_num", len(ws.wsUserToConn))
}
userCount = uint64(len(ws.wsUserToConn))
delete(ws.wsConnToUser, conn)
@@ -223,7 +222,8 @@ func (ws *WServer) delUserConn(conn *UserConn) {
}
err := conn.Close()
if err != nil {
log.Error(operationID, " close err", "", "uid", uid, "platform", platform)
log.ErrorByKv("close err", "", "uid", uid, "platform", platform)
}
}
@@ -267,7 +267,7 @@ func (ws *WServer) headerCheck(w http.ResponseWriter, r *http.Request) bool {
operationID = query["operationID"][0]
}
if len(query["token"]) != 0 && len(query["sendID"]) != 0 && len(query["platformID"]) != 0 {
if ok, err, msg := token_verify.WsVerifyToken(query["token"][0], query["sendID"][0], query["platformID"][0], operationID); !ok {
if ok, err, msg := token_verify.WsVerifyToken(query["token"][0], query["sendID"][0], query["platformID"][0]); !ok {
// e := err.(*constant.ErrInfo)
log.Error(operationID, "Token verify failed ", "query ", query, msg, err.Error())
w.Header().Set("Sec-Websocket-Version", "13")
@@ -281,7 +281,7 @@ func (ws *WServer) headerCheck(w http.ResponseWriter, r *http.Request) bool {
} else {
log.Error(operationID, "Args err", "query", query)
w.Header().Set("Sec-Websocket-Version", "13")
w.Header().Set("ws_err_msg", "args err, need token, sendID, platformID")
w.Header().Set("ws_err_msg", "args err")
http.Error(w, http.StatusText(status), status)
return false
}

View File

@@ -14,7 +14,6 @@ import (
"github.com/Shopify/sarama"
"github.com/golang/protobuf/proto"
"strings"
"time"
)
type fcb func(msg []byte, msgKey string)
@@ -39,7 +38,7 @@ func (mc *HistoryConsumerHandler) Init() {
}
func (mc *HistoryConsumerHandler) handleChatWs2Mongo(msg []byte, msgKey string) {
now := time.Now()
time := utils.GetCurrentTimestampByNano()
msgFromMQ := pbMsg.MsgDataToMQ{}
err := proto.Unmarshal(msg, &msgFromMQ)
if err != nil {
@@ -63,13 +62,13 @@ func (mc *HistoryConsumerHandler) handleChatWs2Mongo(msg []byte, msgKey string)
return
}
mc.singleMsgCount++
log.NewDebug(msgFromMQ.OperationID, "sendMessageToPush cost time ", time.Since(now))
log.NewDebug(msgFromMQ.OperationID, "sendMessageToPush cost time ", utils.GetCurrentTimestampByNano()-time)
}
if !isSenderSync && msgKey == msgFromMQ.MsgData.SendID {
} else {
go sendMessageToPush(&msgFromMQ, msgKey)
}
log.NewDebug(operationID, "saveUserChat cost time ", time.Since(now))
log.NewDebug(operationID, "saveUserChat cost time ", utils.GetCurrentTimestampByNano()-time)
case constant.GroupChatType:
log.NewDebug(msgFromMQ.OperationID, "msg_transfer msg type = GroupChatType", isHistory, isPersist)
if isHistory {
@@ -90,13 +89,13 @@ func (mc *HistoryConsumerHandler) handleChatWs2Mongo(msg []byte, msgKey string)
return
}
mc.singleMsgCount++
log.NewDebug(msgFromMQ.OperationID, "sendMessageToPush cost time ", time.Since(now))
log.NewDebug(msgFromMQ.OperationID, "sendMessageToPush cost time ", utils.GetCurrentTimestampByNano()-time)
}
if !isSenderSync && msgKey == msgFromMQ.MsgData.SendID {
} else {
go sendMessageToPush(&msgFromMQ, msgKey)
}
log.NewDebug(operationID, "saveUserChat cost time ", time.Since(now))
log.NewDebug(operationID, "saveUserChat cost time ", utils.GetCurrentTimestampByNano()-time)
default:
log.NewError(msgFromMQ.OperationID, "SessionType error", msgFromMQ.String())
return

View File

@@ -37,7 +37,7 @@ type AtContent struct {
func MsgToUser(pushMsg *pbPush.PushMsgReq) {
var wsResult []*pbRelay.SingleMsgToUser
isOfflinePush := utils.GetSwitchFromOptions(pushMsg.MsgData.Options, constant.IsOfflinePush)
log.Debug(pushMsg.OperationID, "Get msg from msg_transfer And push msg", pushMsg.String())
log.Debug("Get msg from msg_transfer And push msg", pushMsg.OperationID, "PushData", pushMsg.String())
grpcCons := getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOnlineMessageRelayName)
//Online push message
log.Debug("test", pushMsg.OperationID, "len grpc", len(grpcCons), "data", pushMsg.String())
@@ -45,14 +45,14 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) {
msgClient := pbRelay.NewOnlineMessageRelayServiceClient(v)
reply, err := msgClient.OnlinePushMsg(context.Background(), &pbRelay.OnlinePushMsgReq{OperationID: pushMsg.OperationID, MsgData: pushMsg.MsgData, PushToUserID: pushMsg.PushToUserID})
if err != nil {
log.NewError("push data to client rpc err", pushMsg.OperationID, "err", err)
log.InfoByKv("push data to client rpc err", pushMsg.OperationID, "err", err)
continue
}
if reply != nil && reply.Resp != nil {
wsResult = append(wsResult, reply.Resp...)
}
}
log.NewInfo(pushMsg.OperationID, "push_result", wsResult, "sendData", pushMsg.MsgData)
log.InfoByKv("push_result", pushMsg.OperationID, "result", wsResult, "sendData", pushMsg.MsgData)
count++
if isOfflinePush && pushMsg.PushToUserID != pushMsg.MsgData.SendID {
for _, v := range wsResult {

View File

@@ -20,41 +20,38 @@ import (
)
func (rpc *rpcAuth) UserRegister(_ context.Context, req *pbAuth.UserRegisterReq) (*pbAuth.UserRegisterResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String())
log.NewInfo(req.OperationID, "UserRegister args ", req.String())
var user db.User
utils.CopyStructFields(&user, req.UserInfo)
if req.UserInfo.Birth != 0 {
user.Birth = utils.UnixSecondToTime(int64(req.UserInfo.Birth))
}
log.Debug(req.OperationID, "copy ", user, req.UserInfo)
err := imdb.UserRegister(user)
if err != nil {
errMsg := req.OperationID + " imdb.UserRegister failed " + err.Error() + user.UserID
log.NewError(req.OperationID, errMsg, user)
return &pbAuth.UserRegisterResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}}, nil
log.NewError(req.OperationID, "UserRegister failed ", err.Error(), user)
return &pbAuth.UserRegisterResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc return ", pbAuth.UserRegisterResp{CommonResp: &pbAuth.CommonResp{}})
log.NewInfo(req.OperationID, "rpc UserRegister return")
return &pbAuth.UserRegisterResp{CommonResp: &pbAuth.CommonResp{}}, nil
}
func (rpc *rpcAuth) UserToken(_ context.Context, req *pbAuth.UserTokenReq) (*pbAuth.UserTokenResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc args ", req.String())
log.NewInfo(req.OperationID, "UserToken args ", req.String())
_, err := imdb.GetUserByUserID(req.FromUserID)
if err != nil {
errMsg := req.OperationID + " imdb.GetUserByUserID failed " + err.Error() + req.FromUserID
log.NewError(req.OperationID, errMsg)
return &pbAuth.UserTokenResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}}, nil
log.NewError(req.OperationID, "GetUserByUserID failed ", err.Error(), req.FromUserID)
return &pbAuth.UserTokenResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
}
tokens, expTime, err := token_verify.CreateToken(req.FromUserID, req.Platform)
if err != nil {
errMsg := req.OperationID + " token_verify.CreateToken failed " + err.Error() + req.FromUserID + utils.Int32ToString(req.Platform)
log.NewError(req.OperationID, errMsg)
return &pbAuth.UserTokenResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}}, nil
log.NewError(req.OperationID, "CreateToken failed ", err.Error(), req.FromUserID, req.Platform)
return &pbAuth.UserTokenResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " rpc return ", pbAuth.UserTokenResp{CommonResp: &pbAuth.CommonResp{}, Token: tokens, ExpiredTime: expTime})
log.NewInfo(req.OperationID, "rpc UserToken return ", tokens, expTime)
return &pbAuth.UserTokenResp{CommonResp: &pbAuth.CommonResp{}, Token: tokens, ExpiredTime: expTime}, nil
}
@@ -76,16 +73,15 @@ func NewRpcAuthServer(port int) *rpcAuth {
}
func (rpc *rpcAuth) Run() {
operationID := utils.OperationIDGenerator()
log.NewInfo(operationID, "rpc auth start...")
log.NewInfo("0", "rpc auth start...")
address := utils.ServerIP + ":" + strconv.Itoa(rpc.rpcPort)
listener, err := net.Listen("tcp", address)
if err != nil {
log.NewError(operationID, "listen network failed ", err.Error(), address)
log.NewError("0", "listen network failed ", err.Error(), address)
return
}
log.NewInfo(operationID, "listen network success, ", address, listener)
log.NewInfo("0", "listen network success, ", address, listener)
//grpc server
srv := grpc.NewServer()
defer srv.GracefulStop()
@@ -94,15 +90,15 @@ func (rpc *rpcAuth) Run() {
pbAuth.RegisterAuthServer(srv, rpc)
err = getcdv3.RegisterEtcd(rpc.etcdSchema, strings.Join(rpc.etcdAddr, ","), utils.ServerIP, rpc.rpcPort, rpc.rpcRegisterName, 10)
if err != nil {
log.NewError(operationID, "RegisterEtcd failed ", err.Error(),
log.NewError("0", "RegisterEtcd failed ", err.Error(),
rpc.etcdSchema, strings.Join(rpc.etcdAddr, ","), utils.ServerIP, rpc.rpcPort, rpc.rpcRegisterName)
return
}
log.NewInfo(operationID, "RegisterAuthServer ok ", rpc.etcdSchema, strings.Join(rpc.etcdAddr, ","), utils.ServerIP, rpc.rpcPort, rpc.rpcRegisterName)
log.NewInfo("0", "RegisterAuthServer ok ", rpc.etcdSchema, strings.Join(rpc.etcdAddr, ","), utils.ServerIP, rpc.rpcPort, rpc.rpcRegisterName)
err = srv.Serve(listener)
if err != nil {
log.NewError(operationID, "Serve failed ", err.Error())
log.NewError("0", "Serve failed ", err.Error())
return
}
log.NewInfo(operationID, "rpc auth ok")
log.NewInfo("0", "rpc auth ok")
}

View File

@@ -1,330 +0,0 @@
package cache
import (
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db"
imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
"Open_IM/pkg/common/log"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
pbCache "Open_IM/pkg/proto/cache"
commonPb "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils"
"context"
"google.golang.org/grpc"
"net"
"strconv"
"strings"
)
type cacheServer struct {
rpcPort int
rpcRegisterName string
etcdSchema string
etcdAddr []string
}
func NewCacheServer(port int) *cacheServer {
log.NewPrivateLog(constant.LogFileName)
return &cacheServer{
rpcPort: port,
rpcRegisterName: config.Config.RpcRegisterName.OpenImCacheName,
etcdSchema: config.Config.Etcd.EtcdSchema,
etcdAddr: config.Config.Etcd.EtcdAddr,
}
}
func (s *cacheServer) Run() {
log.NewInfo("0", "cacheServer rpc start ")
ip := utils.ServerIP
registerAddress := ip + ":" + strconv.Itoa(s.rpcPort)
//listener network
listener, err := net.Listen("tcp", registerAddress)
if err != nil {
log.NewError("0", "Listen failed ", err.Error(), registerAddress)
return
}
log.NewInfo("0", "listen network success, ", registerAddress, listener)
defer listener.Close()
//grpc server
//to cache
err = SyncDB2Cache()
if err != nil {
log.NewError("", err.Error(), "db to cache failed")
panic(err.Error())
}
srv := grpc.NewServer()
defer srv.GracefulStop()
pbCache.RegisterCacheServer(srv, s)
err = getcdv3.RegisterEtcd(s.etcdSchema, strings.Join(s.etcdAddr, ","), ip, s.rpcPort, s.rpcRegisterName, 10)
if err != nil {
log.NewError("0", "RegisterEtcd failed ", err.Error())
return
}
err = srv.Serve(listener)
if err != nil {
log.NewError("0", "Serve failed ", err.Error())
return
}
log.NewInfo("0", "message cms rpc success")
}
func SyncDB2Cache() error {
var err error
log.NewInfo("0", utils.GetSelfFuncName())
userList, err := imdb.GetAllUser()
if err != nil {
return utils.Wrap(err, "")
}
//err = updateAllUserToCache(userList)
err = updateAllFriendToCache(userList)
err = updateAllBlackListToCache(userList)
err = updateAllGroupMemberListToCache()
return err
}
func DelRelationCache() {}
func updateAllUserToCache(userList []db.User) error {
for _, userInfo := range userList {
userInfoPb := &commonPb.UserInfo{
UserID: userInfo.UserID,
Nickname: userInfo.Nickname,
FaceURL: userInfo.FaceURL,
Gender: userInfo.Gender,
PhoneNumber: userInfo.PhoneNumber,
Birth: uint32(userInfo.Birth.Unix()),
Email: userInfo.Email,
Ex: userInfo.Ex,
CreateTime: uint32(userInfo.CreateTime.Unix()),
AppMangerLevel: userInfo.AppMangerLevel,
}
m, err := utils.Pb2Map(userInfoPb)
if err != nil {
log.NewError("", utils.GetSelfFuncName(), err.Error())
}
if err := db.DB.SetUserInfoToCache(userInfo.UserID, m); err != nil {
log.NewError("0", utils.GetSelfFuncName(), "set userInfo to cache failed", err.Error())
}
}
log.NewInfo("0", utils.GetSelfFuncName(), "ok")
return nil
}
func updateAllGroupMemberListToCache() error {
log.NewInfo("0", utils.GetSelfFuncName())
groupIDList, err := imdb.GetAllGroupIDList()
if err != nil {
log.NewError("0", utils.GetSelfFuncName(), "getAllGroupIDList failed", err.Error())
panic(err.Error())
}
for _, groupID := range groupIDList {
groupMemberIDList, err := imdb.GetGroupMemberIDListByGroupID(groupID)
if err != nil {
log.NewError("", utils.GetSelfFuncName(), "GetGroupMemberIDListByGroupID", err.Error())
continue
}
log.NewDebug("", utils.GetSelfFuncName(), "groupMemberIDList", groupMemberIDList)
if err := db.DB.AddGroupMemberToCache(groupID, groupMemberIDList...); err != nil {
log.NewError("", utils.GetSelfFuncName(), "AddGroupMemberToCache", err.Error())
}
}
log.NewInfo("0", utils.GetSelfFuncName(), "ok")
return nil
}
func updateAllFriendToCache(userList []db.User) error {
log.NewInfo("0", utils.GetSelfFuncName())
for _, user := range userList {
friendIDList, err := imdb.GetFriendIDListByUserID(user.UserID)
if err != nil {
log.NewError("0", utils.GetSelfFuncName(), err.Error())
continue
}
if err := db.DB.AddFriendToCache(user.UserID, friendIDList...); err != nil {
log.NewError("0", utils.GetSelfFuncName(), err.Error())
}
}
log.NewInfo("0", utils.GetSelfFuncName(), "ok")
return nil
}
func updateAllBlackListToCache(userList []db.User) error {
log.NewInfo("0", utils.GetSelfFuncName())
for _, user := range userList {
blackIDList, err := imdb.GetBlackIDListByUserID(user.UserID)
if err != nil {
log.NewError("", utils.GetSelfFuncName(), err.Error())
continue
}
if err := db.DB.AddBlackUserToCache(user.UserID, blackIDList...); err != nil {
log.NewError("0", utils.GetSelfFuncName(), err.Error())
}
}
log.NewInfo("0", utils.GetSelfFuncName(), "ok")
return nil
}
func (s *cacheServer) GetUserInfoFromCache(_ context.Context, req *pbCache.GetUserInfoFromCacheReq) (resp *pbCache.GetUserInfoFromCacheResp, err error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp = &pbCache.GetUserInfoFromCacheResp{
CommonResp: &pbCache.CommonResp{},
}
for _, userID := range req.UserIDList {
userInfo, err := db.DB.GetUserInfoFromCache(userID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "get userInfo from cache failed", err.Error())
continue
}
resp.UserInfoList = append(resp.UserInfoList, userInfo)
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
}
func (s *cacheServer) UpdateUserInfoToCache(_ context.Context, req *pbCache.UpdateUserInfoToCacheReq) (resp *pbCache.UpdateUserInfoToCacheResp, err error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp = &pbCache.UpdateUserInfoToCacheResp{
CommonResp: &pbCache.CommonResp{},
}
for _, userInfo := range req.UserInfoList {
m, err := utils.Pb2Map(userInfo)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error(), *userInfo)
}
if err := db.DB.SetUserInfoToCache(userInfo.UserID, m); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "set userInfo to cache failed", err.Error())
}
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
}
func (s *cacheServer) GetFriendIDListFromCache(_ context.Context, req *pbCache.GetFriendIDListFromCacheReq) (resp *pbCache.GetFriendIDListFromCacheResp, err error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp = &pbCache.GetFriendIDListFromCacheResp{CommonResp: &pbCache.CommonResp{}}
friendIDList, err := db.DB.GetFriendIDListFromCache(req.UserID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetFriendIDListFromCache", err.Error())
resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
resp.CommonResp.ErrMsg = constant.ErrDB.ErrMsg
return resp, nil
}
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), friendIDList)
resp.UserIDList = friendIDList
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
}
func (s *cacheServer) AddFriendToCache(_ context.Context, req *pbCache.AddFriendToCacheReq) (resp *pbCache.AddFriendToCacheResp, err error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp = &pbCache.AddFriendToCacheResp{CommonResp: &pbCache.CommonResp{}}
if err := db.DB.AddFriendToCache(req.UserID, req.FriendID); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "AddFriendToCache failed", err.Error())
resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
resp.CommonResp.ErrMsg = constant.ErrDB.ErrMsg
return resp, nil
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
}
func (s *cacheServer) ReduceFriendFromCache(_ context.Context, req *pbCache.ReduceFriendFromCacheReq) (resp *pbCache.ReduceFriendFromCacheResp, err error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp = &pbCache.ReduceFriendFromCacheResp{CommonResp: &pbCache.CommonResp{}}
if err := db.DB.ReduceFriendToCache(req.UserID, req.FriendID); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "AddFriendToCache failed", err.Error())
resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
resp.CommonResp.ErrMsg = constant.ErrDB.ErrMsg
return resp, nil
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
}
func (s *cacheServer) GetBlackIDListFromCache(_ context.Context, req *pbCache.GetBlackIDListFromCacheReq) (resp *pbCache.GetBlackIDListFromCacheResp, err error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp = &pbCache.GetBlackIDListFromCacheResp{CommonResp: &pbCache.CommonResp{}}
blackUserIDList, err := db.DB.GetBlackListFromCache(req.UserID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "AddFriendToCache failed", err.Error())
resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
resp.CommonResp.ErrMsg = constant.ErrDB.ErrMsg
return resp, nil
}
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), blackUserIDList)
resp.UserIDList = blackUserIDList
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
}
func (s *cacheServer) AddBlackUserToCache(_ context.Context, req *pbCache.AddBlackUserToCacheReq) (resp *pbCache.AddBlackUserToCacheResp, err error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp = &pbCache.AddBlackUserToCacheResp{CommonResp: &pbCache.CommonResp{}}
if err := db.DB.AddBlackUserToCache(req.UserID, req.BlackUserID); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error())
resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
resp.CommonResp.ErrMsg = constant.ErrDB.ErrMsg
return resp, nil
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
}
func (s *cacheServer) ReduceBlackUserFromCache(_ context.Context, req *pbCache.ReduceBlackUserFromCacheReq) (resp *pbCache.ReduceBlackUserFromCacheResp, err error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp = &pbCache.ReduceBlackUserFromCacheResp{CommonResp: &pbCache.CommonResp{}}
if err := db.DB.ReduceBlackUserFromCache(req.UserID, req.BlackUserID); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error())
resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
resp.CommonResp.ErrMsg = constant.ErrDB.ErrMsg
return resp, nil
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
}
func (s *cacheServer) GetGroupMemberIDListFromCache(_ context.Context, req *pbCache.GetGroupMemberIDListFromCacheReq) (resp *pbCache.GetGroupMemberIDListFromCacheResp, err error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp = &pbCache.GetGroupMemberIDListFromCacheResp{
CommonResp: &pbCache.CommonResp{},
}
userIDList, err := db.DB.GetGroupMemberIDListFromCache(req.GroupID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupMemberIDListFromCache failed", err.Error())
resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
resp.CommonResp.ErrMsg = constant.ErrDB.ErrMsg
return resp, nil
}
resp.UserIDList = userIDList
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
}
func (s *cacheServer) AddGroupMemberToCache(_ context.Context, req *pbCache.AddGroupMemberToCacheReq) (resp *pbCache.AddGroupMemberToCacheResp, err error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp = &pbCache.AddGroupMemberToCacheResp{CommonResp: &pbCache.CommonResp{}}
if err := db.DB.AddGroupMemberToCache(req.GroupID, req.UserIDList...); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "AddGroupMemberToCache failed", err.Error())
resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
resp.CommonResp.ErrMsg = constant.ErrDB.ErrMsg
return resp, nil
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
}
func (s *cacheServer) ReduceGroupMemberFromCache(_ context.Context, req *pbCache.ReduceGroupMemberFromCacheReq) (resp *pbCache.ReduceGroupMemberFromCacheResp, err error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp = &pbCache.ReduceGroupMemberFromCacheResp{}
if err := db.DB.ReduceGroupMemberFromCache(req.GroupID, req.UserIDList...); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "ReduceGroupMemberFromCache failed", err.Error())
resp.CommonResp.ErrCode = constant.ErrDB.ErrCode
resp.CommonResp.ErrMsg = constant.ErrDB.ErrMsg
return resp, nil
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
}

View File

@@ -1,167 +0,0 @@
package conversation
import (
chat "Open_IM/internal/rpc/msg"
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db"
imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
"Open_IM/pkg/common/log"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
pbConversation "Open_IM/pkg/proto/conversation"
"Open_IM/pkg/utils"
"context"
"net"
"strconv"
"strings"
"Open_IM/pkg/common/config"
"google.golang.org/grpc"
)
type rpcConversation struct {
rpcPort int
rpcRegisterName string
etcdSchema string
etcdAddr []string
}
func (rpc *rpcConversation) ModifyConversationField(c context.Context, req *pbConversation.ModifyConversationFieldReq) (*pbConversation.ModifyConversationFieldResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp := &pbConversation.ModifyConversationFieldResp{}
var err error
if req.Conversation.ConversationType == constant.GroupChatType {
groupInfo, err := imdb.GetGroupInfoByGroupID(req.Conversation.GroupID)
if err != nil {
log.NewError(req.OperationID, "GetGroupInfoByGroupID failed ", req.Conversation.GroupID, err.Error())
resp.CommonResp = &pbConversation.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
return resp, nil
}
if groupInfo.Status == constant.GroupStatusDismissed && !req.Conversation.IsNotInGroup {
errMsg := "group status is dismissed"
resp.CommonResp = &pbConversation.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: errMsg}
return resp, nil
}
}
var conversation db.Conversation
if err := utils.CopyStructFields(&conversation, req.Conversation); err != nil {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", *req.Conversation, err.Error())
}
haveUserID, _ := imdb.GetExistConversationUserIDList(req.UserIDList, req.Conversation.ConversationID)
switch req.FieldType {
case constant.FieldRecvMsgOpt:
for _, v := range req.UserIDList {
if err = db.DB.SetSingleConversationRecvMsgOpt(v, req.Conversation.ConversationID, req.Conversation.RecvMsgOpt); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "cache failed, rpc return", err.Error())
resp.CommonResp = &pbConversation.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
return resp, nil
}
}
err = imdb.UpdateColumnsConversations(haveUserID, req.Conversation.ConversationID, map[string]interface{}{"recv_msg_opt": conversation.RecvMsgOpt})
case constant.FieldGroupAtType:
err = imdb.UpdateColumnsConversations(haveUserID, req.Conversation.ConversationID, map[string]interface{}{"group_at_type": conversation.GroupAtType})
case constant.FieldIsNotInGroup:
err = imdb.UpdateColumnsConversations(haveUserID, req.Conversation.ConversationID, map[string]interface{}{"is_not_in_group": conversation.IsNotInGroup})
case constant.FieldIsPinned:
err = imdb.UpdateColumnsConversations(haveUserID, req.Conversation.ConversationID, map[string]interface{}{"is_pinned": conversation.IsPinned})
case constant.FieldIsPrivateChat:
err = imdb.UpdateColumnsConversations(haveUserID, req.Conversation.ConversationID, map[string]interface{}{"is_private_chat": conversation.IsPrivateChat})
case constant.FieldEx:
err = imdb.UpdateColumnsConversations(haveUserID, req.Conversation.ConversationID, map[string]interface{}{"ex": conversation.Ex})
case constant.FieldAttachedInfo:
err = imdb.UpdateColumnsConversations(haveUserID, req.Conversation.ConversationID, map[string]interface{}{"attached_info": conversation.AttachedInfo})
}
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "UpdateColumnsConversations error", err.Error())
resp.CommonResp = &pbConversation.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
return resp, nil
}
for _, v := range utils.DifferenceString(haveUserID, req.UserIDList) {
conversation.OwnerUserID = v
err := imdb.SetOneConversation(conversation)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "SetConversation error", err.Error())
resp.CommonResp = &pbConversation.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
return resp, nil
}
}
// notification
if req.Conversation.ConversationType == constant.SingleChatType && req.FieldType == constant.FieldIsPrivateChat {
//sync peer user conversation if conversation is singleChatType
if err := syncPeerUserConversation(req.Conversation, req.OperationID); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "syncPeerUserConversation", err.Error())
resp.CommonResp = &pbConversation.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
return resp, nil
}
} else {
for _, v := range req.UserIDList {
chat.ConversationChangeNotification(req.OperationID, v)
}
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "rpc return", resp.String())
resp.CommonResp = &pbConversation.CommonResp{}
return resp, nil
}
func syncPeerUserConversation(conversation *pbConversation.Conversation, operationID string) error {
peerUserConversation := db.Conversation{
OwnerUserID: conversation.UserID,
ConversationID: utils.GetConversationIDBySessionType(conversation.OwnerUserID, constant.SingleChatType),
ConversationType: constant.SingleChatType,
UserID: conversation.OwnerUserID,
GroupID: "",
RecvMsgOpt: 0,
UnreadCount: 0,
DraftTextTime: 0,
IsPinned: false,
IsPrivateChat: conversation.IsPrivateChat,
AttachedInfo: "",
Ex: "",
}
err := imdb.PeerUserSetConversation(peerUserConversation)
if err != nil {
log.NewError(operationID, utils.GetSelfFuncName(), "SetConversation error", err.Error())
return err
}
chat.ConversationSetPrivateNotification(operationID, conversation.OwnerUserID, conversation.UserID, conversation.IsPrivateChat)
return nil
}
func NewRpcConversationServer(port int) *rpcConversation {
log.NewPrivateLog(constant.LogFileName)
return &rpcConversation{
rpcPort: port,
rpcRegisterName: config.Config.RpcRegisterName.OpenImConversationName,
etcdSchema: config.Config.Etcd.EtcdSchema,
etcdAddr: config.Config.Etcd.EtcdAddr,
}
}
func (rpc *rpcConversation) Run() {
log.NewInfo("0", "rpc conversation start...")
address := utils.ServerIP + ":" + strconv.Itoa(rpc.rpcPort)
listener, err := net.Listen("tcp", address)
if err != nil {
log.NewError("0", "listen network failed ", err.Error(), address)
return
}
log.NewInfo("0", "listen network success, ", address, listener)
//grpc server
srv := grpc.NewServer()
defer srv.GracefulStop()
//service registers with etcd
pbConversation.RegisterConversationServer(srv, rpc)
err = getcdv3.RegisterEtcd(rpc.etcdSchema, strings.Join(rpc.etcdAddr, ","), utils.ServerIP, rpc.rpcPort, rpc.rpcRegisterName, 10)
if err != nil {
log.NewError("0", "RegisterEtcd failed ", err.Error(),
rpc.etcdSchema, strings.Join(rpc.etcdAddr, ","), utils.ServerIP, rpc.rpcPort, rpc.rpcRegisterName)
return
}
log.NewInfo("0", "RegisterConversationServer ok ", rpc.etcdSchema, strings.Join(rpc.etcdAddr, ","), utils.ServerIP, rpc.rpcPort, rpc.rpcRegisterName)
err = srv.Serve(listener)
if err != nil {
log.NewError("0", "Serve failed ", err.Error())
return
}
log.NewInfo("0", "rpc conversation ok")
}

View File

@@ -10,7 +10,6 @@ import (
"Open_IM/pkg/common/token_verify"
cp "Open_IM/pkg/common/utils"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
pbCache "Open_IM/pkg/proto/cache"
pbFriend "Open_IM/pkg/proto/friend"
sdkws "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils"
@@ -84,18 +83,6 @@ func (s *friendServer) AddBlacklist(ctx context.Context, req *pbFriend.AddBlackl
return &pbFriend.AddBlacklistResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
}
log.NewInfo(req.CommID.OperationID, "AddBlacklist rpc ok ", req.CommID.FromUserID, req.CommID.ToUserID)
reqAddBlackUserToCache := &pbCache.AddBlackUserToCacheReq{UserID: req.CommID.FromUserID, BlackUserID: req.CommID.ToUserID, OperationID: req.CommID.OperationID}
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName)
cacheClient := pbCache.NewCacheClient(etcdConn)
cacheResp, err := cacheClient.AddBlackUserToCache(context.Background(), reqAddBlackUserToCache)
if err != nil {
log.NewError(req.CommID.OperationID, "AddBlackUserToCache rpc call failed ", err.Error())
return &pbFriend.AddBlacklistResp{CommonResp: &pbFriend.CommonResp{ErrCode: 500, ErrMsg: "AddBlackUserToCache rpc call failed"}}, nil
}
if cacheResp.CommonResp.ErrCode != 0 {
log.NewError(req.CommID.OperationID, "AddBlackUserToCache rpc logic call failed ", cacheResp.String())
return &pbFriend.AddBlacklistResp{CommonResp: &pbFriend.CommonResp{ErrCode: cacheResp.CommonResp.ErrCode, ErrMsg: cacheResp.CommonResp.ErrMsg}}, nil
}
chat.BlackAddedNotification(req)
return &pbFriend.AddBlacklistResp{CommonResp: &pbFriend.CommonResp{}}, nil
}
@@ -247,37 +234,9 @@ func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddF
log.NewError(req.CommID.OperationID, "InsertToFriend failed ", err.Error(), toInsertFollow)
return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil
}
// cache rpc
addFriendToCacheReq := &pbCache.AddFriendToCacheReq{OperationID: req.CommID.OperationID}
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName)
client := pbCache.NewCacheClient(etcdConn)
addFriendToCacheReq.UserID = req.CommID.ToUserID
addFriendToCacheReq.FriendID = req.CommID.FromUserID
respPb, err := client.AddFriendToCache(context.Background(), addFriendToCacheReq)
if err != nil {
log.NewError(req.CommID.OperationID, utils.GetSelfFuncName(), "AddFriendToCache failed", err.Error(), addFriendToCacheReq.String())
return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrServer.ErrCode, ErrMsg: constant.ErrServer.ErrMsg}}, nil
}
if respPb.CommonResp.ErrCode != 0 {
log.NewError(req.CommID.OperationID, utils.GetSelfFuncName(), "AddFriendToCache failed", addFriendToCacheReq.String())
return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: respPb.CommonResp.ErrCode, ErrMsg: respPb.CommonResp.ErrMsg}}, nil
}
addFriendToCacheReq.UserID = req.CommID.FromUserID
addFriendToCacheReq.FriendID = req.CommID.ToUserID
respPb, err = client.AddFriendToCache(context.Background(), addFriendToCacheReq)
if err != nil {
log.NewError(req.CommID.OperationID, utils.GetSelfFuncName(), "AddFriendToCache failed", err.Error(), addFriendToCacheReq.String())
return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrServer.ErrCode, ErrMsg: constant.ErrServer.ErrMsg}}, nil
}
if respPb.CommonResp.ErrCode != 0 {
log.NewError(req.CommID.OperationID, utils.GetSelfFuncName(), "AddFriendToCache failed", addFriendToCacheReq.String())
return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: respPb.CommonResp.ErrCode, ErrMsg: respPb.CommonResp.ErrMsg}}, nil
}
chat.FriendAddedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID)
}
}
if req.HandleResult == constant.FriendResponseAgree {
chat.FriendApplicationApprovedNotification(req)
} else if req.HandleResult == constant.FriendResponseRefuse {
@@ -285,7 +244,6 @@ func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddF
} else {
log.Error(req.CommID.OperationID, "HandleResult failed ", req.HandleResult)
}
log.NewInfo(req.CommID.OperationID, "rpc AddFriendResponse ok")
return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{}}, nil
}
@@ -303,18 +261,6 @@ func (s *friendServer) DeleteFriend(ctx context.Context, req *pbFriend.DeleteFri
return &pbFriend.DeleteFriendResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil
}
log.NewInfo(req.CommID.OperationID, "DeleteFriend rpc ok")
reduceFriendFromCache := &pbCache.ReduceFriendFromCacheReq{OperationID: req.CommID.OperationID, UserID: req.CommID.FromUserID, FriendID: req.CommID.ToUserID}
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName)
client := pbCache.NewCacheClient(etcdConn)
respPb, err := client.ReduceFriendFromCache(context.Background(), reduceFriendFromCache)
if err != nil {
log.NewError(req.CommID.OperationID, utils.GetSelfFuncName(), "AddFriendToCache rpc failed", err.Error())
return &pbFriend.DeleteFriendResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrServer.ErrCode, ErrMsg: constant.ErrServer.ErrMsg}}, nil
}
if respPb.CommonResp.ErrCode != 0 {
log.NewError(req.CommID.OperationID, utils.GetSelfFuncName(), "AddFriendToCache failed")
return &pbFriend.DeleteFriendResp{CommonResp: &pbFriend.CommonResp{ErrCode: respPb.CommonResp.ErrCode, ErrMsg: respPb.CommonResp.ErrMsg}}, nil
}
chat.FriendDeletedNotification(req)
return &pbFriend.DeleteFriendResp{CommonResp: &pbFriend.CommonResp{}}, nil
}
@@ -384,18 +330,6 @@ func (s *friendServer) RemoveBlacklist(ctx context.Context, req *pbFriend.Remove
}
log.NewInfo(req.CommID.OperationID, "rpc RemoveBlacklist ok ")
reqReduceBlackUserFromCache := &pbCache.ReduceBlackUserFromCacheReq{UserID: req.CommID.FromUserID, BlackUserID: req.CommID.ToUserID, OperationID: req.CommID.OperationID}
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName)
cacheClient := pbCache.NewCacheClient(etcdConn)
cacheResp, err := cacheClient.ReduceBlackUserFromCache(context.Background(), reqReduceBlackUserFromCache)
if err != nil {
log.NewError(req.CommID.OperationID, "ReduceBlackUserFromCache rpc call failed ", err.Error())
return &pbFriend.RemoveBlacklistResp{CommonResp: &pbFriend.CommonResp{ErrCode: 500, ErrMsg: "ReduceBlackUserFromCache rpc call failed"}}, nil
}
if cacheResp.CommonResp.ErrCode != 0 {
log.NewError(req.CommID.OperationID, "ReduceBlackUserFromCache rpc logic call failed ", cacheResp.String())
return &pbFriend.RemoveBlacklistResp{CommonResp: &pbFriend.CommonResp{ErrCode: cacheResp.CommonResp.ErrCode, ErrMsg: cacheResp.CommonResp.ErrMsg}}, nil
}
chat.BlackDeletedNotification(req)
return &pbFriend.RemoveBlacklistResp{CommonResp: &pbFriend.CommonResp{}}, nil
}

View File

@@ -161,7 +161,6 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR
resp.GroupInfo.OwnerUserID = req.OwnerUserID
log.NewInfo(req.OperationID, "rpc CreateGroup return ", resp.String())
chat.GroupCreatedNotification(req.OperationID, req.OpUserID, groupId, okUserIDList)
return resp, nil
}
@@ -691,22 +690,6 @@ func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq)
} else {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "SetConversation success", respPb.String())
}
//reduceGroupMemberFromCacheReq := &pbCache.ReduceGroupMemberFromCacheReq{
// UserIDList: []string{req.OpUserID},
// GroupID: req.GroupID,
// OperationID: req.OperationID,
//}
//etcdConn = getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName)
//cacheClient := pbCache.NewCacheClient(etcdConn)
//respCachePb, err := cacheClient.ReduceGroupMemberFromCache(context.Background(), reduceGroupMemberFromCacheReq)
//if err != nil {
// log.NewError(req.OperationID, utils.GetSelfFuncName(), "AddFriendToCache failed", err.Error(), reduceGroupMemberFromCacheReq.String())
// return &pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrServer.ErrCode, ErrMsg: constant.ErrServer.ErrMsg}}, nil
//}
//if respPb.CommonResp.ErrCode != 0 {
// log.NewError(req.OperationID, utils.GetSelfFuncName(), "AddFriendToCache failed", reduceGroupMemberFromCacheReq.String())
// return &pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode:respCachePb.CommonResp.ErrCode, ErrMsg: respCachePb.CommonResp.ErrMsg}}, nil
//}
chat.MemberQuitNotification(req)
log.NewInfo(req.OperationID, "rpc QuitGroup return ", pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}})
return &pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}, nil

View File

@@ -6,9 +6,8 @@ import (
"Open_IM/pkg/common/db"
"Open_IM/pkg/common/log"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
cacheRpc "Open_IM/pkg/proto/cache"
pbChat "Open_IM/pkg/proto/chat"
pbConversation "Open_IM/pkg/proto/conversation"
rpc "Open_IM/pkg/proto/friend"
pbGroup "Open_IM/pkg/proto/group"
sdk_ws "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils"
@@ -18,7 +17,6 @@ import (
"math/rand"
"strconv"
"strings"
"sync"
"time"
)
@@ -49,38 +47,36 @@ func userRelationshipVerification(data *pbChat.SendMsgReq) (bool, int32, string)
return true, 0, ""
}
log.NewDebug(data.OperationID, config.Config.MessageVerify.FriendVerify)
reqGetBlackIDListFromCache := &cacheRpc.GetBlackIDListFromCacheReq{UserID: data.MsgData.RecvID, OperationID: data.OperationID}
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName)
cacheClient := cacheRpc.NewCacheClient(etcdConn)
cacheResp, err := cacheClient.GetBlackIDListFromCache(context.Background(), reqGetBlackIDListFromCache)
req := &rpc.IsInBlackListReq{CommID: &rpc.CommID{}}
req.CommID.OperationID = data.OperationID
req.CommID.OpUserID = data.MsgData.RecvID
req.CommID.FromUserID = data.MsgData.RecvID
req.CommID.ToUserID = data.MsgData.SendID
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName)
client := rpc.NewFriendClient(etcdConn)
reply, err := client.IsInBlackList(context.Background(), req)
if err != nil {
log.NewError(data.OperationID, "GetBlackIDListFromCache rpc call failed ", err.Error())
} else {
if cacheResp.CommonResp.ErrCode != 0 {
log.NewError(data.OperationID, "GetBlackIDListFromCache rpc logic call failed ", cacheResp.String())
} else {
if utils.IsContain(data.MsgData.SendID, cacheResp.UserIDList) {
return false, 600, "in black list"
}
}
log.NewDebug(data.OperationID, "IsInBlackListReq rpc failed, ", req.String(), err.Error())
} else if reply.Response == true {
log.NewDebug(data.OperationID, "IsInBlackListReq ", req.String())
return false, 600, "in black list"
}
log.NewDebug(data.OperationID, config.Config.MessageVerify.FriendVerify)
if config.Config.MessageVerify.FriendVerify {
reqGetFriendIDListFromCache := &cacheRpc.GetFriendIDListFromCacheReq{UserID: data.MsgData.RecvID, OperationID: data.OperationID}
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImCacheName)
cacheClient := cacheRpc.NewCacheClient(etcdConn)
cacheResp, err := cacheClient.GetFriendIDListFromCache(context.Background(), reqGetFriendIDListFromCache)
friendReq := &rpc.IsFriendReq{CommID: &rpc.CommID{}}
friendReq.CommID.OperationID = data.OperationID
friendReq.CommID.OpUserID = data.MsgData.RecvID
friendReq.CommID.FromUserID = data.MsgData.RecvID
friendReq.CommID.ToUserID = data.MsgData.SendID
friendReply, err := client.IsFriend(context.Background(), friendReq)
if err != nil {
log.NewError(data.OperationID, "GetFriendIDListFromCache rpc call failed ", err.Error())
} else {
if cacheResp.CommonResp.ErrCode != 0 {
log.NewError(data.OperationID, "GetFriendIDListFromCache rpc logic call failed ", cacheResp.String())
} else {
if !utils.IsContain(data.MsgData.SendID, cacheResp.UserIDList) {
return false, 601, "not friend"
}
}
log.NewDebug(data.OperationID, "IsFriendReq rpc failed, ", req.String(), err.Error())
return true, 0, ""
} else if friendReply.Response == false {
log.NewDebug(data.OperationID, "not friend ", req.String())
return friendReply.Response, 601, "not friend"
}
log.NewDebug(data.OperationID, config.Config.MessageVerify.FriendVerify, friendReply.Response)
return true, 0, ""
} else {
return true, 0, ""
@@ -231,12 +227,6 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S
log.Error(pb.Token, pb.OperationID, "rpc send_msg getGroupInfo failed, err = %s", reply.ErrMsg)
return returnMsg(&replay, pb, reply.ErrCode, reply.ErrMsg, "", 0)
}
memberUserIDList := func(all []*sdk_ws.GroupMemberFullInfo) (result []string) {
for _, v := range all {
result = append(result, v.UserID)
}
return result
}(reply.MemberList)
var addUidList []string
switch pb.MsgData.ContentType {
case constant.MemberKickedNotification:
@@ -256,55 +246,37 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S
}
case constant.MemberQuitNotification:
addUidList = append(addUidList, pb.MsgData.SendID)
case constant.AtText:
//tagMe := utils.IsContain(c.loginUserID, s.AtElem.AtUserList)
//tagAll := utils.IsContain(constant.AtAllString, pb.MsgData.AtUserIDList)
//if tagAll {
// if tagMe {
// lc.GroupAtType = constant.AtAllAtMe
// return
// }
// lc.GroupAtType = constant.AtAll
// return
//}
//if tagMe {
// lc.GroupAtType = constant.AtMe
//}
default:
}
groupID := pb.MsgData.GroupID
//split parallel send
var wg sync.WaitGroup
var sendTag bool
var split = 50
remain := len(memberUserIDList) % split
for i := 0; i < len(memberUserIDList)/split; i++ {
wg.Add(1)
go func(list []string) {
for _, v := range list {
pb.MsgData.RecvID = v
isSend := modifyMessageByUserMessageReceiveOpt(v, groupID, constant.GroupChatType, pb)
if isSend {
msgToMQ.MsgData = pb.MsgData
err := rpc.sendMsgToKafka(&msgToMQ, v)
if err != nil {
log.NewError(msgToMQ.OperationID, "kafka send msg err:UserId", v, msgToMQ.String())
} else {
sendTag = true
}
}
for _, v := range reply.MemberList {
pb.MsgData.RecvID = v.UserID
isSend := modifyMessageByUserMessageReceiveOpt(v.UserID, groupID, constant.GroupChatType, pb)
if isSend {
msgToMQ.MsgData = pb.MsgData
err := rpc.sendMsgToKafka(&msgToMQ, v.UserID)
if err != nil {
log.NewError(msgToMQ.OperationID, "kafka send msg err:UserId", v.UserID, msgToMQ.String())
return returnMsg(&replay, pb, 201, "kafka send msg err", "", 0)
}
wg.Done()
}(memberUserIDList[i*split : (i+1)*split])
}
if remain > 0 {
wg.Add(1)
go func(list []string) {
for _, v := range list {
pb.MsgData.RecvID = v
isSend := modifyMessageByUserMessageReceiveOpt(v, groupID, constant.GroupChatType, pb)
if isSend {
msgToMQ.MsgData = pb.MsgData
err := rpc.sendMsgToKafka(&msgToMQ, v)
if err != nil {
log.NewError(msgToMQ.OperationID, "kafka send msg err:UserId", v, msgToMQ.String())
} else {
sendTag = true
}
}
}
wg.Done()
}(memberUserIDList[split*(len(memberUserIDList)/split):])
}
wg.Wait()
}
}
log.Info(msgToMQ.OperationID, "addUidList", addUidList)
for _, v := range addUidList {
pb.MsgData.RecvID = v
@@ -315,8 +287,7 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S
err := rpc.sendMsgToKafka(&msgToMQ, v)
if err != nil {
log.NewError(msgToMQ.OperationID, "kafka send msg err:UserId", v, msgToMQ.String())
} else {
sendTag = true
return returnMsg(&replay, pb, 201, "kafka send msg err", "", 0)
}
}
}
@@ -324,63 +295,7 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S
if err := callbackAfterSendGroupMsg(pb); err != nil {
log.NewError(pb.OperationID, utils.GetSelfFuncName(), "callbackAfterSendGroupMsg failed", err.Error())
}
if !sendTag {
return returnMsg(&replay, pb, 201, "kafka send msg err", "", 0)
} else {
if pb.MsgData.ContentType == constant.AtText {
go func() {
var conversationReq pbConversation.ModifyConversationFieldReq
var tag bool
var atUserID []string
conversation := pbConversation.Conversation{
OwnerUserID: pb.MsgData.SendID,
ConversationID: utils.GetConversationIDBySessionType(pb.MsgData.GroupID, constant.GroupChatType),
ConversationType: constant.GroupChatType,
GroupID: pb.MsgData.GroupID,
}
conversationReq.Conversation = &conversation
conversationReq.OperationID = pb.OperationID
conversationReq.FieldType = constant.FieldGroupAtType
tagAll := utils.IsContain(constant.AtAllString, pb.MsgData.AtUserIDList)
if tagAll {
atUserID = utils.DifferenceString([]string{constant.AtAllString}, pb.MsgData.AtUserIDList)
if len(atUserID) == 0 { //just @everyone
conversationReq.UserIDList = memberUserIDList
conversation.GroupAtType = constant.AtAll
} else { //@Everyone and @other people
conversationReq.UserIDList = atUserID
conversation.GroupAtType = constant.AtAllAtMe
tag = true
}
} else {
conversationReq.UserIDList = pb.MsgData.AtUserIDList
conversation.GroupAtType = constant.AtMe
}
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImConversationName)
client := pbConversation.NewConversationClient(etcdConn)
conversationReply, err := client.ModifyConversationField(context.Background(), &conversationReq)
if err != nil {
log.NewError(conversationReq.OperationID, "ModifyConversationField rpc failed, ", conversationReq.String(), err.Error())
} else if conversationReply.CommonResp.ErrCode != 0 {
log.NewError(conversationReq.OperationID, "ModifyConversationField rpc failed, ", conversationReq.String(), conversationReply.String())
}
if tag {
conversationReq.UserIDList = utils.DifferenceString(atUserID, memberUserIDList)
conversation.GroupAtType = constant.AtAll
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImConversationName)
client := pbConversation.NewConversationClient(etcdConn)
conversationReply, err := client.ModifyConversationField(context.Background(), &conversationReq)
if err != nil {
log.NewError(conversationReq.OperationID, "ModifyConversationField rpc failed, ", conversationReq.String(), err.Error())
} else if conversationReply.CommonResp.ErrCode != 0 {
log.NewError(conversationReq.OperationID, "ModifyConversationField rpc failed, ", conversationReq.String(), conversationReply.String())
}
}
}()
}
return returnMsg(&replay, pb, 0, "", msgToMQ.MsgData.ServerMsgID, msgToMQ.MsgData.SendTime)
}
return returnMsg(&replay, pb, 0, "", msgToMQ.MsgData.ServerMsgID, msgToMQ.MsgData.SendTime)
case constant.NotificationChatType:
msgToMQ.MsgData = pb.MsgData
log.NewInfo(msgToMQ.OperationID, msgToMQ)

View File

@@ -10,9 +10,12 @@ import (
"github.com/golang/protobuf/proto"
)
func WorkMomentSendNotification(operationID, recvID string, notificationMsg *pbOffice.WorkMomentNotificationMsg) {
log.NewInfo(operationID, utils.GetSelfFuncName(), recvID, notificationMsg)
WorkMomentNotification(operationID, recvID, recvID, notificationMsg)
func WorkMomentSendNotification(operationID, sendID, recvID string, notificationMsg *pbOffice.WorkMomentNotificationMsg) {
log.NewInfo(operationID, utils.GetSelfFuncName(), sendID, recvID, notificationMsg)
//if sendID == recvID {
// return
//}
WorkMomentNotification(operationID, sendID, recvID, notificationMsg)
}
func WorkMomentNotification(operationID, sendID, recvID string, m proto.Message) {

View File

@@ -165,7 +165,7 @@ func (s *officeServer) SendMsg2Tag(_ context.Context, req *pbOffice.SendMsg2TagR
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetGroupMemberIDListByGroupID failed", err.Error())
continue
}
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), userIDList)
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), userIDList)
groupUserIDList = append(groupUserIDList, userIDList...)
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), groupUserIDList, req.GroupList)
@@ -303,9 +303,8 @@ func (s *officeServer) CreateOneWorkMoment(_ context.Context, req *pbOffice.Crea
UserID: workMoment.UserID,
FaceURL: createUser.FaceURL,
UserName: createUser.Nickname,
CreateTime: workMoment.CreateTime,
}
msg.WorkMomentSendNotification(req.OperationID, atUser.UserID, workMomentNotificationMsg)
msg.WorkMomentSendNotification(req.OperationID, workMoment.UserID, atUser.UserID, workMomentNotificationMsg)
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
@@ -315,13 +314,12 @@ func (s *officeServer) CreateOneWorkMoment(_ context.Context, req *pbOffice.Crea
func (s *officeServer) getPermissionUserIDList(operationID string, groupList []*pbOffice.PermissionGroup, userList []*pbOffice.WorkMomentUser) []string {
var permissionUserIDList []string
for _, group := range groupList {
groupMemberIDList, err := imdb.GetGroupMemberIDListByGroupID(group.GroupID)
GroupMemberIDList, err := imdb.GetGroupMemberIDListByGroupID(group.GroupID)
if err != nil {
log.NewError(operationID, utils.GetSelfFuncName(), "GetGroupMemberIDListByGroupID failed", group, err.Error())
continue
}
log.NewDebug(operationID, utils.GetSelfFuncName(), "groupMemberIDList: ", groupMemberIDList)
permissionUserIDList = append(permissionUserIDList, groupMemberIDList...)
permissionUserIDList = append(permissionUserIDList, GroupMemberIDList...)
}
var userIDList []string
for _, user := range userList {
@@ -377,13 +375,13 @@ func isUserCanSeeWorkMoment(userID string, workMoment db.WorkMoment) bool {
func (s *officeServer) LikeOneWorkMoment(_ context.Context, req *pbOffice.LikeOneWorkMomentReq) (resp *pbOffice.LikeOneWorkMomentResp, err error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp = &pbOffice.LikeOneWorkMomentResp{CommonResp: &pbOffice.CommonResp{}}
user, err := imdb.GetUserByUserID(req.UserID)
userName, err := imdb.GetUserNameByUserID(req.UserID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserNameByUserID failed", err.Error())
resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
return resp, nil
}
workMoment, like, err := db.DB.LikeOneWorkMoment(req.UserID, user.Nickname, req.WorkMomentID)
workMoment, like, err := db.DB.LikeOneWorkMoment(req.UserID, userName, req.WorkMomentID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "LikeOneWorkMoment failed ", err.Error())
resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
@@ -393,14 +391,13 @@ func (s *officeServer) LikeOneWorkMoment(_ context.Context, req *pbOffice.LikeOn
NotificationMsgType: constant.WorkMomentLikeNotification,
WorkMomentID: workMoment.WorkMomentID,
WorkMomentContent: workMoment.Content,
UserID: user.UserID,
FaceURL: user.FaceURL,
UserName: user.Nickname,
CreateTime: int32(time.Now().Unix()),
UserID: workMoment.UserID,
FaceURL: workMoment.FaceURL,
UserName: workMoment.UserName,
}
// send notification
if like && workMoment.UserID != req.UserID {
msg.WorkMomentSendNotification(req.OperationID, workMoment.UserID, workMomentNotificationMsg)
if like {
msg.WorkMomentSendNotification(req.OperationID, req.UserID, workMoment.UserID, workMomentNotificationMsg)
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
@@ -442,21 +439,23 @@ func (s *officeServer) CommentOneWorkMoment(_ context.Context, req *pbOffice.Com
NotificationMsgType: constant.WorkMomentCommentNotification,
WorkMomentID: workMoment.WorkMomentID,
WorkMomentContent: workMoment.Content,
UserID: commentUser.UserID,
FaceURL: commentUser.FaceURL,
UserName: commentUser.Nickname,
ReplyUserID: comment.ReplyUserID,
ReplyUserName: comment.ReplyUserName,
ContentID: comment.ContentID,
Content: comment.Content,
CreateTime: comment.CreateTime,
UserID: workMoment.UserID,
FaceURL: workMoment.FaceURL,
UserName: workMoment.UserName,
Comment: &pbOffice.Comment{
UserID: comment.UserID,
UserName: comment.UserName,
FaceURL: commentUser.FaceURL,
ReplyUserID: comment.ReplyUserID,
ReplyUserName: comment.ReplyUserName,
ContentID: comment.ContentID,
Content: comment.Content,
CreateTime: comment.CreateTime,
},
}
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "msg: ", *workMomentNotificationMsg)
if req.UserID != workMoment.UserID {
msg.WorkMomentSendNotification(req.OperationID, workMoment.UserID, workMomentNotificationMsg)
}
if req.ReplyUserID != "" && req.ReplyUserID != workMoment.UserID && req.ReplyUserID != req.UserID {
msg.WorkMomentSendNotification(req.OperationID, req.ReplyUserID, workMomentNotificationMsg)
msg.WorkMomentSendNotification(req.OperationID, req.UserID, workMoment.UserID, workMomentNotificationMsg)
if req.ReplyUserID != "" {
msg.WorkMomentSendNotification(req.OperationID, req.UserID, req.ReplyUserID, workMomentNotificationMsg)
}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
@@ -489,21 +488,17 @@ func (s *officeServer) GetWorkMomentByID(_ context.Context, req *pbOffice.GetWor
func (s *officeServer) GetUserWorkMoments(_ context.Context, req *pbOffice.GetUserWorkMomentsReq) (resp *pbOffice.GetUserWorkMomentsResp, err error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp = &pbOffice.GetUserWorkMomentsResp{CommonResp: &pbOffice.CommonResp{}, WorkMoments: []*pbOffice.WorkMoment{}}
resp.Pagination = &pbCommon.ResponsePagination{CurrentPage: req.Pagination.PageNumber, ShowNumber: req.Pagination.ShowNumber}
var workMoments []db.WorkMoment
if req.UserID == req.OpUserID {
workMoments, err = db.DB.GetUserSelfWorkMoments(req.UserID, req.Pagination.ShowNumber, req.Pagination.PageNumber)
} else {
workMoments, err = db.DB.GetUserWorkMoments(req.OpUserID, req.UserID, req.Pagination.ShowNumber, req.Pagination.PageNumber)
}
//resp.WorkMoments = make([]*pbOffice.WorkMoment, 0)
workMoments, err := db.DB.GetUserWorkMoments(req.UserID, req.Pagination.ShowNumber, req.Pagination.PageNumber)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserWorkMoments failed", err.Error())
log.NewError(req.OperationID, utils.GetSelfFuncName(), err)
resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
return resp, nil
}
if err := utils.CopyStructFields(&resp.WorkMoments, workMoments); err != nil {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
}
resp.Pagination = &pbCommon.ResponsePagination{CurrentPage: req.Pagination.PageNumber, ShowNumber: req.Pagination.ShowNumber}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
}
@@ -511,8 +506,15 @@ func (s *officeServer) GetUserWorkMoments(_ context.Context, req *pbOffice.GetUs
func (s *officeServer) GetUserFriendWorkMoments(_ context.Context, req *pbOffice.GetUserFriendWorkMomentsReq) (resp *pbOffice.GetUserFriendWorkMomentsResp, err error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp = &pbOffice.GetUserFriendWorkMomentsResp{CommonResp: &pbOffice.CommonResp{}, WorkMoments: []*pbOffice.WorkMoment{}}
resp.Pagination = &pbCommon.ResponsePagination{CurrentPage: req.Pagination.PageNumber, ShowNumber: req.Pagination.ShowNumber}
workMoments, err := db.DB.GetUserFriendWorkMoments(req.Pagination.ShowNumber, req.Pagination.PageNumber, req.UserID)
//resp.WorkMoments = make([]*pbOffice.WorkMoment, 0)
friendIDList, err := imdb.GetFriendIDListByUserID(req.UserID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetFriendIDListByUserID", err.Error())
resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
return resp, nil
}
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "friendIDList: ", friendIDList)
workMoments, err := db.DB.GetUserFriendWorkMoments(friendIDList, req.Pagination.ShowNumber, req.Pagination.PageNumber, req.UserID)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserFriendWorkMoments", err.Error())
resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
@@ -521,6 +523,7 @@ func (s *officeServer) GetUserFriendWorkMoments(_ context.Context, req *pbOffice
if err := utils.CopyStructFields(&resp.WorkMoments, workMoments); err != nil {
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
}
resp.Pagination = &pbCommon.ResponsePagination{CurrentPage: req.Pagination.PageNumber, ShowNumber: req.Pagination.ShowNumber}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
return resp, nil
}

View File

@@ -389,10 +389,6 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserI
log.Info(req.OperationID, "UserInfoUpdatedNotification ", req.UserInfo.UserID, v.FriendUser.UserID)
chat.UserInfoUpdatedNotification(req.OperationID, req.UserInfo.UserID, v.FriendUser.UserID)
}
//etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName)
//client := pbFriend.NewFriendClient(etcdConn)
chat.UserInfoUpdatedNotification(req.OperationID, req.UserInfo.UserID, req.OpUserID)
log.Info(req.OperationID, "UserInfoUpdatedNotification ", req.UserInfo.UserID, req.OpUserID)
return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{}}, nil

View File

@@ -58,15 +58,6 @@ type SetConversationReq struct {
type SetConversationResp struct {
CommResp
}
type ModifyConversationFieldReq struct {
Conversation
FieldType int32 `json:"fieldType" binding:"required"`
UserIDList []string `json:"userIDList" binding:"required"`
OperationID string `json:"operationID" binding:"required"`
}
type ModifyConversationFieldResp struct {
CommResp
}
type BatchSetConversationsReq struct {
Conversations []Conversation `json:"conversations" binding:"required"`

View File

@@ -32,21 +32,3 @@ type GetSelfUserInfoResp struct {
UserInfo *open_im_sdk.UserInfo `json:"-"`
Data map[string]interface{} `json:"data"`
}
type GetFriendIDListFromCacheReq struct {
OperationID string `json:"operationID" binding:"required"`
}
type GetFriendIDListFromCacheResp struct {
CommResp
UserIDList []string `json:"userIDList" binding:"required"`
}
type GetBlackIDListFromCacheReq struct {
OperationID string `json:"operationID" binding:"required"`
}
type GetBlackIDListFromCacheResp struct {
CommResp
UserIDList []string `json:"userIDList" binding:"required"`
}

View File

@@ -50,10 +50,13 @@ type WorkMoment struct {
Content string `json:"content"`
LikeUserList []*WorkMomentUser `json:"likeUsers"`
Comments []*Comment `json:"comments"`
FaceURL string `json:"faceURL"`
FaceURL string `json:"faceUrl"`
UserName string `json:"userName"`
AtUserList []*WorkMomentUser `json:"atUsers"`
CreateTime int32 `json:"createTime"`
//Permission int32 `json:"permission"`
//PermissionUserIDList []string `json:"permissionUserIDList"`
//PermissionGroupIDList []string `json:"permissionGroupIDList"`
AtUserList []*WorkMomentUser `json:"atUsers"`
CreateTime int32 `json:"createTime"`
}
type WorkMomentUser struct {
@@ -80,7 +83,6 @@ type GetWorkMomentByIDResp struct {
type GetUserWorkMomentsReq struct {
WorkMomentsUserCommonReq
UserID string `json:"userID"`
}
type GetUserWorkMomentsResp struct {

View File

@@ -118,8 +118,6 @@ type config struct {
OpenImAdminCMSName string `yaml:"openImAdminCMSName"`
OpenImOfficeName string `yaml:"openImOfficeName"`
OpenImOrganizationName string `yaml:"openImOrganizationName"`
OpenImConversationName string `yaml:"openImConversationName"`
OpenImCacheName string `yaml:"openImCacheName"`
}
Etcd struct {
EtcdSchema string `yaml:"etcdSchema"`

View File

@@ -214,16 +214,6 @@ var ContentType2PushContent = map[int64]string{
Common: "你收到一条新消息",
}
const (
FieldRecvMsgOpt = 1
FieldIsPinned = 2
FieldAttachedInfo = 3
FieldIsPrivateChat = 4
FieldGroupAtType = 5
FieldIsNotInGroup = 6
FieldEx = 7
)
const (
AppOrdinaryUsers = 1
AppAdmin = 2

View File

@@ -71,14 +71,24 @@ func init() {
opts := options.CreateIndexes().SetMaxTime(10 * time.Second)
dataBase := mongoClient.Database(config.Config.Mongo.DBDatabase)
cSendLogModels := []mongo.IndexModel{
cCommentMsgModels := []mongo.IndexModel{
{
Keys: bson.M{"user_id": -1},
Keys: bson.M{"create_time": -1, "user_id": -1},
},
}
result, err := dataBase.Collection(cSendLog).Indexes().CreateMany(context.Background(), cSendLogModels, opts)
result, err := dataBase.Collection(cCommentMsg).Indexes().CreateMany(context.Background(), cCommentMsgModels, opts)
if err != nil {
//fmt.Println("mongodb create cSendLogModels failed", result, err.Error())
fmt.Println("mongodb create cCommentMsgModels failed", result, err.Error())
}
cSendLogModels := []mongo.IndexModel{
{
Keys: bson.M{"user_id": -1, "send_time": -1},
},
}
result, err = dataBase.Collection(cSendLog).Indexes().CreateMany(context.Background(), cSendLogModels, opts)
if err != nil {
fmt.Println("mongodb create cSendLogModels failed", result, err.Error())
}
cChatModels := []mongo.IndexModel{
@@ -96,12 +106,12 @@ func init() {
Keys: bson.M{"work_moment_id": -1},
},
{
Keys: bson.M{"user_id": -1},
Keys: bson.M{"user_id": -1, "create_time": -1},
},
}
result, err = dataBase.Collection(cWorkMoment).Indexes().CreateMany(context.Background(), cWorkMomentModels, opts)
if err != nil {
//fmt.Println("mongodb create cWorkMomentModels failed", result, err.Error())
fmt.Println("mongodb create cWorkMomentModels failed", result, err.Error())
}
cTagModels := []mongo.IndexModel{
@@ -109,12 +119,12 @@ func init() {
Keys: bson.M{"tag_id": -1},
},
{
Keys: bson.M{"user_id": -1},
Keys: bson.M{"user_id": -1, "tag_id": -1},
},
}
result, err = dataBase.Collection(cTag).Indexes().CreateMany(context.Background(), cTagModels, opts)
if err != nil {
//fmt.Println("mongodb create cTagModels failed", result, err.Error())
fmt.Println("mongodb create cTagModels failed", result, err.Error())
}
DB.mongoClient = mongoClient

View File

@@ -16,7 +16,7 @@ import (
//"github.com/garyburd/redigo/redis"
"github.com/golang/protobuf/proto"
"go.mongodb.org/mongo-driver/bson"
"gopkg.in/mgo.v2/bson"
"strconv"
"time"
@@ -659,7 +659,7 @@ func (d *DataBases) CommentOneWorkMoment(comment *Comment, workMomentID string)
return workMoment, err
}
func (d *DataBases) GetUserSelfWorkMoments(userID string, showNumber, pageNumber int32) ([]WorkMoment, error) {
func (d *DataBases) GetUserWorkMoments(userID string, showNumber, pageNumber int32) ([]WorkMoment, error) {
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cWorkMoment)
var workMomentList []WorkMoment
@@ -672,43 +672,15 @@ func (d *DataBases) GetUserSelfWorkMoments(userID string, showNumber, pageNumber
return workMomentList, err
}
func (d *DataBases) GetUserWorkMoments(opUserID, userID string, showNumber, pageNumber int32) ([]WorkMoment, error) {
func (d *DataBases) GetUserFriendWorkMoments(friendIDList []*string, showNumber, pageNumber int32, userID string) ([]WorkMoment, error) {
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cWorkMoment)
var workMomentList []WorkMoment
findOpts := options.Find().SetLimit(int64(showNumber)).SetSkip(int64(showNumber) * (int64(pageNumber) - 1)).SetSort(bson.M{"create_time": -1})
result, err := c.Find(ctx, bson.D{ // 等价条件: select * from
{"user_id", userID},
{"$or", bson.A{
bson.D{{"permission", constant.WorkMomentPermissionCantSee}, {"permission_user_id_list", bson.D{{"$nin", bson.A{userID}}}}},
bson.D{{"permission", constant.WorkMomentPermissionCanSee}, {"permission_user_id_list", bson.D{{"$in", bson.A{userID}}}}},
bson.D{{"permission", constant.WorkMomentPublic}},
}},
}, findOpts)
if err != nil {
return workMomentList, nil
}
err = result.All(ctx, &workMomentList)
return workMomentList, err
}
func (d *DataBases) GetUserFriendWorkMoments(showNumber, pageNumber int32, userID string) ([]WorkMoment, error) {
ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second)
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cWorkMoment)
var workMomentList []WorkMoment
findOpts := options.Find().SetLimit(int64(showNumber)).SetSkip(int64(showNumber) * (int64(pageNumber) - 1)).SetSort(bson.M{"create_time": -1})
result, err := c.Find(ctx, bson.D{
{"$or", bson.A{
bson.D{{"user_id", userID}}, //self
bson.D{
{"$or", bson.A{
bson.D{{"permission", constant.WorkMomentPermissionCantSee}, {"permission_user_id_list", bson.D{{"$nin", bson.A{userID}}}}},
bson.D{{"permission", constant.WorkMomentPermissionCanSee}, {"permission_user_id_list", bson.D{{"$in", bson.A{userID}}}}},
bson.D{{"permission", constant.WorkMomentPublic}},
}}},
},
},
}, findOpts)
result, err := c.Find(ctx,
bson.M{"user_id": friendIDList, "$or": bson.M{"who_can_see_user_id_list": bson.M{"$elemMatch": bson.M{"$eq": userID}},
"who_cant_see_user_id_list": bson.M{"$nin": userID}},
}, findOpts)
if err != nil {
return workMomentList, err
}

View File

@@ -1,145 +0,0 @@
package im_mysql_model
import (
"Open_IM/pkg/common/db"
"Open_IM/pkg/common/log"
"Open_IM/pkg/utils"
)
func SetConversation(conversation db.Conversation) error {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return err
}
dbConn.LogMode(false)
newConversation := conversation
if dbConn.Model(&db.Conversation{}).Find(&newConversation).RowsAffected == 0 {
log.NewDebug("", utils.GetSelfFuncName(), "conversation", conversation, "not exist in db, create")
return dbConn.Model(&db.Conversation{}).Create(conversation).Error
// if exist, then update record
} else {
log.NewDebug("", utils.GetSelfFuncName(), "conversation", conversation, "exist in db, update")
//force update
return dbConn.Model(conversation).Where("owner_user_id = ? and conversation_id = ?", conversation.OwnerUserID, conversation.ConversationID).
Update(map[string]interface{}{"recv_msg_opt": conversation.RecvMsgOpt, "is_pinned": conversation.IsPinned, "is_private_chat": conversation.IsPrivateChat,
"group_at_type": conversation.GroupAtType, "is_not_in_group": conversation.IsNotInGroup}).Error
}
}
func SetOneConversation(conversation db.Conversation) error {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return err
}
dbConn.LogMode(false)
return dbConn.Model(&db.Conversation{}).Create(conversation).Error
}
func PeerUserSetConversation(conversation db.Conversation) error {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return err
}
dbConn.LogMode(false)
newConversation := conversation
if dbConn.Model(&db.Conversation{}).Find(&newConversation).RowsAffected == 0 {
log.NewDebug("", utils.GetSelfFuncName(), "conversation", conversation, "not exist in db, create")
return dbConn.Model(&db.Conversation{}).Create(conversation).Error
// if exist, then update record
}
log.NewDebug("", utils.GetSelfFuncName(), "conversation", conversation, "exist in db, update")
//force update
return dbConn.Model(conversation).Where("owner_user_id = ? and conversation_id = ?", conversation.OwnerUserID, conversation.ConversationID).
Update(map[string]interface{}{"is_private_chat": conversation.IsPrivateChat}).Error
}
func SetRecvMsgOpt(conversation db.Conversation) error {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return err
}
dbConn.LogMode(false)
newConversation := conversation
if dbConn.Model(&db.Conversation{}).Find(&newConversation).RowsAffected == 0 {
log.NewDebug("", utils.GetSelfFuncName(), "conversation", conversation, "not exist in db, create")
return dbConn.Model(&db.Conversation{}).Create(conversation).Error
// if exist, then update record
} else {
log.NewDebug("", utils.GetSelfFuncName(), "conversation", conversation, "exist in db, update")
//force update
return dbConn.Model(conversation).Where("owner_user_id = ? and conversation_id = ?", conversation.OwnerUserID, conversation.ConversationID).
Update(map[string]interface{}{"recv_msg_opt": conversation.RecvMsgOpt}).Error
}
}
func GetUserAllConversations(ownerUserID string) ([]db.Conversation, error) {
var conversations []db.Conversation
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return conversations, err
}
dbConn.LogMode(false)
err = dbConn.Model(&db.Conversation{}).Where("owner_user_id=?", ownerUserID).Find(&conversations).Error
return conversations, err
}
func GetMultipleUserConversationByConversationID(ownerUserIDList []string, conversationID string) ([]db.Conversation, error) {
var conversations []db.Conversation
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return conversations, err
}
dbConn.LogMode(false)
err = dbConn.Model(&db.Conversation{}).Where("owner_user_id IN ? and conversation_id=?", ownerUserIDList, conversationID).Find(&conversations).Error
return conversations, err
}
func GetExistConversationUserIDList(ownerUserIDList []string, conversationID string) ([]string, error) {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return nil, err
}
var resultArr []string
err = dbConn.Table("conversations").Where(" owner_user_id IN (?) and conversation_id=?", ownerUserIDList, conversationID).Pluck("owner_user_id", &resultArr).Error
if err != nil {
return nil, err
}
return resultArr, nil
}
func GetConversation(OwnerUserID, conversationID string) (db.Conversation, error) {
var conversation db.Conversation
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return conversation, err
}
err = dbConn.Table("conversations").Where("owner_user_id=? and conversation_id=?", OwnerUserID, conversationID).Take(&conversation).Error
return conversation, err
}
func GetConversations(OwnerUserID string, conversationIDs []string) ([]db.Conversation, error) {
var conversations []db.Conversation
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return conversations, err
}
err = dbConn.Model(&db.Conversation{}).Where("conversation_id IN (?) and owner_user_id=?", conversationIDs, OwnerUserID).Find(&conversations).Error
return conversations, err
}
func GetConversationsByConversationIDMultipleOwner(OwnerUserIDList []string, conversationID string) ([]db.Conversation, error) {
var conversations []db.Conversation
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return conversations, err
}
err = dbConn.Model(&db.Conversation{}).Where("owner_user_id IN (?) and conversation_id=?", OwnerUserIDList, conversationID).Find(&conversations).Error
return conversations, err
}
func UpdateColumnsConversations(ownerUserIDList []string, conversationID string, args map[string]interface{}) error {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return err
}
dbConn.LogMode(false)
return dbConn.Debug().Model(&db.Conversation{}).Where("owner_user_id IN (?) and conversation_id=?", ownerUserIDList, conversationID).Updates(args).Error
}

View File

@@ -49,13 +49,13 @@ func GetFriendListByUserID(OwnerUserID string) ([]db.Friend, error) {
return friends, nil
}
func GetFriendIDListByUserID(OwnerUserID string) ([]string, error) {
func GetFriendIDListByUserID(OwnerUserID string) ([]*string, error) {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return nil, err
}
var friendIDList []string
err = dbConn.Table("friends").Where("owner_user_id=?", OwnerUserID).Pluck("friend_user_id", &friendIDList).Error
var friendIDList []*string
err = dbConn.Table("friends").Select("friend_user_id").Where("owner_user_id=?", OwnerUserID).Find(&friendIDList).Error
if err != nil {
return nil, err
}

View File

@@ -72,11 +72,15 @@ func GetGroupMemberIDListByGroupID(groupID string) ([]string, error) {
return nil, err
}
dbConn.LogMode(false)
var groupMemberIDList []string
err = dbConn.Table("group_members").Where("group_id=?", groupID).Pluck("user_id", &groupMemberIDList).Error
var groupMembers []db.GroupMember
err = dbConn.Table("group_members").Select("user_id").Where("group_id=?", groupID).Find(&groupMembers).Error
if err != nil {
return nil, err
}
var groupMemberIDList []string
for _, v := range groupMembers {
groupMemberIDList = append(groupMemberIDList, v.UserID)
}
return groupMemberIDList, nil
}

View File

@@ -223,13 +223,3 @@ func UpdateGroupInfoDefaultZero(groupID string, args map[string]interface{}) err
}
return dbConn.Table("groups").Where("group_id = ? ", groupID).Update(args).Error
}
func GetAllGroupIDList() ([]string, error) {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return nil, err
}
var groupIDList []string
err = dbConn.Table("groups").Pluck("group_id", &groupIDList).Error
return groupIDList, err
}

View File

@@ -56,16 +56,3 @@ func GetBlackListByUserID(ownerUserID string) ([]db.Black, error) {
}
return blackListUsersInfo, nil
}
func GetBlackIDListByUserID(ownerUserID string) ([]string, error) {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return nil, err
}
var blackIDList []string
err = dbConn.Table("blacks").Where("owner_user_id=?", ownerUserID).Pluck("block_user_id", &blackIDList).Error
if err != nil {
return nil, err
}
return blackIDList, nil
}

View File

@@ -4,6 +4,7 @@ import (
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db"
"Open_IM/pkg/common/log"
"Open_IM/pkg/utils"
"fmt"
"time"
@@ -60,16 +61,6 @@ func DeleteUser(userID string) (i int64) {
return i
}
func GetAllUser() ([]db.User, error) {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return nil, err
}
var userList []db.User
err = dbConn.Table("users").Find(&userList).Error
return userList, err
}
func GetUserByUserID(userID string) (*db.User, error) {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
@@ -314,3 +305,101 @@ func GetBlockUsersNumCount() (int32, error) {
}
return count, nil
}
func SetConversation(conversation db.Conversation) error {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return err
}
dbConn.LogMode(false)
newConversation := conversation
if dbConn.Model(&db.Conversation{}).Find(&newConversation).RowsAffected == 0 {
log.NewDebug("", utils.GetSelfFuncName(), "conversation", conversation, "not exist in db, create")
return dbConn.Model(&db.Conversation{}).Create(conversation).Error
// if exist, then update record
} else {
log.NewDebug("", utils.GetSelfFuncName(), "conversation", conversation, "exist in db, update")
//force update
return dbConn.Model(conversation).Where("owner_user_id = ? and conversation_id = ?", conversation.OwnerUserID, conversation.ConversationID).
Update(map[string]interface{}{"recv_msg_opt": conversation.RecvMsgOpt, "is_pinned": conversation.IsPinned, "is_private_chat": conversation.IsPrivateChat,
"group_at_type": conversation.GroupAtType, "is_not_in_group": conversation.IsNotInGroup}).Error
}
}
func PeerUserSetConversation(conversation db.Conversation) error {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return err
}
dbConn.LogMode(false)
newConversation := conversation
if dbConn.Model(&db.Conversation{}).Find(&newConversation).RowsAffected == 0 {
log.NewDebug("", utils.GetSelfFuncName(), "conversation", conversation, "not exist in db, create")
return dbConn.Model(&db.Conversation{}).Create(conversation).Error
// if exist, then update record
}
log.NewDebug("", utils.GetSelfFuncName(), "conversation", conversation, "exist in db, update")
//force update
return dbConn.Model(conversation).Where("owner_user_id = ? and conversation_id = ?", conversation.OwnerUserID, conversation.ConversationID).
Update(map[string]interface{}{"is_private_chat": conversation.IsPrivateChat}).Error
}
func SetRecvMsgOpt(conversation db.Conversation) error {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return err
}
dbConn.LogMode(false)
newConversation := conversation
if dbConn.Model(&db.Conversation{}).Find(&newConversation).RowsAffected == 0 {
log.NewDebug("", utils.GetSelfFuncName(), "conversation", conversation, "not exist in db, create")
return dbConn.Model(&db.Conversation{}).Create(conversation).Error
// if exist, then update record
} else {
log.NewDebug("", utils.GetSelfFuncName(), "conversation", conversation, "exist in db, update")
//force update
return dbConn.Model(conversation).Where("owner_user_id = ? and conversation_id = ?", conversation.OwnerUserID, conversation.ConversationID).
Update(map[string]interface{}{"recv_msg_opt": conversation.RecvMsgOpt}).Error
}
}
func GetUserAllConversations(ownerUserID string) ([]db.Conversation, error) {
var conversations []db.Conversation
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return conversations, err
}
dbConn.LogMode(false)
err = dbConn.Model(&db.Conversation{}).Where("owner_user_id=?", ownerUserID).Find(&conversations).Error
return conversations, err
}
func GetConversation(OwnerUserID, conversationID string) (db.Conversation, error) {
var conversation db.Conversation
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return conversation, err
}
err = dbConn.Table("conversations").Where("owner_user_id=? and conversation_id=?", OwnerUserID, conversationID).Take(&conversation).Error
return conversation, err
}
func GetConversations(OwnerUserID string, conversationIDs []string) ([]db.Conversation, error) {
var conversations []db.Conversation
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return conversations, err
}
err = dbConn.Model(&db.Conversation{}).Where("conversation_id IN (?) and owner_user_id=?", conversationIDs, OwnerUserID).Find(&conversations).Error
return conversations, err
}
func GetConversationsByConversationIDMultipleOwner(OwnerUserIDList []string, conversationID string) ([]db.Conversation, error) {
var conversations []db.Conversation
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return conversations, err
}
err = dbConn.Model(&db.Conversation{}).Where("owner_user_id IN (?) and conversation_id=?", OwnerUserIDList, conversationID).Find(&conversations).Error
return conversations, err
}

View File

@@ -3,24 +3,18 @@ package db
import (
"Open_IM/pkg/common/constant"
log2 "Open_IM/pkg/common/log"
pbCommon "Open_IM/pkg/proto/sdk_ws"
"encoding/json"
"github.com/garyburd/redigo/redis"
)
const (
accountTempCode = "ACCOUNT_TEMP_CODE"
AccountTempCode = "ACCOUNT_TEMP_CODE"
resetPwdTempCode = "RESET_PWD_TEMP_CODE"
userIncrSeq = "REDIS_USER_INCR_SEQ:" // user incr seq
appleDeviceToken = "DEVICE_TOKEN"
userMinSeq = "REDIS_USER_MIN_SEQ:"
uidPidToken = "UID_PID_TOKEN_STATUS:"
conversationReceiveMessageOpt = "CON_RECV_MSG_OPT:"
getuiToken = "GETUI"
userInfoCache = "USER_INFO_CACHE:"
friendRelationCache = "FRIEND_RELATION_CACHE:"
blackListCache = "BLACK_LIST_CACHE:"
groupCache = "GROUP_CACHE:"
GetuiToken = "GETUI"
)
func (d *DataBases) Exec(cmd string, key interface{}, args ...interface{}) (interface{}, error) {
@@ -43,16 +37,16 @@ func (d *DataBases) Exec(cmd string, key interface{}, args ...interface{}) (inte
return con.Do(cmd, params...)
}
func (d *DataBases) JudgeAccountEXISTS(account string) (bool, error) {
key := accountTempCode + account
key := AccountTempCode + account
return redis.Bool(d.Exec("EXISTS", key))
}
func (d *DataBases) SetAccountCode(account string, code, ttl int) (err error) {
key := accountTempCode + account
key := AccountTempCode + account
_, err = d.Exec("SET", key, code, "ex", ttl)
return err
}
func (d *DataBases) GetAccountCode(account string) (string, error) {
key := accountTempCode + account
key := AccountTempCode + account
return redis.String(d.Exec("GET", key))
}
@@ -153,100 +147,11 @@ func (d *DataBases) GetMultiConversationMsgOpt(userID string, conversationIDs []
}
func (d *DataBases) SetGetuiToken(token string, expireTime int64) error {
_, err := d.Exec("SET", getuiToken, token, "ex", expireTime)
_, err := d.Exec("SET", GetuiToken, token, "ex", expireTime)
return err
}
func (d *DataBases) GetGetuiToken() (string, error) {
result, err := redis.String(d.Exec("GET", getuiToken))
return result, err
}
func (d *DataBases) SearchContentType() {
}
func (d *DataBases) SetUserInfoToCache(userID string, m map[string]interface{}) error {
_, err := d.Exec("hmset", userInfoCache+userID, redis.Args{}.Add().AddFlat(m)...)
return err
}
func (d *DataBases) GetUserInfoFromCache(userID string) (*pbCommon.UserInfo, error) {
result, err := redis.String(d.Exec("hgetall", userInfoCache+userID))
log2.NewInfo("", result)
if err != nil {
return nil, err
}
userInfo := &pbCommon.UserInfo{}
err = json.Unmarshal([]byte(result), userInfo)
return userInfo, err
}
func (d *DataBases) AddFriendToCache(userID string, friendIDList ...string) error {
var IDList []interface{}
for _, id := range friendIDList {
IDList = append(IDList, id)
}
_, err := d.Exec("SADD", friendRelationCache+userID, IDList...)
return err
}
func (d *DataBases) ReduceFriendToCache(userID string, friendIDList ...string) error {
var IDList []interface{}
for _, id := range friendIDList {
IDList = append(IDList, id)
}
_, err := d.Exec("SREM", friendRelationCache+userID, IDList...)
return err
}
func (d *DataBases) GetFriendIDListFromCache(userID string) ([]string, error) {
result, err := redis.Strings(d.Exec("SMEMBERS", friendRelationCache+userID))
return result, err
}
func (d *DataBases) AddBlackUserToCache(userID string, blackList ...string) error {
var IDList []interface{}
for _, id := range blackList {
IDList = append(IDList, id)
}
_, err := d.Exec("SADD", blackListCache+userID, IDList...)
return err
}
func (d *DataBases) ReduceBlackUserFromCache(userID string, blackList ...string) error {
var IDList []interface{}
for _, id := range blackList {
IDList = append(IDList, id)
}
_, err := d.Exec("SREM", blackListCache+userID, IDList...)
return err
}
func (d *DataBases) GetBlackListFromCache(userID string) ([]string, error) {
result, err := redis.Strings(d.Exec("SMEMBERS", blackListCache+userID))
return result, err
}
func (d *DataBases) AddGroupMemberToCache(groupID string, userIDList ...string) error {
var IDList []interface{}
for _, id := range userIDList {
IDList = append(IDList, id)
}
_, err := d.Exec("SADD", blackListCache+groupID, IDList...)
return err
}
func (d *DataBases) ReduceGroupMemberFromCache(groupID string, userIDList ...string) error {
var IDList []interface{}
for _, id := range userIDList {
IDList = append(IDList, id)
}
_, err := d.Exec("SREM", blackListCache+groupID, IDList...)
return err
}
func (d *DataBases) GetGroupMemberIDListFromCache(groupID string) ([]string, error) {
result, err := redis.Strings(d.Exec("SMEMBERS", groupCache+groupID))
result, err := redis.String(d.Exec("GET", GetuiToken))
return result, err
}

View File

@@ -206,7 +206,7 @@ func ParseRedisInterfaceToken(redisToken interface{}) (*Claims, error) {
func VerifyToken(token, uid string) (bool, error) {
claims, err := ParseToken(token, "")
if err != nil {
return false, utils.Wrap(err, "ParseToken failed")
return false, err
}
if claims.UID != uid {
return false, &constant.ErrTokenUnknown
@@ -215,8 +215,8 @@ func VerifyToken(token, uid string) (bool, error) {
log.NewDebug("", claims.UID, claims.Platform)
return true, nil
}
func WsVerifyToken(token, uid string, platformID string, operationID string) (bool, error, string) {
claims, err := ParseToken(token, operationID)
func WsVerifyToken(token, uid string, platformID string) (bool, error, string) {
claims, err := ParseToken(token, "")
if err != nil {
return false, utils.Wrap(err, "parse token err"), "parse token err"
}
@@ -226,6 +226,6 @@ func WsVerifyToken(token, uid string, platformID string, operationID string) (bo
if claims.Platform != constant.PlatformIDToName(utils.StringToInt32(platformID)) {
return false, utils.Wrap(&constant.ErrTokenUnknown, "platform is not same to token platform"), "platform is not same to token platform"
}
log.NewDebug(operationID, utils.GetSelfFuncName(), " check ok ", claims.UID, uid, claims.Platform)
log.NewDebug("", claims.UID, claims.Platform)
return true, nil, ""
}

View File

@@ -154,3 +154,8 @@ func UserDBCopyOpenIM(dst *open_im_sdk.UserInfo, src *db.User) {
func UserDBCopyOpenIMPublicUser(dst *open_im_sdk.PublicUserInfo, src *db.User) {
utils.CopyStructFields(dst, src)
}
//
//func PublicUserDBCopyOpenIM(dst *open_im_sdk.PublicUserInfo, src *db.User){
//
//}

View File

@@ -1,7 +1,6 @@
package getcdv3
import (
"Open_IM/pkg/common/log"
"context"
"fmt"
"go.etcd.io/etcd/clientv3"
@@ -44,19 +43,13 @@ func NewResolver(schema, etcdAddr, serviceName string) (*Resolver, error) {
r.schema = schema
r.etcdAddr = etcdAddr
resolver.Register(&r)
//
ctx, _ := context.WithTimeout(context.Background(), time.Second*5)
conn, err := grpc.DialContext(ctx, GetPrefix(schema, serviceName),
grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"LoadBalancingPolicy": "%s"}`, roundrobin.Name)),
grpc.WithInsecure())
log.Debug("", "etcd key ", GetPrefix(schema, serviceName))
//conn, err := grpc.Dial(
// GetPrefix(schema, serviceName),
// grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"LoadBalancingPolicy": "%s"}`, roundrobin.Name)),
// grpc.WithInsecure(),
// grpc.WithTimeout(time.Duration(5)*time.Second),
//)
conn, err := grpc.Dial(
GetPrefix(schema, serviceName),
grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"LoadBalancingPolicy": "%s"}`, roundrobin.Name)),
grpc.WithInsecure(),
grpc.WithTimeout(time.Duration(5)*time.Second),
)
if err == nil {
r.grpcClientConn = conn
}
@@ -74,7 +67,6 @@ func GetConn(schema, etcdaddr, serviceName string) *grpc.ClientConn {
r, ok := nameResolver[schema+serviceName]
rwNameResolverMutex.RUnlock()
if ok {
log.Debug("", "etcd key ", schema+serviceName, "value ", *r.grpcClientConn, *r)
return r.grpcClientConn
}
@@ -82,18 +74,15 @@ func GetConn(schema, etcdaddr, serviceName string) *grpc.ClientConn {
r, ok = nameResolver[schema+serviceName]
if ok {
rwNameResolverMutex.Unlock()
log.Debug("", "etcd key ", schema+serviceName, "value ", *r.grpcClientConn, *r)
return r.grpcClientConn
}
r, err := NewResolver(schema, etcdaddr, serviceName)
if err != nil {
log.Error("", "etcd failed ", schema, etcdaddr, serviceName)
rwNameResolverMutex.Unlock()
return nil
}
log.Debug("", "etcd key ", schema+serviceName, "value ", *r.grpcClientConn, *r)
nameResolver[schema+serviceName] = r
rwNameResolverMutex.Unlock()
return r.grpcClientConn
@@ -104,7 +93,7 @@ func (r *Resolver) Build(target resolver.Target, cc resolver.ClientConn, opts re
return nil, fmt.Errorf("etcd clientv3 client failed, etcd:%s", target)
}
r.cc = cc
log.Debug("", "Build..")
ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
// "%s:///%s"
prefix := GetPrefix(r.schema, r.serviceName)
@@ -113,7 +102,7 @@ func (r *Resolver) Build(target resolver.Target, cc resolver.ClientConn, opts re
if err == nil {
var addrList []resolver.Address
for i := range resp.Kvs {
log.Debug("", "etcd init addr: ", string(resp.Kvs[i].Value))
//log.Debug("", "init addr: ", string(resp.Kvs[i].Value))
addrList = append(addrList, resolver.Address{Addr: string(resp.Kvs[i].Value)})
}
r.cc.UpdateState(resolver.State{Addresses: addrList})
@@ -159,27 +148,27 @@ func (r *Resolver) watch(prefix string, addrList []resolver.Address) {
if !exists(addrList, string(ev.Kv.Value)) {
flag = 1
addrList = append(addrList, resolver.Address{Addr: string(ev.Kv.Value)})
log.Debug("", "after add, new list: ", addrList)
//log.Debug("", "after add, new list: ", addrList)
}
case mvccpb.DELETE:
log.Debug("remove addr key: ", string(ev.Kv.Key), "value:", string(ev.Kv.Value))
//log.Debug("remove addr key: ", string(ev.Kv.Key), "value:", string(ev.Kv.Value))
i := strings.LastIndexAny(string(ev.Kv.Key), "/")
if i < 0 {
return
}
t := string(ev.Kv.Key)[i+1:]
log.Debug("remove addr key: ", string(ev.Kv.Key), "value:", string(ev.Kv.Value), "addr:", t)
//log.Debug("remove addr key: ", string(ev.Kv.Key), "value:", string(ev.Kv.Value), "addr:", t)
if s, ok := remove(addrList, t); ok {
flag = 1
addrList = s
log.Debug("after remove, new list: ", addrList)
//log.Debug("after remove, new list: ", addrList)
}
}
}
if flag == 1 {
r.cc.UpdateState(resolver.State{Addresses: addrList})
log.Debug("update: ", addrList)
//log.Debug("update: ", addrList)
}
}
}
@@ -187,7 +176,7 @@ func (r *Resolver) watch(prefix string, addrList []resolver.Address) {
func GetConn4Unique(schema, etcdaddr, servicename string) []*grpc.ClientConn {
gEtcdCli, err := clientv3.New(clientv3.Config{Endpoints: strings.Split(etcdaddr, ",")})
if err != nil {
log.Error("clientv3.New failed", err.Error())
//log.Error("clientv3.New failed", err.Error())
return nil
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,142 +0,0 @@
syntax = "proto3";
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
option go_package = "./cache;cache";
package cache;
message CommonResp{
int32 errCode = 1;
string errMsg = 2;
}
message GetUserInfoFromCacheReq{
repeated string userIDList = 1;
string operationID = 2;
}
message GetUserInfoFromCacheResp{
CommonResp commonResp = 1;
repeated server_api_params.UserInfo userInfoList = 2;
}
message UpdateUserInfoToCacheReq{
repeated server_api_params.UserInfo userInfoList = 1;
string operationID = 2;
}
message UpdateUserInfoToCacheResp{
CommonResp commonResp = 1;
}
message GetFriendIDListFromCacheReq {
string userID = 1;
string operationID = 2;
}
message GetFriendIDListFromCacheResp {
repeated string userIDList = 1;
CommonResp commonResp = 2;
}
message AddFriendToCacheReq {
string userID = 1;
string friendID = 2;
string operationID = 3;
}
message AddFriendToCacheResp {
CommonResp commonResp = 1;
}
message ReduceFriendFromCacheReq {
string userID = 1;
string friendID = 2;
string operationID = 3;
}
message ReduceFriendFromCacheResp {
CommonResp commonResp = 1;
}
message GetBlackIDListFromCacheReq {
string userID = 1;
string operationID = 2;
}
message GetBlackIDListFromCacheResp {
repeated string userIDList = 1;
CommonResp commonResp = 2;
}
message AddBlackUserToCacheReq {
string userID = 1;
string blackUserID = 2;
string operationID = 3;
}
message AddBlackUserToCacheResp {
CommonResp commonResp = 1;
}
message ReduceBlackUserFromCacheReq {
string userID = 1;
string blackUserID = 2;
string operationID = 3;
}
message ReduceBlackUserFromCacheResp {
CommonResp commonResp = 1;
}
message GetGroupMemberIDListFromCacheReq {
string operationID = 1;
string groupID = 2;
}
message GetGroupMemberIDListFromCacheResp {
CommonResp commonResp = 1;
repeated string userIDList = 2;
}
message AddGroupMemberToCacheReq {
repeated string userIDList = 1;
string groupID = 2;
string operationID = 3;
}
message AddGroupMemberToCacheResp {
CommonResp commonResp = 1;
}
message ReduceGroupMemberFromCacheReq {
repeated string userIDList = 1;
string groupID = 2;
string operationID = 3;
}
message ReduceGroupMemberFromCacheResp {
CommonResp commonResp = 1;
}
service cache{
// userInfo
rpc GetUserInfoFromCache(GetUserInfoFromCacheReq) returns(GetUserInfoFromCacheResp);
rpc UpdateUserInfoToCache(UpdateUserInfoToCacheReq) returns(UpdateUserInfoToCacheResp);
// friendInfo
rpc GetFriendIDListFromCache(GetFriendIDListFromCacheReq) returns(GetFriendIDListFromCacheResp);
rpc AddFriendToCache(AddFriendToCacheReq) returns(AddFriendToCacheResp);
rpc ReduceFriendFromCache(ReduceFriendFromCacheReq) returns(ReduceFriendFromCacheResp);
// blackList
rpc GetBlackIDListFromCache(GetBlackIDListFromCacheReq) returns(GetBlackIDListFromCacheResp);
rpc AddBlackUserToCache(AddBlackUserToCacheReq) returns(AddBlackUserToCacheResp);
rpc ReduceBlackUserFromCache(ReduceBlackUserFromCacheReq) returns(ReduceBlackUserFromCacheResp);
// group
rpc GetGroupMemberIDListFromCache(GetGroupMemberIDListFromCacheReq) returns(GetGroupMemberIDListFromCacheResp);
rpc AddGroupMemberToCache(AddGroupMemberToCacheReq) returns(AddGroupMemberToCacheResp);
rpc ReduceGroupMemberFromCache(ReduceGroupMemberFromCacheReq) returns(ReduceGroupMemberFromCacheResp);
}

View File

@@ -1,429 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: conversation/conversation.proto
package conversation // import "./conversation"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type CommonResp struct {
ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"`
ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CommonResp) Reset() { *m = CommonResp{} }
func (m *CommonResp) String() string { return proto.CompactTextString(m) }
func (*CommonResp) ProtoMessage() {}
func (*CommonResp) Descriptor() ([]byte, []int) {
return fileDescriptor_conversation_e6bf38f800b9bed2, []int{0}
}
func (m *CommonResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CommonResp.Unmarshal(m, b)
}
func (m *CommonResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CommonResp.Marshal(b, m, deterministic)
}
func (dst *CommonResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_CommonResp.Merge(dst, src)
}
func (m *CommonResp) XXX_Size() int {
return xxx_messageInfo_CommonResp.Size(m)
}
func (m *CommonResp) XXX_DiscardUnknown() {
xxx_messageInfo_CommonResp.DiscardUnknown(m)
}
var xxx_messageInfo_CommonResp proto.InternalMessageInfo
func (m *CommonResp) GetErrCode() int32 {
if m != nil {
return m.ErrCode
}
return 0
}
func (m *CommonResp) GetErrMsg() string {
if m != nil {
return m.ErrMsg
}
return ""
}
type Conversation struct {
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID" json:"ownerUserID,omitempty"`
ConversationID string `protobuf:"bytes,2,opt,name=conversationID" json:"conversationID,omitempty"`
RecvMsgOpt int32 `protobuf:"varint,3,opt,name=recvMsgOpt" json:"recvMsgOpt,omitempty"`
ConversationType int32 `protobuf:"varint,4,opt,name=conversationType" json:"conversationType,omitempty"`
UserID string `protobuf:"bytes,5,opt,name=userID" json:"userID,omitempty"`
GroupID string `protobuf:"bytes,6,opt,name=groupID" json:"groupID,omitempty"`
UnreadCount int32 `protobuf:"varint,7,opt,name=unreadCount" json:"unreadCount,omitempty"`
DraftTextTime int64 `protobuf:"varint,8,opt,name=draftTextTime" json:"draftTextTime,omitempty"`
IsPinned bool `protobuf:"varint,9,opt,name=isPinned" json:"isPinned,omitempty"`
AttachedInfo string `protobuf:"bytes,10,opt,name=attachedInfo" json:"attachedInfo,omitempty"`
IsPrivateChat bool `protobuf:"varint,11,opt,name=isPrivateChat" json:"isPrivateChat,omitempty"`
GroupAtType int32 `protobuf:"varint,12,opt,name=groupAtType" json:"groupAtType,omitempty"`
IsNotInGroup bool `protobuf:"varint,13,opt,name=isNotInGroup" json:"isNotInGroup,omitempty"`
Ex string `protobuf:"bytes,14,opt,name=ex" json:"ex,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Conversation) Reset() { *m = Conversation{} }
func (m *Conversation) String() string { return proto.CompactTextString(m) }
func (*Conversation) ProtoMessage() {}
func (*Conversation) Descriptor() ([]byte, []int) {
return fileDescriptor_conversation_e6bf38f800b9bed2, []int{1}
}
func (m *Conversation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Conversation.Unmarshal(m, b)
}
func (m *Conversation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Conversation.Marshal(b, m, deterministic)
}
func (dst *Conversation) XXX_Merge(src proto.Message) {
xxx_messageInfo_Conversation.Merge(dst, src)
}
func (m *Conversation) XXX_Size() int {
return xxx_messageInfo_Conversation.Size(m)
}
func (m *Conversation) XXX_DiscardUnknown() {
xxx_messageInfo_Conversation.DiscardUnknown(m)
}
var xxx_messageInfo_Conversation proto.InternalMessageInfo
func (m *Conversation) GetOwnerUserID() string {
if m != nil {
return m.OwnerUserID
}
return ""
}
func (m *Conversation) GetConversationID() string {
if m != nil {
return m.ConversationID
}
return ""
}
func (m *Conversation) GetRecvMsgOpt() int32 {
if m != nil {
return m.RecvMsgOpt
}
return 0
}
func (m *Conversation) GetConversationType() int32 {
if m != nil {
return m.ConversationType
}
return 0
}
func (m *Conversation) GetUserID() string {
if m != nil {
return m.UserID
}
return ""
}
func (m *Conversation) GetGroupID() string {
if m != nil {
return m.GroupID
}
return ""
}
func (m *Conversation) GetUnreadCount() int32 {
if m != nil {
return m.UnreadCount
}
return 0
}
func (m *Conversation) GetDraftTextTime() int64 {
if m != nil {
return m.DraftTextTime
}
return 0
}
func (m *Conversation) GetIsPinned() bool {
if m != nil {
return m.IsPinned
}
return false
}
func (m *Conversation) GetAttachedInfo() string {
if m != nil {
return m.AttachedInfo
}
return ""
}
func (m *Conversation) GetIsPrivateChat() bool {
if m != nil {
return m.IsPrivateChat
}
return false
}
func (m *Conversation) GetGroupAtType() int32 {
if m != nil {
return m.GroupAtType
}
return 0
}
func (m *Conversation) GetIsNotInGroup() bool {
if m != nil {
return m.IsNotInGroup
}
return false
}
func (m *Conversation) GetEx() string {
if m != nil {
return m.Ex
}
return ""
}
type ModifyConversationFieldReq struct {
Conversation *Conversation `protobuf:"bytes,1,opt,name=conversation" json:"conversation,omitempty"`
FieldType int32 `protobuf:"varint,2,opt,name=fieldType" json:"fieldType,omitempty"`
UserIDList []string `protobuf:"bytes,3,rep,name=userIDList" json:"userIDList,omitempty"`
OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ModifyConversationFieldReq) Reset() { *m = ModifyConversationFieldReq{} }
func (m *ModifyConversationFieldReq) String() string { return proto.CompactTextString(m) }
func (*ModifyConversationFieldReq) ProtoMessage() {}
func (*ModifyConversationFieldReq) Descriptor() ([]byte, []int) {
return fileDescriptor_conversation_e6bf38f800b9bed2, []int{2}
}
func (m *ModifyConversationFieldReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ModifyConversationFieldReq.Unmarshal(m, b)
}
func (m *ModifyConversationFieldReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ModifyConversationFieldReq.Marshal(b, m, deterministic)
}
func (dst *ModifyConversationFieldReq) XXX_Merge(src proto.Message) {
xxx_messageInfo_ModifyConversationFieldReq.Merge(dst, src)
}
func (m *ModifyConversationFieldReq) XXX_Size() int {
return xxx_messageInfo_ModifyConversationFieldReq.Size(m)
}
func (m *ModifyConversationFieldReq) XXX_DiscardUnknown() {
xxx_messageInfo_ModifyConversationFieldReq.DiscardUnknown(m)
}
var xxx_messageInfo_ModifyConversationFieldReq proto.InternalMessageInfo
func (m *ModifyConversationFieldReq) GetConversation() *Conversation {
if m != nil {
return m.Conversation
}
return nil
}
func (m *ModifyConversationFieldReq) GetFieldType() int32 {
if m != nil {
return m.FieldType
}
return 0
}
func (m *ModifyConversationFieldReq) GetUserIDList() []string {
if m != nil {
return m.UserIDList
}
return nil
}
func (m *ModifyConversationFieldReq) GetOperationID() string {
if m != nil {
return m.OperationID
}
return ""
}
type ModifyConversationFieldResp struct {
CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ModifyConversationFieldResp) Reset() { *m = ModifyConversationFieldResp{} }
func (m *ModifyConversationFieldResp) String() string { return proto.CompactTextString(m) }
func (*ModifyConversationFieldResp) ProtoMessage() {}
func (*ModifyConversationFieldResp) Descriptor() ([]byte, []int) {
return fileDescriptor_conversation_e6bf38f800b9bed2, []int{3}
}
func (m *ModifyConversationFieldResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ModifyConversationFieldResp.Unmarshal(m, b)
}
func (m *ModifyConversationFieldResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ModifyConversationFieldResp.Marshal(b, m, deterministic)
}
func (dst *ModifyConversationFieldResp) XXX_Merge(src proto.Message) {
xxx_messageInfo_ModifyConversationFieldResp.Merge(dst, src)
}
func (m *ModifyConversationFieldResp) XXX_Size() int {
return xxx_messageInfo_ModifyConversationFieldResp.Size(m)
}
func (m *ModifyConversationFieldResp) XXX_DiscardUnknown() {
xxx_messageInfo_ModifyConversationFieldResp.DiscardUnknown(m)
}
var xxx_messageInfo_ModifyConversationFieldResp proto.InternalMessageInfo
func (m *ModifyConversationFieldResp) GetCommonResp() *CommonResp {
if m != nil {
return m.CommonResp
}
return nil
}
func init() {
proto.RegisterType((*CommonResp)(nil), "conversation.CommonResp")
proto.RegisterType((*Conversation)(nil), "conversation.Conversation")
proto.RegisterType((*ModifyConversationFieldReq)(nil), "conversation.ModifyConversationFieldReq")
proto.RegisterType((*ModifyConversationFieldResp)(nil), "conversation.ModifyConversationFieldResp")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for Conversation service
type ConversationClient interface {
ModifyConversationField(ctx context.Context, in *ModifyConversationFieldReq, opts ...grpc.CallOption) (*ModifyConversationFieldResp, error)
}
type conversationClient struct {
cc *grpc.ClientConn
}
func NewConversationClient(cc *grpc.ClientConn) ConversationClient {
return &conversationClient{cc}
}
func (c *conversationClient) ModifyConversationField(ctx context.Context, in *ModifyConversationFieldReq, opts ...grpc.CallOption) (*ModifyConversationFieldResp, error) {
out := new(ModifyConversationFieldResp)
err := grpc.Invoke(ctx, "/conversation.conversation/ModifyConversationField", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Conversation service
type ConversationServer interface {
ModifyConversationField(context.Context, *ModifyConversationFieldReq) (*ModifyConversationFieldResp, error)
}
func RegisterConversationServer(s *grpc.Server, srv ConversationServer) {
s.RegisterService(&_Conversation_serviceDesc, srv)
}
func _Conversation_ModifyConversationField_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ModifyConversationFieldReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ConversationServer).ModifyConversationField(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/conversation.conversation/ModifyConversationField",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ConversationServer).ModifyConversationField(ctx, req.(*ModifyConversationFieldReq))
}
return interceptor(ctx, in, info, handler)
}
var _Conversation_serviceDesc = grpc.ServiceDesc{
ServiceName: "conversation.conversation",
HandlerType: (*ConversationServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ModifyConversationField",
Handler: _Conversation_ModifyConversationField_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "conversation/conversation.proto",
}
func init() {
proto.RegisterFile("conversation/conversation.proto", fileDescriptor_conversation_e6bf38f800b9bed2)
}
var fileDescriptor_conversation_e6bf38f800b9bed2 = []byte{
// 475 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xdf, 0x8a, 0xd3, 0x40,
0x14, 0x87, 0x49, 0xbb, 0xdb, 0x6d, 0x4e, 0xbb, 0x45, 0xe6, 0x42, 0x87, 0xae, 0x7f, 0x42, 0x10,
0x89, 0x5e, 0x54, 0x58, 0x6f, 0x04, 0x61, 0x41, 0x53, 0x94, 0x80, 0xd5, 0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 0x56,
0x9e, 0xee, 0xcb, 0xef, 0x9e, 0x33, 0xaf, 0xf7, 0xfc, 0x77, 0x78, 0x71, 0x22, 0xe0, 0xc1, 0x81,
0x83, 0x48, 0x16, 0x06, 0x1e, 0xfe, 0x9a, 0xc3, 0xe7, 0x77, 0xec, 0xd4, 0xf5, 0xbb, 0x47, 0xdf,
0xce, 0x46, 0xc1, 0xaf, 0xfd, 0xc6, 0x2f, 0xbe, 0x77, 0xdc, 0x8f, 0xfe, 0xea, 0x5f, 0x00, 0x00,
0x00, 0xff, 0xff, 0x8d, 0x8a, 0xf6, 0x60, 0x0b, 0x04, 0x00, 0x00,
}

View File

@@ -6,33 +6,297 @@ message CommonResp{
int32 errCode = 1;
string errMsg = 2;
}
message Conversation{
string ownerUserID = 1;
string conversationID = 2;
int32 recvMsgOpt = 3;
int32 conversationType = 4;
string userID = 5;
string groupID = 6;
int32 unreadCount = 7;
int64 draftTextTime = 8;
bool isPinned = 9;
string attachedInfo = 10;
bool isPrivateChat = 11;
int32 groupAtType = 12;
bool isNotInGroup = 13;
string ex = 14;
}
message ModifyConversationFieldReq{
Conversation conversation = 1;
int32 fieldType = 2;
repeated string userIDList = 3;
string operationID = 4;
message DeleteUsersReq{
repeated string DeleteUserIDList = 2;
string OpUserID = 3;
string OperationID = 4;
}
message ModifyConversationFieldResp{
message DeleteUsersResp{
CommonResp CommonResp = 1;
repeated string FailedUserIDList = 2;
}
message GetAllUserIDReq{
string opUserID = 1;
string operationID = 2;
}
message GetAllUserIDResp{
CommonResp CommonResp = 1;
repeated string UserIDList = 2;
}
message AccountCheckReq{
repeated string CheckUserIDList = 1;
string OpUserID = 2;
string OperationID = 3;
}
message AccountCheckResp{
CommonResp commonResp = 1;
message SingleUserStatus {
string userID = 1;
string accountStatus = 2;
}
repeated SingleUserStatus ResultList = 2;
}
message GetUserInfoReq{
repeated string userIDList = 1;
string OpUserID = 2;
string OperationID = 3;
}
message GetUserInfoResp{
CommonResp commonResp = 1;
repeated server_api_params.UserInfo UserInfoList = 3;
}
message UpdateUserInfoReq{
server_api_params.UserInfo UserInfo = 1;
string OpUserID = 2;
string operationID = 3;
}
message UpdateUserInfoResp{
CommonResp commonResp = 1;
}
service conversation {
rpc ModifyConversationField(ModifyConversationFieldReq)returns(ModifyConversationFieldResp);
message Conversation{
string OwnerUserID = 1;
string ConversationID = 2;
int32 RecvMsgOpt = 3;
int32 ConversationType = 4;
string UserID = 5;
string GroupID = 6;
int32 UnreadCount = 7;
int64 DraftTextTime = 8;
bool IsPinned = 9;
string AttachedInfo = 10;
bool IsPrivateChat = 11;
int32 GroupAtType = 12;
bool IsNotInGroup = 13;
string Ex = 14;
}
message ModifyConversationFiledReq{
Conversation Conversation = 1;
int32 notificationType = 2;
string OperationID = 3;
}
message SetConversationResp{
CommonResp commonResp = 1;
}
message SetRecvMsgOptReq {
string OwnerUserID = 1;
string ConversationID = 2;
int32 RecvMsgOpt = 3;
int32 notificationType = 4;
string OperationID = 5;
}
message SetRecvMsgOptResp {
CommonResp commonResp = 1;
}
message GetConversationReq{
string ConversationID = 1;
string OwnerUserID = 2;
string OperationID = 3;
}
message GetConversationResp{
CommonResp commonResp = 1;
Conversation Conversation = 2;
}
message GetConversationsReq{
string OwnerUserID = 1;
repeated string ConversationIDs = 2;
string OperationID = 3;
}
message GetConversationsResp{
CommonResp commonResp = 1;
repeated Conversation Conversations = 2;
}
message GetAllConversationsReq{
string OwnerUserID = 1;
string OperationID = 2;
}
message GetAllConversationsResp{
CommonResp commonResp = 1;
repeated Conversation Conversations = 2;
}
message BatchSetConversationsReq{
repeated Conversation Conversations = 1;
string OwnerUserID = 2;
int32 notificationType = 3;
string OperationID = 4;
}
message BatchSetConversationsResp{
CommonResp commonResp = 1;
repeated string Success = 2;
repeated string Failed = 3;
}
message ResignUserReq{
string UserId = 1;
string OperationID = 2;
}
message ResignUserResp{
CommonResp commonResp = 1;
}
message GetUserByIdReq{
string UserId = 1;
string OperationID = 2;
}
message User{
string ProfilePhoto = 1;
string Nickname = 2;
string UserId = 3;
string CreateTime = 4;
bool IsBlock = 5;
}
message GetUserByIdResp{
CommonResp CommonResp = 1;
User user = 2;
}
message GetUsersByNameReq {
string UserName = 1;
server_api_params.RequestPagination Pagination = 2;
string OperationID = 3;
}
message GetUsersByNameResp {
repeated User users = 1;
server_api_params.ResponsePagination Pagination = 2;
int32 UserNums = 3;
}
message AlterUserReq{
string UserId = 1;
string OperationID = 2;
int64 PhoneNumber = 3;
string Nickname = 4;
string Email = 5;
string OpUserId = 6;
}
message AlterUserResp{
CommonResp CommonResp = 1;
}
message GetUsersReq {
string OperationID = 1;
server_api_params.RequestPagination Pagination = 2;
string UserName = 3;
}
message GetUsersResp{
CommonResp CommonResp = 1;
repeated User user = 2;
server_api_params.ResponsePagination Pagination = 3;
int32 UserNums = 4;
}
message AddUserReq{
string OperationID = 1;
string PhoneNumber = 2;
string UserId = 3;
string name = 4;
string OpUserId = 5;
}
message AddUserResp{
CommonResp CommonResp = 1;
}
message BlockUserReq{
string UserId = 1;
string EndDisableTime = 2;
string OperationID = 3;
string OpUserId = 4;
}
message BlockUserResp{
CommonResp CommonResp = 1;
}
message UnBlockUserReq{
string UserId = 1;
string OperationID = 2;
string OpUserId = 3;
}
message UnBlockUserResp{
CommonResp CommonResp = 1;
}
message GetBlockUsersReq{
server_api_params.RequestPagination Pagination = 1;
string OperationID = 2;
int32 BlockUserNum = 3;
}
message BlockUser {
User User = 1;
string BeginDisableTime = 2;
string EndDisableTime = 3;
}
message GetBlockUsersResp{
CommonResp CommonResp = 1;
repeated BlockUser BlockUsers = 2;
server_api_params.ResponsePagination Pagination = 3;
int32 UserNums = 4;
}
message GetBlockUserByIdReq {
string User_id = 1;
string OperationID = 2;
}
message GetBlockUserByIdResp {
BlockUser BlockUser = 2;
}
message DeleteUserReq {
string User_id = 1;
string OperationID = 2;
string OpUserId = 3;
}
message DeleteUserResp {
CommonResp CommonResp = 1;
}
service user {
rpc AccountCheck(AccountCheckReq)returns(AccountCheckResp);
rpc GetConversation(GetConversationReq)returns(GetConversationResp);
rpc GetAllConversations(GetAllConversationsReq)returns(GetAllConversationsResp);
rpc GetConversations(GetConversationsReq)returns(GetConversationsResp);
rpc BatchSetConversations(BatchSetConversationsReq)returns(BatchSetConversationsResp);
rpc SetConversation(SetConversationReq)returns(SetConversationResp);
rpc SetRecvMsgOpt(SetRecvMsgOptReq)returns(SetRecvMsgOptResp);
}

View File

@@ -166,7 +166,4 @@ service friend{
rpc addFriendResponse(AddFriendResponseReq) returns(AddFriendResponseResp);
rpc setFriendRemark(SetFriendRemarkReq) returns(SetFriendRemarkResp);
rpc importFriend(ImportFriendReq) returns(ImportFriendResp);
rpc CheckFriendFromCache(IsFriendReq) returns(IsFriendResp);
rpc CheckBlockFromCache(IsInBlackListReq) returns(IsFriendResp);
}

View File

@@ -36,7 +36,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} }
func (m *CommonResp) String() string { return proto.CompactTextString(m) }
func (*CommonResp) ProtoMessage() {}
func (*CommonResp) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{0}
return fileDescriptor_office_02f43b66ea327245, []int{0}
}
func (m *CommonResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CommonResp.Unmarshal(m, b)
@@ -82,7 +82,7 @@ func (m *TagUser) Reset() { *m = TagUser{} }
func (m *TagUser) String() string { return proto.CompactTextString(m) }
func (*TagUser) ProtoMessage() {}
func (*TagUser) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{1}
return fileDescriptor_office_02f43b66ea327245, []int{1}
}
func (m *TagUser) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TagUser.Unmarshal(m, b)
@@ -129,7 +129,7 @@ func (m *Tag) Reset() { *m = Tag{} }
func (m *Tag) String() string { return proto.CompactTextString(m) }
func (*Tag) ProtoMessage() {}
func (*Tag) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{2}
return fileDescriptor_office_02f43b66ea327245, []int{2}
}
func (m *Tag) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Tag.Unmarshal(m, b)
@@ -182,7 +182,7 @@ func (m *GetUserTagsReq) Reset() { *m = GetUserTagsReq{} }
func (m *GetUserTagsReq) String() string { return proto.CompactTextString(m) }
func (*GetUserTagsReq) ProtoMessage() {}
func (*GetUserTagsReq) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{3}
return fileDescriptor_office_02f43b66ea327245, []int{3}
}
func (m *GetUserTagsReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserTagsReq.Unmarshal(m, b)
@@ -228,7 +228,7 @@ func (m *GetUserTagsResp) Reset() { *m = GetUserTagsResp{} }
func (m *GetUserTagsResp) String() string { return proto.CompactTextString(m) }
func (*GetUserTagsResp) ProtoMessage() {}
func (*GetUserTagsResp) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{4}
return fileDescriptor_office_02f43b66ea327245, []int{4}
}
func (m *GetUserTagsResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserTagsResp.Unmarshal(m, b)
@@ -276,7 +276,7 @@ func (m *CreateTagReq) Reset() { *m = CreateTagReq{} }
func (m *CreateTagReq) String() string { return proto.CompactTextString(m) }
func (*CreateTagReq) ProtoMessage() {}
func (*CreateTagReq) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{5}
return fileDescriptor_office_02f43b66ea327245, []int{5}
}
func (m *CreateTagReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateTagReq.Unmarshal(m, b)
@@ -335,7 +335,7 @@ func (m *CreateTagResp) Reset() { *m = CreateTagResp{} }
func (m *CreateTagResp) String() string { return proto.CompactTextString(m) }
func (*CreateTagResp) ProtoMessage() {}
func (*CreateTagResp) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{6}
return fileDescriptor_office_02f43b66ea327245, []int{6}
}
func (m *CreateTagResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateTagResp.Unmarshal(m, b)
@@ -375,7 +375,7 @@ func (m *DeleteTagReq) Reset() { *m = DeleteTagReq{} }
func (m *DeleteTagReq) String() string { return proto.CompactTextString(m) }
func (*DeleteTagReq) ProtoMessage() {}
func (*DeleteTagReq) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{7}
return fileDescriptor_office_02f43b66ea327245, []int{7}
}
func (m *DeleteTagReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteTagReq.Unmarshal(m, b)
@@ -427,7 +427,7 @@ func (m *DeleteTagResp) Reset() { *m = DeleteTagResp{} }
func (m *DeleteTagResp) String() string { return proto.CompactTextString(m) }
func (*DeleteTagResp) ProtoMessage() {}
func (*DeleteTagResp) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{8}
return fileDescriptor_office_02f43b66ea327245, []int{8}
}
func (m *DeleteTagResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteTagResp.Unmarshal(m, b)
@@ -470,7 +470,7 @@ func (m *SetTagReq) Reset() { *m = SetTagReq{} }
func (m *SetTagReq) String() string { return proto.CompactTextString(m) }
func (*SetTagReq) ProtoMessage() {}
func (*SetTagReq) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{9}
return fileDescriptor_office_02f43b66ea327245, []int{9}
}
func (m *SetTagReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetTagReq.Unmarshal(m, b)
@@ -543,7 +543,7 @@ func (m *SetTagResp) Reset() { *m = SetTagResp{} }
func (m *SetTagResp) String() string { return proto.CompactTextString(m) }
func (*SetTagResp) ProtoMessage() {}
func (*SetTagResp) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{10}
return fileDescriptor_office_02f43b66ea327245, []int{10}
}
func (m *SetTagResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetTagResp.Unmarshal(m, b)
@@ -587,7 +587,7 @@ func (m *SendMsg2TagReq) Reset() { *m = SendMsg2TagReq{} }
func (m *SendMsg2TagReq) String() string { return proto.CompactTextString(m) }
func (*SendMsg2TagReq) ProtoMessage() {}
func (*SendMsg2TagReq) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{11}
return fileDescriptor_office_02f43b66ea327245, []int{11}
}
func (m *SendMsg2TagReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SendMsg2TagReq.Unmarshal(m, b)
@@ -667,7 +667,7 @@ func (m *SendMsg2TagResp) Reset() { *m = SendMsg2TagResp{} }
func (m *SendMsg2TagResp) String() string { return proto.CompactTextString(m) }
func (*SendMsg2TagResp) ProtoMessage() {}
func (*SendMsg2TagResp) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{12}
return fileDescriptor_office_02f43b66ea327245, []int{12}
}
func (m *SendMsg2TagResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SendMsg2TagResp.Unmarshal(m, b)
@@ -707,7 +707,7 @@ func (m *GetTagSendLogsReq) Reset() { *m = GetTagSendLogsReq{} }
func (m *GetTagSendLogsReq) String() string { return proto.CompactTextString(m) }
func (*GetTagSendLogsReq) ProtoMessage() {}
func (*GetTagSendLogsReq) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{13}
return fileDescriptor_office_02f43b66ea327245, []int{13}
}
func (m *GetTagSendLogsReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetTagSendLogsReq.Unmarshal(m, b)
@@ -761,7 +761,7 @@ func (m *TagSendLog) Reset() { *m = TagSendLog{} }
func (m *TagSendLog) String() string { return proto.CompactTextString(m) }
func (*TagSendLog) ProtoMessage() {}
func (*TagSendLog) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{14}
return fileDescriptor_office_02f43b66ea327245, []int{14}
}
func (m *TagSendLog) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TagSendLog.Unmarshal(m, b)
@@ -815,7 +815,7 @@ func (m *GetTagSendLogsResp) Reset() { *m = GetTagSendLogsResp{} }
func (m *GetTagSendLogsResp) String() string { return proto.CompactTextString(m) }
func (*GetTagSendLogsResp) ProtoMessage() {}
func (*GetTagSendLogsResp) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{15}
return fileDescriptor_office_02f43b66ea327245, []int{15}
}
func (m *GetTagSendLogsResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetTagSendLogsResp.Unmarshal(m, b)
@@ -869,7 +869,7 @@ func (m *GetUserTagByIDReq) Reset() { *m = GetUserTagByIDReq{} }
func (m *GetUserTagByIDReq) String() string { return proto.CompactTextString(m) }
func (*GetUserTagByIDReq) ProtoMessage() {}
func (*GetUserTagByIDReq) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{16}
return fileDescriptor_office_02f43b66ea327245, []int{16}
}
func (m *GetUserTagByIDReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserTagByIDReq.Unmarshal(m, b)
@@ -922,7 +922,7 @@ func (m *GetUserTagByIDResp) Reset() { *m = GetUserTagByIDResp{} }
func (m *GetUserTagByIDResp) String() string { return proto.CompactTextString(m) }
func (*GetUserTagByIDResp) ProtoMessage() {}
func (*GetUserTagByIDResp) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{17}
return fileDescriptor_office_02f43b66ea327245, []int{17}
}
func (m *GetUserTagByIDResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserTagByIDResp.Unmarshal(m, b)
@@ -968,7 +968,7 @@ func (m *LikeUser) Reset() { *m = LikeUser{} }
func (m *LikeUser) String() string { return proto.CompactTextString(m) }
func (*LikeUser) ProtoMessage() {}
func (*LikeUser) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{18}
return fileDescriptor_office_02f43b66ea327245, []int{18}
}
func (m *LikeUser) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LikeUser.Unmarshal(m, b)
@@ -1014,7 +1014,7 @@ func (m *NotificationUser) Reset() { *m = NotificationUser{} }
func (m *NotificationUser) String() string { return proto.CompactTextString(m) }
func (*NotificationUser) ProtoMessage() {}
func (*NotificationUser) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{19}
return fileDescriptor_office_02f43b66ea327245, []int{19}
}
func (m *NotificationUser) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NotificationUser.Unmarshal(m, b)
@@ -1066,7 +1066,7 @@ func (m *Comment) Reset() { *m = Comment{} }
func (m *Comment) String() string { return proto.CompactTextString(m) }
func (*Comment) ProtoMessage() {}
func (*Comment) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{20}
return fileDescriptor_office_02f43b66ea327245, []int{20}
}
func (m *Comment) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Comment.Unmarshal(m, b)
@@ -1154,7 +1154,7 @@ func (m *PermissionGroup) Reset() { *m = PermissionGroup{} }
func (m *PermissionGroup) String() string { return proto.CompactTextString(m) }
func (*PermissionGroup) ProtoMessage() {}
func (*PermissionGroup) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{21}
return fileDescriptor_office_02f43b66ea327245, []int{21}
}
func (m *PermissionGroup) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PermissionGroup.Unmarshal(m, b)
@@ -1200,7 +1200,7 @@ func (m *WorkMomentUser) Reset() { *m = WorkMomentUser{} }
func (m *WorkMomentUser) String() string { return proto.CompactTextString(m) }
func (*WorkMomentUser) ProtoMessage() {}
func (*WorkMomentUser) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{22}
return fileDescriptor_office_02f43b66ea327245, []int{22}
}
func (m *WorkMomentUser) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WorkMomentUser.Unmarshal(m, b)
@@ -1256,7 +1256,7 @@ func (m *WorkMoment) Reset() { *m = WorkMoment{} }
func (m *WorkMoment) String() string { return proto.CompactTextString(m) }
func (*WorkMoment) ProtoMessage() {}
func (*WorkMoment) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{23}
return fileDescriptor_office_02f43b66ea327245, []int{23}
}
func (m *WorkMoment) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WorkMoment.Unmarshal(m, b)
@@ -1372,7 +1372,7 @@ func (m *CreateOneWorkMomentReq) Reset() { *m = CreateOneWorkMomentReq{}
func (m *CreateOneWorkMomentReq) String() string { return proto.CompactTextString(m) }
func (*CreateOneWorkMomentReq) ProtoMessage() {}
func (*CreateOneWorkMomentReq) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{24}
return fileDescriptor_office_02f43b66ea327245, []int{24}
}
func (m *CreateOneWorkMomentReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateOneWorkMomentReq.Unmarshal(m, b)
@@ -1417,7 +1417,7 @@ func (m *CreateOneWorkMomentResp) Reset() { *m = CreateOneWorkMomentResp
func (m *CreateOneWorkMomentResp) String() string { return proto.CompactTextString(m) }
func (*CreateOneWorkMomentResp) ProtoMessage() {}
func (*CreateOneWorkMomentResp) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{25}
return fileDescriptor_office_02f43b66ea327245, []int{25}
}
func (m *CreateOneWorkMomentResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateOneWorkMomentResp.Unmarshal(m, b)
@@ -1457,7 +1457,7 @@ func (m *DeleteOneWorkMomentReq) Reset() { *m = DeleteOneWorkMomentReq{}
func (m *DeleteOneWorkMomentReq) String() string { return proto.CompactTextString(m) }
func (*DeleteOneWorkMomentReq) ProtoMessage() {}
func (*DeleteOneWorkMomentReq) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{26}
return fileDescriptor_office_02f43b66ea327245, []int{26}
}
func (m *DeleteOneWorkMomentReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteOneWorkMomentReq.Unmarshal(m, b)
@@ -1509,7 +1509,7 @@ func (m *DeleteOneWorkMomentResp) Reset() { *m = DeleteOneWorkMomentResp
func (m *DeleteOneWorkMomentResp) String() string { return proto.CompactTextString(m) }
func (*DeleteOneWorkMomentResp) ProtoMessage() {}
func (*DeleteOneWorkMomentResp) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{27}
return fileDescriptor_office_02f43b66ea327245, []int{27}
}
func (m *DeleteOneWorkMomentResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteOneWorkMomentResp.Unmarshal(m, b)
@@ -1549,7 +1549,7 @@ func (m *LikeOneWorkMomentReq) Reset() { *m = LikeOneWorkMomentReq{} }
func (m *LikeOneWorkMomentReq) String() string { return proto.CompactTextString(m) }
func (*LikeOneWorkMomentReq) ProtoMessage() {}
func (*LikeOneWorkMomentReq) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{28}
return fileDescriptor_office_02f43b66ea327245, []int{28}
}
func (m *LikeOneWorkMomentReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LikeOneWorkMomentReq.Unmarshal(m, b)
@@ -1601,7 +1601,7 @@ func (m *LikeOneWorkMomentResp) Reset() { *m = LikeOneWorkMomentResp{} }
func (m *LikeOneWorkMomentResp) String() string { return proto.CompactTextString(m) }
func (*LikeOneWorkMomentResp) ProtoMessage() {}
func (*LikeOneWorkMomentResp) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{29}
return fileDescriptor_office_02f43b66ea327245, []int{29}
}
func (m *LikeOneWorkMomentResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LikeOneWorkMomentResp.Unmarshal(m, b)
@@ -1643,7 +1643,7 @@ func (m *CommentOneWorkMomentReq) Reset() { *m = CommentOneWorkMomentReq
func (m *CommentOneWorkMomentReq) String() string { return proto.CompactTextString(m) }
func (*CommentOneWorkMomentReq) ProtoMessage() {}
func (*CommentOneWorkMomentReq) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{30}
return fileDescriptor_office_02f43b66ea327245, []int{30}
}
func (m *CommentOneWorkMomentReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CommentOneWorkMomentReq.Unmarshal(m, b)
@@ -1709,7 +1709,7 @@ func (m *CommentOneWorkMomentResp) Reset() { *m = CommentOneWorkMomentRe
func (m *CommentOneWorkMomentResp) String() string { return proto.CompactTextString(m) }
func (*CommentOneWorkMomentResp) ProtoMessage() {}
func (*CommentOneWorkMomentResp) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{31}
return fileDescriptor_office_02f43b66ea327245, []int{31}
}
func (m *CommentOneWorkMomentResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CommentOneWorkMomentResp.Unmarshal(m, b)
@@ -1749,7 +1749,7 @@ func (m *GetWorkMomentByIDReq) Reset() { *m = GetWorkMomentByIDReq{} }
func (m *GetWorkMomentByIDReq) String() string { return proto.CompactTextString(m) }
func (*GetWorkMomentByIDReq) ProtoMessage() {}
func (*GetWorkMomentByIDReq) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{32}
return fileDescriptor_office_02f43b66ea327245, []int{32}
}
func (m *GetWorkMomentByIDReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetWorkMomentByIDReq.Unmarshal(m, b)
@@ -1802,7 +1802,7 @@ func (m *GetWorkMomentByIDResp) Reset() { *m = GetWorkMomentByIDResp{} }
func (m *GetWorkMomentByIDResp) String() string { return proto.CompactTextString(m) }
func (*GetWorkMomentByIDResp) ProtoMessage() {}
func (*GetWorkMomentByIDResp) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{33}
return fileDescriptor_office_02f43b66ea327245, []int{33}
}
func (m *GetWorkMomentByIDResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetWorkMomentByIDResp.Unmarshal(m, b)
@@ -1851,7 +1851,7 @@ func (m *ChangeWorkMomentPermissionReq) Reset() { *m = ChangeWorkMomentP
func (m *ChangeWorkMomentPermissionReq) String() string { return proto.CompactTextString(m) }
func (*ChangeWorkMomentPermissionReq) ProtoMessage() {}
func (*ChangeWorkMomentPermissionReq) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{34}
return fileDescriptor_office_02f43b66ea327245, []int{34}
}
func (m *ChangeWorkMomentPermissionReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ChangeWorkMomentPermissionReq.Unmarshal(m, b)
@@ -1917,7 +1917,7 @@ func (m *ChangeWorkMomentPermissionResp) Reset() { *m = ChangeWorkMoment
func (m *ChangeWorkMomentPermissionResp) String() string { return proto.CompactTextString(m) }
func (*ChangeWorkMomentPermissionResp) ProtoMessage() {}
func (*ChangeWorkMomentPermissionResp) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{35}
return fileDescriptor_office_02f43b66ea327245, []int{35}
}
func (m *ChangeWorkMomentPermissionResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ChangeWorkMomentPermissionResp.Unmarshal(m, b)
@@ -1946,9 +1946,8 @@ func (m *ChangeWorkMomentPermissionResp) GetCommonResp() *CommonResp {
type GetUserWorkMomentsReq struct {
UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"`
OpUserID string `protobuf:"bytes,2,opt,name=opUserID" json:"opUserID,omitempty"`
Pagination *sdk_ws.RequestPagination `protobuf:"bytes,3,opt,name=Pagination" json:"Pagination,omitempty"`
OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"`
Pagination *sdk_ws.RequestPagination `protobuf:"bytes,2,opt,name=Pagination" json:"Pagination,omitempty"`
OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -1958,7 +1957,7 @@ func (m *GetUserWorkMomentsReq) Reset() { *m = GetUserWorkMomentsReq{} }
func (m *GetUserWorkMomentsReq) String() string { return proto.CompactTextString(m) }
func (*GetUserWorkMomentsReq) ProtoMessage() {}
func (*GetUserWorkMomentsReq) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{36}
return fileDescriptor_office_02f43b66ea327245, []int{36}
}
func (m *GetUserWorkMomentsReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserWorkMomentsReq.Unmarshal(m, b)
@@ -1985,13 +1984,6 @@ func (m *GetUserWorkMomentsReq) GetUserID() string {
return ""
}
func (m *GetUserWorkMomentsReq) GetOpUserID() string {
if m != nil {
return m.OpUserID
}
return ""
}
func (m *GetUserWorkMomentsReq) GetPagination() *sdk_ws.RequestPagination {
if m != nil {
return m.Pagination
@@ -2019,7 +2011,7 @@ func (m *GetUserWorkMomentsResp) Reset() { *m = GetUserWorkMomentsResp{}
func (m *GetUserWorkMomentsResp) String() string { return proto.CompactTextString(m) }
func (*GetUserWorkMomentsResp) ProtoMessage() {}
func (*GetUserWorkMomentsResp) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{37}
return fileDescriptor_office_02f43b66ea327245, []int{37}
}
func (m *GetUserWorkMomentsResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserWorkMomentsResp.Unmarshal(m, b)
@@ -2073,7 +2065,7 @@ func (m *GetUserFriendWorkMomentsReq) Reset() { *m = GetUserFriendWorkMo
func (m *GetUserFriendWorkMomentsReq) String() string { return proto.CompactTextString(m) }
func (*GetUserFriendWorkMomentsReq) ProtoMessage() {}
func (*GetUserFriendWorkMomentsReq) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{38}
return fileDescriptor_office_02f43b66ea327245, []int{38}
}
func (m *GetUserFriendWorkMomentsReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserFriendWorkMomentsReq.Unmarshal(m, b)
@@ -2127,7 +2119,7 @@ func (m *GetUserFriendWorkMomentsResp) Reset() { *m = GetUserFriendWorkM
func (m *GetUserFriendWorkMomentsResp) String() string { return proto.CompactTextString(m) }
func (*GetUserFriendWorkMomentsResp) ProtoMessage() {}
func (*GetUserFriendWorkMomentsResp) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{39}
return fileDescriptor_office_02f43b66ea327245, []int{39}
}
func (m *GetUserFriendWorkMomentsResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserFriendWorkMomentsResp.Unmarshal(m, b)
@@ -2170,16 +2162,12 @@ func (m *GetUserFriendWorkMomentsResp) GetPagination() *sdk_ws.ResponsePaginatio
type WorkMomentNotificationMsg struct {
NotificationMsgType int32 `protobuf:"varint,1,opt,name=notificationMsgType" json:"notificationMsgType,omitempty"`
ReplyUserName string `protobuf:"bytes,2,opt,name=replyUserName" json:"replyUserName,omitempty"`
ReplyUserID string `protobuf:"bytes,3,opt,name=replyUserID" json:"replyUserID,omitempty"`
Content string `protobuf:"bytes,4,opt,name=content" json:"content,omitempty"`
ContentID string `protobuf:"bytes,5,opt,name=contentID" json:"contentID,omitempty"`
WorkMomentID string `protobuf:"bytes,6,opt,name=workMomentID" json:"workMomentID,omitempty"`
UserID string `protobuf:"bytes,7,opt,name=userID" json:"userID,omitempty"`
UserName string `protobuf:"bytes,8,opt,name=userName" json:"userName,omitempty"`
FaceURL string `protobuf:"bytes,9,opt,name=faceURL" json:"faceURL,omitempty"`
WorkMomentContent string `protobuf:"bytes,10,opt,name=workMomentContent" json:"workMomentContent,omitempty"`
CreateTime int32 `protobuf:"varint,11,opt,name=createTime" json:"createTime,omitempty"`
Comment *Comment `protobuf:"bytes,2,opt,name=comment" json:"comment,omitempty"`
WorkMomentID string `protobuf:"bytes,3,opt,name=workMomentID" json:"workMomentID,omitempty"`
UserID string `protobuf:"bytes,4,opt,name=userID" json:"userID,omitempty"`
UserName string `protobuf:"bytes,5,opt,name=userName" json:"userName,omitempty"`
FaceURL string `protobuf:"bytes,6,opt,name=faceURL" json:"faceURL,omitempty"`
WorkMomentContent string `protobuf:"bytes,7,opt,name=workMomentContent" json:"workMomentContent,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -2189,7 +2177,7 @@ func (m *WorkMomentNotificationMsg) Reset() { *m = WorkMomentNotificatio
func (m *WorkMomentNotificationMsg) String() string { return proto.CompactTextString(m) }
func (*WorkMomentNotificationMsg) ProtoMessage() {}
func (*WorkMomentNotificationMsg) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{40}
return fileDescriptor_office_02f43b66ea327245, []int{40}
}
func (m *WorkMomentNotificationMsg) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WorkMomentNotificationMsg.Unmarshal(m, b)
@@ -2216,32 +2204,11 @@ func (m *WorkMomentNotificationMsg) GetNotificationMsgType() int32 {
return 0
}
func (m *WorkMomentNotificationMsg) GetReplyUserName() string {
func (m *WorkMomentNotificationMsg) GetComment() *Comment {
if m != nil {
return m.ReplyUserName
return m.Comment
}
return ""
}
func (m *WorkMomentNotificationMsg) GetReplyUserID() string {
if m != nil {
return m.ReplyUserID
}
return ""
}
func (m *WorkMomentNotificationMsg) GetContent() string {
if m != nil {
return m.Content
}
return ""
}
func (m *WorkMomentNotificationMsg) GetContentID() string {
if m != nil {
return m.ContentID
}
return ""
return nil
}
func (m *WorkMomentNotificationMsg) GetWorkMomentID() string {
@@ -2279,13 +2246,6 @@ func (m *WorkMomentNotificationMsg) GetWorkMomentContent() string {
return ""
}
func (m *WorkMomentNotificationMsg) GetCreateTime() int32 {
if m != nil {
return m.CreateTime
}
return 0
}
type SetUserWorkMomentsLevelReq struct {
UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"`
Level int32 `protobuf:"varint,2,opt,name=level" json:"level,omitempty"`
@@ -2299,7 +2259,7 @@ func (m *SetUserWorkMomentsLevelReq) Reset() { *m = SetUserWorkMomentsLe
func (m *SetUserWorkMomentsLevelReq) String() string { return proto.CompactTextString(m) }
func (*SetUserWorkMomentsLevelReq) ProtoMessage() {}
func (*SetUserWorkMomentsLevelReq) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{41}
return fileDescriptor_office_02f43b66ea327245, []int{41}
}
func (m *SetUserWorkMomentsLevelReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetUserWorkMomentsLevelReq.Unmarshal(m, b)
@@ -2351,7 +2311,7 @@ func (m *SetUserWorkMomentsLevelResp) Reset() { *m = SetUserWorkMomentsL
func (m *SetUserWorkMomentsLevelResp) String() string { return proto.CompactTextString(m) }
func (*SetUserWorkMomentsLevelResp) ProtoMessage() {}
func (*SetUserWorkMomentsLevelResp) Descriptor() ([]byte, []int) {
return fileDescriptor_office_45d86d1784e03bf7, []int{42}
return fileDescriptor_office_02f43b66ea327245, []int{42}
}
func (m *SetUserWorkMomentsLevelResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetUserWorkMomentsLevelResp.Unmarshal(m, b)
@@ -2995,110 +2955,109 @@ var _OfficeService_serviceDesc = grpc.ServiceDesc{
Metadata: "office/office.proto",
}
func init() { proto.RegisterFile("office/office.proto", fileDescriptor_office_45d86d1784e03bf7) }
func init() { proto.RegisterFile("office/office.proto", fileDescriptor_office_02f43b66ea327245) }
var fileDescriptor_office_45d86d1784e03bf7 = []byte{
// 1621 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0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f4, 0x25, 0x2c, 0xea, 0x0a, 0x51, 0x74, 0x2b, 0xf7, 0x8a, 0x2d, 0xe8, 0x5d, 0x1f,
0x2d, 0x90, 0x18, 0x5b, 0xa8, 0x0c, 0x85, 0xb1, 0xba, 0x72, 0x55, 0x18, 0xab, 0x2f, 0x29, 0x4f,
0xc1, 0x2c, 0x2f, 0x89, 0xd0, 0x5d, 0x6e, 0xd1, 0xa8, 0x6a, 0xd0, 0x7c, 0x73, 0x12, 0x31, 0x12,
0xa2, 0x7d, 0xde, 0x2c, 0x93, 0xf2, 0x06, 0x5a, 0xcd, 0x45, 0x93, 0x7a, 0x79, 0x9b, 0x6b, 0xa3,
0x86, 0x49, 0x88, 0x30, 0x74, 0xca, 0xee, 0x56, 0x74, 0x3b, 0x37, 0x57, 0x57, 0x1d, 0x98, 0x77,
0xc6, 0x0b, 0x91, 0x10, 0x3d, 0x87, 0x95, 0x92, 0x9c, 0x87, 0x2c, 0xe9, 0x60, 0x97, 0xa4, 0x60,
0xf3, 0xf6, 0x58, 0x19, 0x12, 0x3e, 0x9c, 0xff, 0x6a, 0x6e, 0x23, 0xfd, 0x1f, 0xf0, 0xa3, 0xe4,
0xe7, 0xf9, 0x34, 0xfb, 0x93, 0xef, 0xbd, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x01, 0xfa, 0xac,
0xd6, 0x26, 0x1c, 0x00, 0x00,
var fileDescriptor_office_02f43b66ea327245 = []byte{
// 1604 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xcd, 0x6e, 0x1c, 0xc5,
0x13, 0xd7, 0xec, 0xa7, 0xb7, 0xd6, 0x89, 0xe3, 0xb6, 0x63, 0x6f, 0x26, 0xb1, 0xe3, 0xff, 0x24,
0xf9, 0x2b, 0x7c, 0xc8, 0x46, 0x4b, 0x84, 0x10, 0x88, 0x08, 0xc5, 0x9b, 0x58, 0x0b, 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0x49, 0xbc, 0x81, 0xd6, 0x52, 0xd9, 0xa4, 0xbe, 0xa3, 0xfa, 0xfa, 0xa4, 0x69,
0xe2, 0x23, 0x0c, 0x9d, 0xa2, 0x67, 0x0e, 0xdd, 0x4a, 0xad, 0xcd, 0x7b, 0xa8, 0xf5, 0xdb, 0xd3,
0x95, 0x88, 0x8f, 0x9e, 0xc1, 0x6a, 0x01, 0xe7, 0x21, 0x43, 0xba, 0xd8, 0x05, 0x14, 0xac, 0xdf,
0x9a, 0xaa, 0x43, 0xfc, 0x07, 0x8b, 0x9f, 0x2f, 0x6c, 0xc6, 0xff, 0x76, 0x7b, 0x3f, 0xfa, 0xf3,
0xac, 0xc1, 0xfe, 0xa7, 0xf6, 0xf6, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x70, 0x91, 0x17, 0x98,
0x95, 0x1b, 0x00, 0x00,
}

View File

@@ -245,16 +245,12 @@ message GetUserFriendWorkMomentsResp {
message WorkMomentNotificationMsg {
int32 notificationMsgType = 1;
string replyUserName = 2;
string replyUserID = 3;
string content = 4;
string contentID = 5;
string workMomentID = 6;
string userID = 7;
string userName = 8;
string faceURL = 9;
string workMomentContent = 10;
int32 createTime = 11;
Comment comment = 2;
string workMomentID = 3;
string userID = 4;
string userName = 5;
string faceURL = 6;
string workMomentContent = 7;
}
message SetUserWorkMomentsLevelReq {

View File

@@ -40,7 +40,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} }
func (m *GroupInfo) String() string { return proto.CompactTextString(m) }
func (*GroupInfo) ProtoMessage() {}
func (*GroupInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{0}
return fileDescriptor_ws_e4200fdb78b83da6, []int{0}
}
func (m *GroupInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupInfo.Unmarshal(m, b)
@@ -165,7 +165,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} }
func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) }
func (*GroupMemberFullInfo) ProtoMessage() {}
func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{1}
return fileDescriptor_ws_e4200fdb78b83da6, []int{1}
}
func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b)
@@ -277,7 +277,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} }
func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) }
func (*PublicUserInfo) ProtoMessage() {}
func (*PublicUserInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{2}
return fileDescriptor_ws_e4200fdb78b83da6, []int{2}
}
func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b)
@@ -352,7 +352,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} }
func (m *UserInfo) String() string { return proto.CompactTextString(m) }
func (*UserInfo) ProtoMessage() {}
func (*UserInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{3}
return fileDescriptor_ws_e4200fdb78b83da6, []int{3}
}
func (m *UserInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UserInfo.Unmarshal(m, b)
@@ -459,7 +459,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} }
func (m *FriendInfo) String() string { return proto.CompactTextString(m) }
func (*FriendInfo) ProtoMessage() {}
func (*FriendInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{4}
return fileDescriptor_ws_e4200fdb78b83da6, []int{4}
}
func (m *FriendInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendInfo.Unmarshal(m, b)
@@ -544,7 +544,7 @@ func (m *BlackInfo) Reset() { *m = BlackInfo{} }
func (m *BlackInfo) String() string { return proto.CompactTextString(m) }
func (*BlackInfo) ProtoMessage() {}
func (*BlackInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{5}
return fileDescriptor_ws_e4200fdb78b83da6, []int{5}
}
func (m *BlackInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BlackInfo.Unmarshal(m, b)
@@ -625,7 +625,7 @@ func (m *GroupRequest) Reset() { *m = GroupRequest{} }
func (m *GroupRequest) String() string { return proto.CompactTextString(m) }
func (*GroupRequest) ProtoMessage() {}
func (*GroupRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{6}
return fileDescriptor_ws_e4200fdb78b83da6, []int{6}
}
func (m *GroupRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupRequest.Unmarshal(m, b)
@@ -733,7 +733,7 @@ func (m *FriendRequest) Reset() { *m = FriendRequest{} }
func (m *FriendRequest) String() string { return proto.CompactTextString(m) }
func (*FriendRequest) ProtoMessage() {}
func (*FriendRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{7}
return fileDescriptor_ws_e4200fdb78b83da6, []int{7}
}
func (m *FriendRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendRequest.Unmarshal(m, b)
@@ -878,7 +878,7 @@ func (m *Department) Reset() { *m = Department{} }
func (m *Department) String() string { return proto.CompactTextString(m) }
func (*Department) ProtoMessage() {}
func (*Department) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{8}
return fileDescriptor_ws_e4200fdb78b83da6, []int{8}
}
func (m *Department) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Department.Unmarshal(m, b)
@@ -989,7 +989,7 @@ func (m *OrganizationUser) Reset() { *m = OrganizationUser{} }
func (m *OrganizationUser) String() string { return proto.CompactTextString(m) }
func (*OrganizationUser) ProtoMessage() {}
func (*OrganizationUser) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{9}
return fileDescriptor_ws_e4200fdb78b83da6, []int{9}
}
func (m *OrganizationUser) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OrganizationUser.Unmarshal(m, b)
@@ -1103,7 +1103,7 @@ func (m *DepartmentMember) Reset() { *m = DepartmentMember{} }
func (m *DepartmentMember) String() string { return proto.CompactTextString(m) }
func (*DepartmentMember) ProtoMessage() {}
func (*DepartmentMember) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{10}
return fileDescriptor_ws_e4200fdb78b83da6, []int{10}
}
func (m *DepartmentMember) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DepartmentMember.Unmarshal(m, b)
@@ -1184,7 +1184,7 @@ func (m *UserDepartmentMember) Reset() { *m = UserDepartmentMember{} }
func (m *UserDepartmentMember) String() string { return proto.CompactTextString(m) }
func (*UserDepartmentMember) ProtoMessage() {}
func (*UserDepartmentMember) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{11}
return fileDescriptor_ws_e4200fdb78b83da6, []int{11}
}
func (m *UserDepartmentMember) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UserDepartmentMember.Unmarshal(m, b)
@@ -1230,7 +1230,7 @@ func (m *UserInDepartment) Reset() { *m = UserInDepartment{} }
func (m *UserInDepartment) String() string { return proto.CompactTextString(m) }
func (*UserInDepartment) ProtoMessage() {}
func (*UserInDepartment) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{12}
return fileDescriptor_ws_e4200fdb78b83da6, []int{12}
}
func (m *UserInDepartment) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UserInDepartment.Unmarshal(m, b)
@@ -1277,7 +1277,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe
func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) }
func (*PullMessageBySeqListResp) ProtoMessage() {}
func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{13}
return fileDescriptor_ws_e4200fdb78b83da6, []int{13}
}
func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b)
@@ -1331,7 +1331,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq
func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) }
func (*PullMessageBySeqListReq) ProtoMessage() {}
func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{14}
return fileDescriptor_ws_e4200fdb78b83da6, []int{14}
}
func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b)
@@ -1382,7 +1382,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} }
func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) }
func (*GetMaxAndMinSeqReq) ProtoMessage() {}
func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{15}
return fileDescriptor_ws_e4200fdb78b83da6, []int{15}
}
func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b)
@@ -1414,7 +1414,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} }
func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) }
func (*GetMaxAndMinSeqResp) ProtoMessage() {}
func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{16}
return fileDescriptor_ws_e4200fdb78b83da6, []int{16}
}
func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b)
@@ -1461,7 +1461,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} }
func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) }
func (*UserSendMsgResp) ProtoMessage() {}
func (*UserSendMsgResp) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{17}
return fileDescriptor_ws_e4200fdb78b83da6, []int{17}
}
func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b)
@@ -1518,10 +1518,10 @@ type MsgData struct {
Seq uint32 `protobuf:"varint,14,opt,name=seq" json:"seq,omitempty"`
SendTime int64 `protobuf:"varint,15,opt,name=sendTime" json:"sendTime,omitempty"`
CreateTime int64 `protobuf:"varint,16,opt,name=createTime" json:"createTime,omitempty"`
Status int32 `protobuf:"varint,17,opt,name=status" json:"status,omitempty"`
Options map[string]bool `protobuf:"bytes,18,rep,name=options" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
OfflinePushInfo *OfflinePushInfo `protobuf:"bytes,19,opt,name=offlinePushInfo" json:"offlinePushInfo,omitempty"`
AtUserIDList []string `protobuf:"bytes,20,rep,name=atUserIDList" json:"atUserIDList,omitempty"`
AtUserIDList []string `protobuf:"bytes,17,rep,name=atUserIDList" json:"atUserIDList,omitempty"`
Status int32 `protobuf:"varint,18,opt,name=status" json:"status,omitempty"`
Options map[string]bool `protobuf:"bytes,19,rep,name=options" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
OfflinePushInfo *OfflinePushInfo `protobuf:"bytes,20,opt,name=offlinePushInfo" json:"offlinePushInfo,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -1531,7 +1531,7 @@ func (m *MsgData) Reset() { *m = MsgData{} }
func (m *MsgData) String() string { return proto.CompactTextString(m) }
func (*MsgData) ProtoMessage() {}
func (*MsgData) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{18}
return fileDescriptor_ws_e4200fdb78b83da6, []int{18}
}
func (m *MsgData) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MsgData.Unmarshal(m, b)
@@ -1656,6 +1656,13 @@ func (m *MsgData) GetCreateTime() int64 {
return 0
}
func (m *MsgData) GetAtUserIDList() []string {
if m != nil {
return m.AtUserIDList
}
return nil
}
func (m *MsgData) GetStatus() int32 {
if m != nil {
return m.Status
@@ -1677,13 +1684,6 @@ func (m *MsgData) GetOfflinePushInfo() *OfflinePushInfo {
return nil
}
func (m *MsgData) GetAtUserIDList() []string {
if m != nil {
return m.AtUserIDList
}
return nil
}
type OfflinePushInfo struct {
Title string `protobuf:"bytes,1,opt,name=title" json:"title,omitempty"`
Desc string `protobuf:"bytes,2,opt,name=desc" json:"desc,omitempty"`
@@ -1699,7 +1699,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} }
func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) }
func (*OfflinePushInfo) ProtoMessage() {}
func (*OfflinePushInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{19}
return fileDescriptor_ws_e4200fdb78b83da6, []int{19}
}
func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b)
@@ -1767,7 +1767,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} }
func (m *TipsComm) String() string { return proto.CompactTextString(m) }
func (*TipsComm) ProtoMessage() {}
func (*TipsComm) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{20}
return fileDescriptor_ws_e4200fdb78b83da6, []int{20}
}
func (m *TipsComm) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TipsComm.Unmarshal(m, b)
@@ -1824,7 +1824,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} }
func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) }
func (*GroupCreatedTips) ProtoMessage() {}
func (*GroupCreatedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{21}
return fileDescriptor_ws_e4200fdb78b83da6, []int{21}
}
func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b)
@@ -1893,7 +1893,7 @@ func (m *GroupInfoSetTips) Reset() { *m = GroupInfoSetTips{} }
func (m *GroupInfoSetTips) String() string { return proto.CompactTextString(m) }
func (*GroupInfoSetTips) ProtoMessage() {}
func (*GroupInfoSetTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{22}
return fileDescriptor_ws_e4200fdb78b83da6, []int{22}
}
func (m *GroupInfoSetTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupInfoSetTips.Unmarshal(m, b)
@@ -1948,7 +1948,7 @@ func (m *JoinGroupApplicationTips) Reset() { *m = JoinGroupApplicationTi
func (m *JoinGroupApplicationTips) String() string { return proto.CompactTextString(m) }
func (*JoinGroupApplicationTips) ProtoMessage() {}
func (*JoinGroupApplicationTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{23}
return fileDescriptor_ws_e4200fdb78b83da6, []int{23}
}
func (m *JoinGroupApplicationTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_JoinGroupApplicationTips.Unmarshal(m, b)
@@ -2004,7 +2004,7 @@ func (m *MemberQuitTips) Reset() { *m = MemberQuitTips{} }
func (m *MemberQuitTips) String() string { return proto.CompactTextString(m) }
func (*MemberQuitTips) ProtoMessage() {}
func (*MemberQuitTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{24}
return fileDescriptor_ws_e4200fdb78b83da6, []int{24}
}
func (m *MemberQuitTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MemberQuitTips.Unmarshal(m, b)
@@ -2059,7 +2059,7 @@ func (m *GroupApplicationAcceptedTips) Reset() { *m = GroupApplicationAc
func (m *GroupApplicationAcceptedTips) String() string { return proto.CompactTextString(m) }
func (*GroupApplicationAcceptedTips) ProtoMessage() {}
func (*GroupApplicationAcceptedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{25}
return fileDescriptor_ws_e4200fdb78b83da6, []int{25}
}
func (m *GroupApplicationAcceptedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupApplicationAcceptedTips.Unmarshal(m, b)
@@ -2114,7 +2114,7 @@ func (m *GroupApplicationRejectedTips) Reset() { *m = GroupApplicationRe
func (m *GroupApplicationRejectedTips) String() string { return proto.CompactTextString(m) }
func (*GroupApplicationRejectedTips) ProtoMessage() {}
func (*GroupApplicationRejectedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{26}
return fileDescriptor_ws_e4200fdb78b83da6, []int{26}
}
func (m *GroupApplicationRejectedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupApplicationRejectedTips.Unmarshal(m, b)
@@ -2170,7 +2170,7 @@ func (m *GroupOwnerTransferredTips) Reset() { *m = GroupOwnerTransferred
func (m *GroupOwnerTransferredTips) String() string { return proto.CompactTextString(m) }
func (*GroupOwnerTransferredTips) ProtoMessage() {}
func (*GroupOwnerTransferredTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{27}
return fileDescriptor_ws_e4200fdb78b83da6, []int{27}
}
func (m *GroupOwnerTransferredTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupOwnerTransferredTips.Unmarshal(m, b)
@@ -2233,7 +2233,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} }
func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) }
func (*MemberKickedTips) ProtoMessage() {}
func (*MemberKickedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{28}
return fileDescriptor_ws_e4200fdb78b83da6, []int{28}
}
func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b)
@@ -2296,7 +2296,7 @@ func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} }
func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) }
func (*MemberInvitedTips) ProtoMessage() {}
func (*MemberInvitedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{29}
return fileDescriptor_ws_e4200fdb78b83da6, []int{29}
}
func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b)
@@ -2358,7 +2358,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} }
func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) }
func (*MemberEnterTips) ProtoMessage() {}
func (*MemberEnterTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{30}
return fileDescriptor_ws_e4200fdb78b83da6, []int{30}
}
func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b)
@@ -2412,7 +2412,7 @@ func (m *GroupDismissedTips) Reset() { *m = GroupDismissedTips{} }
func (m *GroupDismissedTips) String() string { return proto.CompactTextString(m) }
func (*GroupDismissedTips) ProtoMessage() {}
func (*GroupDismissedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{31}
return fileDescriptor_ws_e4200fdb78b83da6, []int{31}
}
func (m *GroupDismissedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupDismissedTips.Unmarshal(m, b)
@@ -2468,7 +2468,7 @@ func (m *GroupMemberMutedTips) Reset() { *m = GroupMemberMutedTips{} }
func (m *GroupMemberMutedTips) String() string { return proto.CompactTextString(m) }
func (*GroupMemberMutedTips) ProtoMessage() {}
func (*GroupMemberMutedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{32}
return fileDescriptor_ws_e4200fdb78b83da6, []int{32}
}
func (m *GroupMemberMutedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupMemberMutedTips.Unmarshal(m, b)
@@ -2537,7 +2537,7 @@ func (m *GroupMemberCancelMutedTips) Reset() { *m = GroupMemberCancelMut
func (m *GroupMemberCancelMutedTips) String() string { return proto.CompactTextString(m) }
func (*GroupMemberCancelMutedTips) ProtoMessage() {}
func (*GroupMemberCancelMutedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{33}
return fileDescriptor_ws_e4200fdb78b83da6, []int{33}
}
func (m *GroupMemberCancelMutedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupMemberCancelMutedTips.Unmarshal(m, b)
@@ -2598,7 +2598,7 @@ func (m *GroupMutedTips) Reset() { *m = GroupMutedTips{} }
func (m *GroupMutedTips) String() string { return proto.CompactTextString(m) }
func (*GroupMutedTips) ProtoMessage() {}
func (*GroupMutedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{34}
return fileDescriptor_ws_e4200fdb78b83da6, []int{34}
}
func (m *GroupMutedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupMutedTips.Unmarshal(m, b)
@@ -2652,7 +2652,7 @@ func (m *GroupCancelMutedTips) Reset() { *m = GroupCancelMutedTips{} }
func (m *GroupCancelMutedTips) String() string { return proto.CompactTextString(m) }
func (*GroupCancelMutedTips) ProtoMessage() {}
func (*GroupCancelMutedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{35}
return fileDescriptor_ws_e4200fdb78b83da6, []int{35}
}
func (m *GroupCancelMutedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupCancelMutedTips.Unmarshal(m, b)
@@ -2707,7 +2707,7 @@ func (m *GroupMemberInfoSetTips) Reset() { *m = GroupMemberInfoSetTips{}
func (m *GroupMemberInfoSetTips) String() string { return proto.CompactTextString(m) }
func (*GroupMemberInfoSetTips) ProtoMessage() {}
func (*GroupMemberInfoSetTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{36}
return fileDescriptor_ws_e4200fdb78b83da6, []int{36}
}
func (m *GroupMemberInfoSetTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupMemberInfoSetTips.Unmarshal(m, b)
@@ -2767,7 +2767,7 @@ func (m *OrganizationChangedTips) Reset() { *m = OrganizationChangedTips
func (m *OrganizationChangedTips) String() string { return proto.CompactTextString(m) }
func (*OrganizationChangedTips) ProtoMessage() {}
func (*OrganizationChangedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{37}
return fileDescriptor_ws_e4200fdb78b83da6, []int{37}
}
func (m *OrganizationChangedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OrganizationChangedTips.Unmarshal(m, b)
@@ -2814,7 +2814,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} }
func (m *FriendApplication) String() string { return proto.CompactTextString(m) }
func (*FriendApplication) ProtoMessage() {}
func (*FriendApplication) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{38}
return fileDescriptor_ws_e4200fdb78b83da6, []int{38}
}
func (m *FriendApplication) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendApplication.Unmarshal(m, b)
@@ -2867,7 +2867,7 @@ func (m *FromToUserID) Reset() { *m = FromToUserID{} }
func (m *FromToUserID) String() string { return proto.CompactTextString(m) }
func (*FromToUserID) ProtoMessage() {}
func (*FromToUserID) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{39}
return fileDescriptor_ws_e4200fdb78b83da6, []int{39}
}
func (m *FromToUserID) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FromToUserID.Unmarshal(m, b)
@@ -2913,7 +2913,7 @@ func (m *FriendApplicationTips) Reset() { *m = FriendApplicationTips{} }
func (m *FriendApplicationTips) String() string { return proto.CompactTextString(m) }
func (*FriendApplicationTips) ProtoMessage() {}
func (*FriendApplicationTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{40}
return fileDescriptor_ws_e4200fdb78b83da6, []int{40}
}
func (m *FriendApplicationTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendApplicationTips.Unmarshal(m, b)
@@ -2953,7 +2953,7 @@ func (m *FriendApplicationApprovedTips) Reset() { *m = FriendApplication
func (m *FriendApplicationApprovedTips) String() string { return proto.CompactTextString(m) }
func (*FriendApplicationApprovedTips) ProtoMessage() {}
func (*FriendApplicationApprovedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{41}
return fileDescriptor_ws_e4200fdb78b83da6, []int{41}
}
func (m *FriendApplicationApprovedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendApplicationApprovedTips.Unmarshal(m, b)
@@ -3000,7 +3000,7 @@ func (m *FriendApplicationRejectedTips) Reset() { *m = FriendApplication
func (m *FriendApplicationRejectedTips) String() string { return proto.CompactTextString(m) }
func (*FriendApplicationRejectedTips) ProtoMessage() {}
func (*FriendApplicationRejectedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{42}
return fileDescriptor_ws_e4200fdb78b83da6, []int{42}
}
func (m *FriendApplicationRejectedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendApplicationRejectedTips.Unmarshal(m, b)
@@ -3048,7 +3048,7 @@ func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} }
func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) }
func (*FriendAddedTips) ProtoMessage() {}
func (*FriendAddedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{43}
return fileDescriptor_ws_e4200fdb78b83da6, []int{43}
}
func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b)
@@ -3101,7 +3101,7 @@ func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} }
func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) }
func (*FriendDeletedTips) ProtoMessage() {}
func (*FriendDeletedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{44}
return fileDescriptor_ws_e4200fdb78b83da6, []int{44}
}
func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b)
@@ -3139,7 +3139,7 @@ func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} }
func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) }
func (*BlackAddedTips) ProtoMessage() {}
func (*BlackAddedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{45}
return fileDescriptor_ws_e4200fdb78b83da6, []int{45}
}
func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b)
@@ -3177,7 +3177,7 @@ func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} }
func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) }
func (*BlackDeletedTips) ProtoMessage() {}
func (*BlackDeletedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{46}
return fileDescriptor_ws_e4200fdb78b83da6, []int{46}
}
func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b)
@@ -3215,7 +3215,7 @@ func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} }
func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) }
func (*FriendInfoChangedTips) ProtoMessage() {}
func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{47}
return fileDescriptor_ws_e4200fdb78b83da6, []int{47}
}
func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b)
@@ -3254,7 +3254,7 @@ func (m *UserInfoUpdatedTips) Reset() { *m = UserInfoUpdatedTips{} }
func (m *UserInfoUpdatedTips) String() string { return proto.CompactTextString(m) }
func (*UserInfoUpdatedTips) ProtoMessage() {}
func (*UserInfoUpdatedTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{48}
return fileDescriptor_ws_e4200fdb78b83da6, []int{48}
}
func (m *UserInfoUpdatedTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UserInfoUpdatedTips.Unmarshal(m, b)
@@ -3293,7 +3293,7 @@ func (m *ConversationUpdateTips) Reset() { *m = ConversationUpdateTips{}
func (m *ConversationUpdateTips) String() string { return proto.CompactTextString(m) }
func (*ConversationUpdateTips) ProtoMessage() {}
func (*ConversationUpdateTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{49}
return fileDescriptor_ws_e4200fdb78b83da6, []int{49}
}
func (m *ConversationUpdateTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ConversationUpdateTips.Unmarshal(m, b)
@@ -3333,7 +3333,7 @@ func (m *ConversationSetPrivateTips) Reset() { *m = ConversationSetPriva
func (m *ConversationSetPrivateTips) String() string { return proto.CompactTextString(m) }
func (*ConversationSetPrivateTips) ProtoMessage() {}
func (*ConversationSetPrivateTips) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{50}
return fileDescriptor_ws_e4200fdb78b83da6, []int{50}
}
func (m *ConversationSetPrivateTips) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ConversationSetPrivateTips.Unmarshal(m, b)
@@ -3387,7 +3387,7 @@ func (m *RequestPagination) Reset() { *m = RequestPagination{} }
func (m *RequestPagination) String() string { return proto.CompactTextString(m) }
func (*RequestPagination) ProtoMessage() {}
func (*RequestPagination) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{51}
return fileDescriptor_ws_e4200fdb78b83da6, []int{51}
}
func (m *RequestPagination) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RequestPagination.Unmarshal(m, b)
@@ -3433,7 +3433,7 @@ func (m *ResponsePagination) Reset() { *m = ResponsePagination{} }
func (m *ResponsePagination) String() string { return proto.CompactTextString(m) }
func (*ResponsePagination) ProtoMessage() {}
func (*ResponsePagination) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{52}
return fileDescriptor_ws_e4200fdb78b83da6, []int{52}
}
func (m *ResponsePagination) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ResponsePagination.Unmarshal(m, b)
@@ -3486,7 +3486,7 @@ func (m *SignalReq) Reset() { *m = SignalReq{} }
func (m *SignalReq) String() string { return proto.CompactTextString(m) }
func (*SignalReq) ProtoMessage() {}
func (*SignalReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{53}
return fileDescriptor_ws_e4200fdb78b83da6, []int{53}
}
func (m *SignalReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalReq.Unmarshal(m, b)
@@ -3753,7 +3753,7 @@ func (m *SignalResp) Reset() { *m = SignalResp{} }
func (m *SignalResp) String() string { return proto.CompactTextString(m) }
func (*SignalResp) ProtoMessage() {}
func (*SignalResp) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{54}
return fileDescriptor_ws_e4200fdb78b83da6, []int{54}
}
func (m *SignalResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalResp.Unmarshal(m, b)
@@ -4021,7 +4021,7 @@ func (m *InvitationInfo) Reset() { *m = InvitationInfo{} }
func (m *InvitationInfo) String() string { return proto.CompactTextString(m) }
func (*InvitationInfo) ProtoMessage() {}
func (*InvitationInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{55}
return fileDescriptor_ws_e4200fdb78b83da6, []int{55}
}
func (m *InvitationInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InvitationInfo.Unmarshal(m, b)
@@ -4117,7 +4117,7 @@ func (m *ParticipantMetaData) Reset() { *m = ParticipantMetaData{} }
func (m *ParticipantMetaData) String() string { return proto.CompactTextString(m) }
func (*ParticipantMetaData) ProtoMessage() {}
func (*ParticipantMetaData) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{56}
return fileDescriptor_ws_e4200fdb78b83da6, []int{56}
}
func (m *ParticipantMetaData) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ParticipantMetaData.Unmarshal(m, b)
@@ -4172,7 +4172,7 @@ func (m *SignalInviteReq) Reset() { *m = SignalInviteReq{} }
func (m *SignalInviteReq) String() string { return proto.CompactTextString(m) }
func (*SignalInviteReq) ProtoMessage() {}
func (*SignalInviteReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{57}
return fileDescriptor_ws_e4200fdb78b83da6, []int{57}
}
func (m *SignalInviteReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalInviteReq.Unmarshal(m, b)
@@ -4233,7 +4233,7 @@ func (m *SignalInviteReply) Reset() { *m = SignalInviteReply{} }
func (m *SignalInviteReply) String() string { return proto.CompactTextString(m) }
func (*SignalInviteReply) ProtoMessage() {}
func (*SignalInviteReply) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{58}
return fileDescriptor_ws_e4200fdb78b83da6, []int{58}
}
func (m *SignalInviteReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalInviteReply.Unmarshal(m, b)
@@ -4288,7 +4288,7 @@ func (m *SignalInviteInGroupReq) Reset() { *m = SignalInviteInGroupReq{}
func (m *SignalInviteInGroupReq) String() string { return proto.CompactTextString(m) }
func (*SignalInviteInGroupReq) ProtoMessage() {}
func (*SignalInviteInGroupReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{59}
return fileDescriptor_ws_e4200fdb78b83da6, []int{59}
}
func (m *SignalInviteInGroupReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalInviteInGroupReq.Unmarshal(m, b)
@@ -4349,7 +4349,7 @@ func (m *SignalInviteInGroupReply) Reset() { *m = SignalInviteInGroupRep
func (m *SignalInviteInGroupReply) String() string { return proto.CompactTextString(m) }
func (*SignalInviteInGroupReply) ProtoMessage() {}
func (*SignalInviteInGroupReply) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{60}
return fileDescriptor_ws_e4200fdb78b83da6, []int{60}
}
func (m *SignalInviteInGroupReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalInviteInGroupReply.Unmarshal(m, b)
@@ -4404,7 +4404,7 @@ func (m *SignalCancelReq) Reset() { *m = SignalCancelReq{} }
func (m *SignalCancelReq) String() string { return proto.CompactTextString(m) }
func (*SignalCancelReq) ProtoMessage() {}
func (*SignalCancelReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{61}
return fileDescriptor_ws_e4200fdb78b83da6, []int{61}
}
func (m *SignalCancelReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalCancelReq.Unmarshal(m, b)
@@ -4462,7 +4462,7 @@ func (m *SignalCancelReply) Reset() { *m = SignalCancelReply{} }
func (m *SignalCancelReply) String() string { return proto.CompactTextString(m) }
func (*SignalCancelReply) ProtoMessage() {}
func (*SignalCancelReply) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{62}
return fileDescriptor_ws_e4200fdb78b83da6, []int{62}
}
func (m *SignalCancelReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalCancelReply.Unmarshal(m, b)
@@ -4497,7 +4497,7 @@ func (m *SignalAcceptReq) Reset() { *m = SignalAcceptReq{} }
func (m *SignalAcceptReq) String() string { return proto.CompactTextString(m) }
func (*SignalAcceptReq) ProtoMessage() {}
func (*SignalAcceptReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{63}
return fileDescriptor_ws_e4200fdb78b83da6, []int{63}
}
func (m *SignalAcceptReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalAcceptReq.Unmarshal(m, b)
@@ -4565,7 +4565,7 @@ func (m *SignalAcceptReply) Reset() { *m = SignalAcceptReply{} }
func (m *SignalAcceptReply) String() string { return proto.CompactTextString(m) }
func (*SignalAcceptReply) ProtoMessage() {}
func (*SignalAcceptReply) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{64}
return fileDescriptor_ws_e4200fdb78b83da6, []int{64}
}
func (m *SignalAcceptReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalAcceptReply.Unmarshal(m, b)
@@ -4619,7 +4619,7 @@ func (m *SignalHungUpReq) Reset() { *m = SignalHungUpReq{} }
func (m *SignalHungUpReq) String() string { return proto.CompactTextString(m) }
func (*SignalHungUpReq) ProtoMessage() {}
func (*SignalHungUpReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{65}
return fileDescriptor_ws_e4200fdb78b83da6, []int{65}
}
func (m *SignalHungUpReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalHungUpReq.Unmarshal(m, b)
@@ -4670,7 +4670,7 @@ func (m *SignalHungUpReply) Reset() { *m = SignalHungUpReply{} }
func (m *SignalHungUpReply) String() string { return proto.CompactTextString(m) }
func (*SignalHungUpReply) ProtoMessage() {}
func (*SignalHungUpReply) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{66}
return fileDescriptor_ws_e4200fdb78b83da6, []int{66}
}
func (m *SignalHungUpReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalHungUpReply.Unmarshal(m, b)
@@ -4705,7 +4705,7 @@ func (m *SignalRejectReq) Reset() { *m = SignalRejectReq{} }
func (m *SignalRejectReq) String() string { return proto.CompactTextString(m) }
func (*SignalRejectReq) ProtoMessage() {}
func (*SignalRejectReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{67}
return fileDescriptor_ws_e4200fdb78b83da6, []int{67}
}
func (m *SignalRejectReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalRejectReq.Unmarshal(m, b)
@@ -4770,7 +4770,7 @@ func (m *SignalRejectReply) Reset() { *m = SignalRejectReply{} }
func (m *SignalRejectReply) String() string { return proto.CompactTextString(m) }
func (*SignalRejectReply) ProtoMessage() {}
func (*SignalRejectReply) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{68}
return fileDescriptor_ws_e4200fdb78b83da6, []int{68}
}
func (m *SignalRejectReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalRejectReply.Unmarshal(m, b)
@@ -4804,7 +4804,7 @@ func (m *DelMsgListReq) Reset() { *m = DelMsgListReq{} }
func (m *DelMsgListReq) String() string { return proto.CompactTextString(m) }
func (*DelMsgListReq) ProtoMessage() {}
func (*DelMsgListReq) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{69}
return fileDescriptor_ws_e4200fdb78b83da6, []int{69}
}
func (m *DelMsgListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DelMsgListReq.Unmarshal(m, b)
@@ -4864,7 +4864,7 @@ func (m *DelMsgListResp) Reset() { *m = DelMsgListResp{} }
func (m *DelMsgListResp) String() string { return proto.CompactTextString(m) }
func (*DelMsgListResp) ProtoMessage() {}
func (*DelMsgListResp) Descriptor() ([]byte, []int) {
return fileDescriptor_ws_8b0ea2633e539530, []int{70}
return fileDescriptor_ws_e4200fdb78b83da6, []int{70}
}
func (m *DelMsgListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DelMsgListResp.Unmarshal(m, b)
@@ -4973,9 +4973,9 @@ func init() {
proto.RegisterType((*DelMsgListResp)(nil), "server_api_params.DelMsgListResp")
}
func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_8b0ea2633e539530) }
func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_e4200fdb78b83da6) }
var fileDescriptor_ws_8b0ea2633e539530 = []byte{
var fileDescriptor_ws_e4200fdb78b83da6 = []byte{
// 3049 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0xcb, 0x6f, 0x24, 0x49,
0xd1, 0xff, 0xaa, 0xda, 0xdd, 0x76, 0x47, 0xbb, 0xfd, 0xa8, 0x99, 0xcf, 0xdb, 0x98, 0xd9, 0xc1,
@@ -5070,102 +5070,102 @@ var fileDescriptor_ws_8b0ea2633e539530 = []byte{
0x72, 0x1b, 0x16, 0x10, 0x2a, 0x8b, 0x8f, 0x3c, 0x4c, 0x86, 0x37, 0x62, 0x16, 0xca, 0x1d, 0x4d,
0x4e, 0x8a, 0x91, 0x33, 0x9a, 0xe6, 0x79, 0xb1, 0x83, 0xb2, 0x0a, 0x8b, 0xcb, 0x4a, 0x52, 0x54,
0x0f, 0x8b, 0x4e, 0x4e, 0x5a, 0x2b, 0xd0, 0x48, 0xc8, 0x48, 0x96, 0x04, 0xfc, 0xa7, 0xe6, 0xb9,
0x65, 0xdd, 0x73, 0x95, 0x35, 0x7e, 0x45, 0x7c, 0x55, 0xd7, 0xf8, 0x72, 0xe1, 0x5c, 0xd5, 0x16,
0xce, 0x6b, 0x30, 0xcf, 0x22, 0x1e, 0xe7, 0x49, 0xcf, 0x12, 0x73, 0xec, 0x93, 0x93, 0xe7, 0xd8,
0x95, 0xbb, 0xd8, 0xf2, 0x3a, 0x4d, 0xe3, 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, 0xbe, 0x90, 0x47, 0xb7, 0x92, 0xea, 0xec, 0xdf, 0x14, 0xf8, 0x14, 0x95, 0xc6, 0x33,
0x8a, 0x8f, 0xf5, 0x12, 0xac, 0xe0, 0x30, 0x95, 0x57, 0x17, 0x58, 0xb8, 0xd6, 0xf8, 0xe5, 0x4a,
0xa1, 0xa4, 0xfd, 0x73, 0x8b, 0xd9, 0x3f, 0x18, 0xb9, 0x4f, 0x8a, 0xfa, 0xed, 0x43, 0xe5, 0x93,
0x32, 0xd2, 0x94, 0xa2, 0x46, 0x89, 0xb4, 0xa2, 0xae, 0xfc, 0x5f, 0xa4, 0x9d, 0x1d, 0x69, 0x05,
0x96, 0x4a, 0x81, 0x67, 0x7f, 0x17, 0xba, 0x3b, 0x24, 0xd8, 0x4d, 0x86, 0xf9, 0x7b, 0xaf, 0xd3,
0x80, 0x9c, 0xf4, 0x77, 0x99, 0x89, 0x2f, 0xbd, 0xaa, 0xaf, 0xc4, 0xe6, 0x6a, 0xaf, 0xc4, 0xec,
0x2d, 0x58, 0x52, 0x0d, 0x98, 0xe5, 0xb9, 0xdb, 0xd6, 0xa5, 0x6f, 0xac, 0x5f, 0x79, 0x19, 0xff,
0x98, 0xf5, 0x7a, 0x0d, 0xc4, 0x83, 0x96, 0xf8, 0xa3, 0xd6, 0xab, 0xff, 0x0d, 0x00, 0x00, 0xff,
0xff, 0x6d, 0x01, 0x85, 0x88, 0xbb, 0x35, 0x00, 0x00,
}

View File

@@ -210,12 +210,12 @@ message MsgData {
uint32 seq = 14;
int64 sendTime = 15;
int64 createTime = 16;
int32 status = 17;
map<string, bool> options = 18;
OfflinePushInfo offlinePushInfo = 19;
repeated string atUserIDList = 20;
repeated string atUserIDList = 17;
int32 status = 18;
map<string, bool> options = 19;
OfflinePushInfo offlinePushInfo = 20;
}
message OfflinePushInfo{
string title = 1;
string desc = 2;

View File

@@ -315,8 +315,4 @@ service user {
rpc GetBlockUsers(GetBlockUsersReq) returns (GetBlockUsersResp);
rpc GetBlockUserById(GetBlockUserByIdReq) returns (GetBlockUserByIdResp);
rpc DeleteUser(DeleteUserReq) returns (DeleteUserResp);
rpc GetUserInfoFromCache(GetUserInfoReq) returns(GetUserInfoResp);
}

View File

@@ -1,10 +1,6 @@
package utils
import (
"bytes"
"encoding/json"
"github.com/gogo/protobuf/jsonpb"
"github.com/golang/protobuf/proto"
"github.com/jinzhu/copier"
"github.com/pkg/errors"
"math/rand"
@@ -135,18 +131,3 @@ func RemoveRepeatedStringInList(slc []string) []string {
}
return result
}
func Pb2Map(pb proto.Message) (map[string]interface{}, error) {
_buffer := bytes.Buffer{}
jsonbMarshaller := &jsonpb.Marshaler{
OrigName: true,
EnumsAsInts: true,
EmitDefaults: true,
}
_ = jsonbMarshaller.Marshal(&_buffer, pb)
jsonCnt := _buffer.Bytes()
var out map[string]interface{}
err := json.Unmarshal(jsonCnt, &out)
return out, err
}

View File

@@ -4,25 +4,23 @@ source ./style_info.cfg
source ./path_info.cfg
source ./function.sh
service_port_name=(
openImWsPort
openImApiPort
openImSdkWsPort
openImDemoPort
openImCmsApiPort
openImApiPort
openImUserPort
openImFriendPort
openImMessagePort
openImMessageGatewayPort
openImOfflineMessagePort
openImOnlineRelayPort
openImGroupPort
openImAuthPort
openImPushPort
openImStatisticsPort
openImMessageCmsPort
openImWsPort
openImSdkWsPort
openImDemoPort
openImAdminCmsPort
openImMessageCmsPort
openImStatisticsPort
openImOfficePort
openImOrganizationPort
openImConversationPort
openImCachePort
)
switch=$(cat $config_path | grep demoswitch |awk -F '[:]' '{print $NF}')
for i in ${service_port_name[*]}; do

View File

@@ -5,7 +5,7 @@ source ./path_info.cfg
source ./function.sh
ulimit -n 200000
list1=$(cat $config_path | grep openImMessageGatewayPort | awk -F '[:]' '{print $NF}')
list1=$(cat $config_path | grep openImOnlineRelayPort | awk -F '[:]' '{print $NF}')
list2=$(cat $config_path | grep openImWsPort | awk -F '[:]' '{print $NF}')
list_to_string $list1
rpc_ports=($ports_array)

View File

@@ -50,8 +50,6 @@ service_source_root=(
../cmd/rpc/open_im_statistics/
../cmd/rpc/open_im_office/
../cmd/rpc/open_im_organization/
../cmd/rpc/open_im_conversation/
../cmd/rpc/open_im_cache/
${msg_gateway_source_root}
${msg_transfer_source_root}
${msg_source_root}
@@ -73,9 +71,7 @@ service_names=(
open_im_message_cms
open_im_statistics
open_im_office
open_im_organization
open_im_conversation
open_im_cache
open_im_organization
${msg_gateway_name}
${msg_transfer_name}
${msg_name}

View File

@@ -3,7 +3,6 @@
source ./style_info.cfg
source ./path_info.cfg
source ./function.sh
ulimit -n 200000
list1=$(cat $config_path | grep openImApiPort | awk -F '[:]' '{print $NF}')
list2=$(cat $config_path | grep openImWsPort | awk -F '[:]' '{print $NF}')
list3=$(cat $config_path | grep openImSdkWsPort | awk -F '[:]' '{print $NF}')

View File

@@ -20,8 +20,6 @@ service_filename=(
${msg_name}
open_im_office
open_im_organization
open_im_conversation
open_im_cache
)
#service config port name
@@ -37,11 +35,9 @@ service_port_name=(
openImAdminCmsPort
openImMessageCmsPort
openImStatisticsPort
openImMessagePort
openImOfflineMessagePort
openImOfficePort
openImOrganizationPort
openImConversationPort
openImCachePort
)
for ((i = 0; i < ${#service_filename[*]}; i++)); do