From 3d4e0a0479d9c31c1d43f88d1ac864f94b357c1c Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Sun, 26 Dec 2021 18:47:11 +0800 Subject: [PATCH] tidy code --- go.mod | 1 + go.sum | 10 +- internal/api/friend/friend.go | 374 +--- internal/api/group/group.go | 825 +++---- internal/demo/register/login.go | 2 +- internal/demo/register/set_password.go | 2 +- internal/rpc/friend/firend.go | 272 ++- internal/rpc/group/group.go | 85 +- pkg/base_info/friend_api_struct.go | 155 ++ pkg/base_info/group_api_struct.go | 153 ++ pkg/base_info/public_struct.go | 95 + pkg/common/constant/error.go | 93 +- .../im_mysql_model/friend_model.go | 36 +- .../im_mysql_model/friend_request_model.go | 44 +- .../im_mysql_model/group_member_model.go | 182 +- .../mysql_model/im_mysql_model/group_model.go | 15 +- .../im_mysql_model/model_struct.go | 119 +- pkg/proto/base/base.proto | 5 + pkg/proto/friend/friend.pb.go | 912 ++++---- pkg/proto/friend/friend.proto | 105 +- pkg/proto/group/group.pb.go | 808 +++---- pkg/proto/group/group.proto | 102 +- pkg/proto/sdk_ws/ws.pb.go | 1973 ++++++++++------- pkg/proto/sdk_ws/ws.proto | 212 +- 24 files changed, 3470 insertions(+), 3110 deletions(-) create mode 100644 pkg/base_info/friend_api_struct.go create mode 100644 pkg/base_info/group_api_struct.go create mode 100644 pkg/base_info/public_struct.go create mode 100644 pkg/proto/base/base.proto diff --git a/go.mod b/go.mod index e86107f08..663b8e84c 100644 --- a/go.mod +++ b/go.mod @@ -47,6 +47,7 @@ require ( gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b + gorm.io/driver/mysql v1.2.2 sigs.k8s.io/yaml v1.2.0 // indirect ) diff --git a/go.sum b/go.sum index 7a4dc5ae5..3a6600edb 100644 --- a/go.sum +++ b/go.sum @@ -151,8 +151,9 @@ github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD87 github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= -github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= +github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -282,8 +283,9 @@ github.com/jinzhu/gorm v1.9.16 h1:+IyIjPEABKRpsu/F8OvDPy9fyQlgsg2luMV2ZIH5i5o= github.com/jinzhu/gorm v1.9.16/go.mod h1:G3LB3wezTOWM2ITLzPxEXgSkOXAntiLHS7UdBefADcs= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= -github.com/jinzhu/now v1.0.1 h1:HjfetcXq097iXP0uoPCdnM4Efp5/9MsM0/M+XOTeR3M= github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/jinzhu/now v1.1.3 h1:PlHq1bSCSZL9K0wUhbm2pGLoTWs2GwVhsP6emvGV/ZI= +github.com/jinzhu/now v1.1.3/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -876,6 +878,10 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gorm.io/driver/mysql v1.2.2 h1:2qoqhOun1maoJOfLtnzJwq+bZlHkEF34rGntgySqp48= +gorm.io/driver/mysql v1.2.2/go.mod h1:qsiz+XcAyMrS6QY+X3M9R6b/lKM1imKmcuK9kac5LTo= +gorm.io/gorm v1.22.4 h1:8aPcyEJhY0MAt8aY6Dc524Pn+pO29K+ydu+e/cXSpQM= +gorm.io/gorm v1.22.4/go.mod h1:1aeVC+pe9ZmvKZban/gW4QPra7PRoTEssyc922qCAkk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index 1bd0fa6fa..2c9f44bf7 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -1,11 +1,12 @@ package friend import ( + api "Open_IM/pkg/base_info" "Open_IM/pkg/common/config" "Open_IM/pkg/common/log" "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbFriend "Open_IM/pkg/proto/friend" + rpc "Open_IM/pkg/proto/friend" "Open_IM/pkg/utils" "context" "github.com/gin-gonic/gin" @@ -13,20 +14,14 @@ import ( "strings" ) -type paramsCommFriend struct { - OperationID string `json:"operationID" binding:"required"` - ToUserID string `json:"toUserID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` -} - func AddBlacklist(c *gin.Context) { - params := paramsCommFriend{} + params := api.AddBlacklistReq{} if err := c.BindJSON(¶ms); err != nil { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) log.NewError("0", "BindJSON failed ", err.Error()) return } - req := &pbFriend.AddBlacklistReq{} + req := &rpc.AddBlacklistReq{} utils.CopyStructFields(req.CommID, params) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -38,36 +33,26 @@ func AddBlacklist(c *gin.Context) { log.NewInfo(params.OperationID, "AddBlacklist args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) + client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.AddBlacklist(context.Background(), req) if err != nil { log.NewError(req.CommID.OperationID, "AddBlacklist failed ", err.Error()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call add blacklist rpc server failed"}) return } - - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} + resp := api.AddBlacklistResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} c.JSON(http.StatusOK, resp) log.NewInfo(req.CommID.OperationID, "AddBlacklist api return ", resp) } -type paramsImportFriendReq struct { - FriendUserIDList []string `json:"friendUserIDList" binding:"required"` - OperationID string `json:"operationID" binding:"required"` - Token string `json:"token"` - FromUserID string `json:"fromUserID" binding:"required"` - OpUserID string `json:"opUserID" binding:"required"` -} - func ImportFriend(c *gin.Context) { - params := paramsImportFriendReq{} + params := api.ImportFriendReq{} if err := c.BindJSON(¶ms); err != nil { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) log.NewError("0", "BindJSON failed ", err.Error()) return } - - req := &pbFriend.ImportFriendReq{} + req := &rpc.ImportFriendReq{} utils.CopyStructFields(req, params) var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -76,10 +61,10 @@ func ImportFriend(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) return } - log.NewInfo(req.OperationID, "ImportFriend args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) + client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.ImportFriend(context.Background(), req) if err != nil { log.NewError(req.OperationID, "ImportFriend failed", err.Error(), req.String()) @@ -87,28 +72,19 @@ func ImportFriend(c *gin.Context) { return } - failedUidList := make([]string, 0) - for _, v := range RpcResp.FailedUidList { - failedUidList = append(failedUidList, v) - } - resp := gin.H{"errCode": RpcResp.CommonResp.ErrCode, "errMsg": RpcResp.CommonResp.ErrMsg, "failedUidList": failedUidList} + resp := api.ImportFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, Data: RpcResp.FailedFriendUserIDList} c.JSON(http.StatusOK, resp) - log.NewInfo(req.OperationID, "AddBlacklist api return ", resp) -} - -type paramsAddFriend struct { - paramsCommFriend - ReqMessage string `json:"reqMessage"` + log.NewInfo(req.OperationID, "ImportFriend api return ", resp) } func AddFriend(c *gin.Context) { - params := paramsAddFriend{} + params := api.AddFriendReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pbFriend.AddFriendReq{} + req := &rpc.AddFriendReq{} utils.CopyStructFields(req.CommID, params) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -117,11 +93,10 @@ func AddFriend(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) return } - req.ReqMessage = params.ReqMessage log.NewInfo("AddFriend args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) + client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.AddFriend(context.Background(), req) if err != nil { log.NewError(req.CommID.OperationID, "AddFriend failed ", err.Error(), req.String()) @@ -129,24 +104,19 @@ func AddFriend(c *gin.Context) { return } - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} + resp := api.AddFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} c.JSON(http.StatusOK, resp) log.NewInfo(req.CommID.OperationID, "AddFriend api return ", resp) } -type paramsAddFriendResponse struct { - paramsCommFriend - Flag int32 `json:"flag" binding:"required"` -} - func AddFriendResponse(c *gin.Context) { - params := paramsAddFriendResponse{} + params := api.AddFriendResponseReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pbFriend.AddFriendResponseReq{} + req := &rpc.AddFriendResponseReq{} utils.CopyStructFields(req.CommID, params) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -155,11 +125,11 @@ func AddFriendResponse(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) return } - req.Flag = params.Flag - + utils.CopyStructFields(&req, params) log.NewInfo(req.CommID.OperationID, "AddFriendResponse args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) + client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.AddFriendResponse(context.Background(), req) if err != nil { log.NewError(req.CommID.OperationID, "AddFriendResponse failed ", err.Error(), req.String()) @@ -167,23 +137,19 @@ func AddFriendResponse(c *gin.Context) { return } - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} + resp := api.AddFriendResponseResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} c.JSON(http.StatusOK, resp) log.NewInfo(req.CommID.OperationID, "AddFriendResponse api return ", resp) } -type paramsDeleteFriend struct { - paramsCommFriend -} - func DeleteFriend(c *gin.Context) { - params := paramsDeleteFriend{} + params := api.DeleteFriendReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pbFriend.DeleteFriendReq{} + req := &rpc.DeleteFriendReq{} utils.CopyStructFields(req.CommID, params) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -195,7 +161,7 @@ func DeleteFriend(c *gin.Context) { log.NewInfo(req.CommID.OperationID, "DeleteFriend args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) + client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.DeleteFriend(context.Background(), req) if err != nil { log.NewError(req.CommID.OperationID, "DeleteFriend failed ", err, req.String()) @@ -203,34 +169,19 @@ func DeleteFriend(c *gin.Context) { return } - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} + resp := api.DeleteFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} c.JSON(http.StatusOK, resp) - log.NewInfo(req.CommID.OperationID, "AddFriendResponse api return ", resp) -} - -type paramsGetBlackList struct { - paramsCommFriend -} - -type PublicUserInfo struct { - UserID string `json:"userID"` - Nickname string `json:"nickname"` - FaceUrl string `json:"faceUrl"` - Gender int32 `json:"gender"` -} - -type blackUserInfo struct { - PublicUserInfo + log.NewInfo(req.CommID.OperationID, "DeleteFriend api return ", resp) } func GetBlacklist(c *gin.Context) { - params := paramsGetBlackList{} + params := api.GetBlackListReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pbFriend.GetBlacklistReq{} + req := &rpc.GetBlacklistReq{} utils.CopyStructFields(req.CommID, params) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -239,10 +190,10 @@ func GetBlacklist(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) return } - log.NewInfo(req.CommID.OperationID, "GetBlacklist args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) + client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.GetBlacklist(context.Background(), req) if err != nil { log.NewError(req.CommID.OperationID, "GetBlacklist failed ", err.Error(), req.String()) @@ -250,42 +201,22 @@ func GetBlacklist(c *gin.Context) { return } - if RpcResp.ErrCode == 0 { - userBlackList := make([]blackUserInfo, 0) - for _, friend := range RpcResp.Data { - var b blackUserInfo - utils.CopyStructFields(&b, friend) - - userBlackList = append(userBlackList, b) - } - resp := gin.H{ - "errCode": RpcResp.ErrCode, - "errMsg": RpcResp.ErrMsg, - "data": userBlackList, - } - c.JSON(http.StatusOK, resp) - log.NewInfo(req.CommID.OperationID, "GetBlacklist api return ", resp) - } else { - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} - c.JSON(http.StatusOK, resp) - log.NewError(req.CommID.OperationID, "GetBlacklist api return ", resp) - } -} + resp := api.GetBlackListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} + utils.CopyStructFields(&resp.BlackUserInfoList, RpcResp.BlackUserInfoList) + log.NewInfo(req.CommID.OperationID, "GetBlacklist api return ", resp) -type paramsSetFriendComment struct { - paramsCommFriend - remark string `json:"remark" binding:"required"` } func SetFriendComment(c *gin.Context) { - params := paramsSetFriendComment{} + params := api.SetFriendCommentReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pbFriend.SetFriendCommentReq{} + req := &rpc.SetFriendCommentReq{} utils.CopyStructFields(req.CommID, params) + req.Remark = params.Remark var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -293,34 +224,29 @@ func SetFriendComment(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) return } - req.Remark = params.remark - log.NewInfo(req.CommID.OperationID, "SetFriendComment args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) + client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.SetFriendComment(context.Background(), req) if err != nil { log.NewError(req.CommID.OperationID, "SetFriendComment failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call set friend comment rpc server failed"}) return } - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} + resp := api.SetFriendCommentResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} c.JSON(http.StatusOK, resp) log.NewInfo(req.CommID.OperationID, "SetFriendComment api return ", resp) } -type paramsRemoveBlackList struct { - paramsCommFriend -} - func RemoveBlacklist(c *gin.Context) { - params := paramsRemoveBlackList{} + params := api.RemoveBlackListReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pbFriend.RemoveBlacklistReq{} + req := &rpc.RemoveBlacklistReq{} utils.CopyStructFields(req.CommID, params) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -332,31 +258,26 @@ func RemoveBlacklist(c *gin.Context) { log.NewInfo(req.CommID.OperationID, "RemoveBlacklist args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) + client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.RemoveBlacklist(context.Background(), req) if err != nil { log.NewError(req.CommID.OperationID, "RemoveBlacklist failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call remove blacklist rpc server failed"}) return } - - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} + resp := api.RemoveBlackListResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} c.JSON(http.StatusOK, resp) - log.NewInfo(req.CommID.OperationID, "SetFriendComment api return ", resp) -} - -type paramsIsFriend struct { - paramsCommFriend + log.NewInfo(req.CommID.OperationID, "RemoveBlacklist api return ", resp) } func IsFriend(c *gin.Context) { - params := paramsIsFriend{} + params := api.IsFriendReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pbFriend.IsFriendReq{} + req := &rpc.IsFriendReq{} utils.CopyStructFields(req.CommID, params) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -368,96 +289,60 @@ func IsFriend(c *gin.Context) { log.NewInfo(req.CommID.OperationID, "IsFriend args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) + client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.IsFriend(context.Background(), req) if err != nil { log.NewError(req.CommID.OperationID, "IsFriend failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call add friend rpc server failed"}) return } - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg, "isFriend": RpcResp.ShipType} + resp := api.IsFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, Response: RpcResp.Response} c.JSON(http.StatusOK, resp) log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) } -type paramsSearchFriend struct { - paramsCommFriend -} - -func GetFriendsInfo(c *gin.Context) { - params := paramsSearchFriend{} - if err := c.BindJSON(¶ms); err != nil { - log.NewError("0", "BindJSON failed ", err.Error()) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &pbFriend.GetFriendsInfoReq{} - utils.CopyStructFields(req.CommID, params) - var ok bool - ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) - if !ok { - log.NewError(req.CommID.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) - return - } - log.NewInfo(req.CommID.OperationID, "GetFriendsInfo args ", req.String()) - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) - RpcResp, err := client.GetFriendsInfo(context.Background(), req) - if err != nil { - log.NewError(req.CommID.OperationID, "GetFriendsInfo failed ", err.Error(), req.String()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call search friend rpc server failed"}) - return - } - - if RpcResp.ErrCode == 0 { - var fi friendInfo - utils.CopyStructFields(&fi, RpcResp.Data.FriendUser) - utils.CopyStructFields(&fi, RpcResp.Data) - - resp := gin.H{ - "errCode": RpcResp.ErrCode, - "errMsg": RpcResp.ErrMsg, - "data": fi, - } - log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) - c.JSON(http.StatusOK, resp) - } else { - resp := gin.H{ - "errCode": RpcResp.ErrCode, - "errMsg": RpcResp.ErrMsg, - } - log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) - c.JSON(http.StatusOK, resp) - } -} - -type paramsGetFriendList struct { - paramsCommFriend -} - -type friendInfo struct { - UserID string `json:"userID"` - Nickname string `json:"nickname"` - FaceUrl string `json:"faceUrl"` - Gender int32 `json:"gender"` - Mobile string `json:"mobile"` - Birth string `json:"birth"` - Email string `json:"email"` - Ext string `json:"ext"` - Remark string `json:"remark"` - IsBlack int32 `json:"isBlack"` -} +// +//func GetFriendsInfo(c *gin.Context) { +// params := api.GetFriendsInfoReq{} +// if err := c.BindJSON(¶ms); err != nil { +// log.NewError("0", "BindJSON failed ", err.Error()) +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) +// return +// } +// req := &rpc.GetFriendsInfoReq{} +// utils.CopyStructFields(req.CommID, params) +// var ok bool +// ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) +// if !ok { +// log.NewError(req.CommID.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) +// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) +// return +// } +// log.NewInfo(req.CommID.OperationID, "GetFriendsInfo args ", req.String()) +// +// etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) +// client := rpc.NewFriendClient(etcdConn) +// RpcResp, err := client.GetFriendsInfo(context.Background(), req) +// if err != nil { +// log.NewError(req.CommID.OperationID, "GetFriendsInfo failed ", err.Error(), req.String()) +// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call search friend rpc server failed"}) +// return +// } +// +// resp := api.GetFriendsInfoResp{CommResp:api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} +// utils.CopyStructFields(&resp, RpcResp) +// c.JSON(http.StatusOK, resp) +// log.NewInfo(req.CommID.OperationID, "GetFriendsInfo api return ", resp) +//} func GetFriendList(c *gin.Context) { - params := paramsGetFriendList{} + params := api.GetFriendListReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pbFriend.GetFriendListReq{} + req := &rpc.GetFriendListReq{} utils.CopyStructFields(req.CommID, params) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -469,7 +354,7 @@ func GetFriendList(c *gin.Context) { log.NewInfo(req.CommID.OperationID, "GetFriendList args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) + client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.GetFriendList(context.Background(), req) if err != nil { log.NewError(req.CommID.OperationID, "GetFriendList failed ", err.Error(), req.String()) @@ -477,49 +362,19 @@ func GetFriendList(c *gin.Context) { return } - if RpcResp.ErrCode == 0 { - friendsInfo := make([]friendInfo, 0) - for _, friend := range RpcResp.Data { - - var fi friendInfo - utils.CopyStructFields(&fi, friend.FriendUser) - utils.CopyStructFields(&fi, RpcResp.Data) - friendsInfo = append(friendsInfo, fi) - } - resp := gin.H{ - "errCode": RpcResp.ErrCode, - "errMsg": RpcResp.ErrMsg, - "data": friendsInfo, - } - c.JSON(http.StatusOK, resp) - log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) - } else { - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} - c.JSON(http.StatusOK, resp) - log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) - } - -} - -type paramsGetApplyList struct { - paramsCommFriend -} - -type FriendApplicationUserInfo struct { - PublicUserInfo - ApplyTime int64 `json:"applyTime"` - ReqMessage string `json:"reqMessage` - Flag int32 `json:"flag"` + resp := api.GetFriendListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} + utils.CopyStructFields(&resp, RpcResp) + log.NewInfo(req.CommID.OperationID, "GetFriendList api return ", resp) } func GetFriendApplyList(c *gin.Context) { - params := paramsGetApplyList{} + params := api.GetFriendApplyListReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pbFriend.GetFriendApplyReq{} + req := &rpc.GetFriendApplyListReq{} utils.CopyStructFields(req.CommID, params) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -531,7 +386,7 @@ func GetFriendApplyList(c *gin.Context) { log.NewInfo(req.CommID.OperationID, "GetFriendApplyList args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) + client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.GetFriendApplyList(context.Background(), req) if err != nil { @@ -540,32 +395,20 @@ func GetFriendApplyList(c *gin.Context) { return } - if RpcResp.ErrCode == 0 { - userInfoList := make([]FriendApplicationUserInfo, 0) - for _, applyUserinfo := range RpcResp.Data { - var un FriendApplicationUserInfo - utils.CopyStructFields(&un, applyUserinfo.UserInfo) - utils.CopyStructFields(&un, applyUserinfo) - userInfoList = append(userInfoList, un) - } - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg, "data": userInfoList} - c.JSON(http.StatusOK, resp) - log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) - } else { - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} - c.JSON(http.StatusOK, resp) - log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) - } + resp := api.GetFriendApplyListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} + utils.CopyStructFields(&resp, RpcResp) + log.NewInfo(req.CommID.OperationID, "GetFriendApplyList api return ", resp) + } func GetSelfApplyList(c *gin.Context) { - params := paramsGetApplyList{} + params := api.GetSelfApplyListReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pbFriend.GetFriendApplyReq{} + req := &rpc.GetSelfApplyListReq{} utils.CopyStructFields(req.CommID, params) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -577,7 +420,7 @@ func GetSelfApplyList(c *gin.Context) { log.NewInfo(req.CommID.OperationID, "GetSelfApplyList args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) + client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.GetSelfApplyList(context.Background(), req) if err != nil { log.NewError(req.CommID.OperationID, "GetSelfApplyList failed ", err.Error(), req.String()) @@ -585,20 +428,9 @@ func GetSelfApplyList(c *gin.Context) { return } - if RpcResp.ErrCode == 0 { - userInfoList := make([]FriendApplicationUserInfo, 0) - for _, applyUserinfo := range RpcResp.Data { - var un FriendApplicationUserInfo - utils.CopyStructFields(&un, applyUserinfo.UserInfo) - utils.CopyStructFields(&un, applyUserinfo) - userInfoList = append(userInfoList, un) - } - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg, "data": userInfoList} - c.JSON(http.StatusOK, resp) - log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) - } else { - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} - c.JSON(http.StatusOK, resp) - log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) - } + resp := api.GetSelfApplyListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} + utils.CopyStructFields(resp, RpcResp) + c.JSON(http.StatusOK, resp) + log.NewInfo(req.CommID.OperationID, "GetSelfApplyList api return ", resp) + } diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 10ddf9ddd..860350173 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -1,791 +1,478 @@ package group import ( + api "Open_IM/pkg/base_info" "Open_IM/pkg/common/config" "Open_IM/pkg/common/log" "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" - pb "Open_IM/pkg/proto/group" + rpc "Open_IM/pkg/proto/group" + "Open_IM/pkg/utils" "context" - "fmt" "github.com/gin-gonic/gin" "net/http" "strings" ) -type InviteUserToGroupReq struct { - GroupID string `json:"groupID" binding:"required"` - UidList []string `json:"uidList" binding:"required"` - Reason string `json:"reason"` - OperationID string `json:"operationID" binding:"required"` -} - -type GetJoinedGroupListReq struct { - OperationID string `json:"operationID" binding:"required"` -} - -type KickGroupMemberReq struct { - GroupID string `json:"groupID"` - UidListInfo []*pb.GroupMemberFullInfo `json:"uidListInfo" binding:"required"` - Reason string `json:"reason"` - OperationID string `json:"operationID" binding:"required"` -} - func KickGroupMember(c *gin.Context) { - - params := KickGroupMemberReq{} + params := api.KickGroupMemberReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pb.KickGroupMemberReq{ - OperationID: params.OperationID, - GroupID: params.GroupID, - Token: c.Request.Header.Get("token"), - - UidListInfo: params.UidListInfo, + req := &rpc.KickGroupMemberReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + 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.Info(req.Token, req.OperationID, "recv req: ", req.String()) + + log.NewInfo(req.OperationID, "KickGroupMember args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) + client := rpc.NewGroupClient(etcdConn) RpcResp, err := client.KickGroupMember(context.Background(), req) if err != nil { - log.Error(req.Token, req.OperationID, "GetGroupMemberList failed, err: ", err.Error()) + log.NewError(req.OperationID, "GetGroupMemberList failed ", err.Error()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) return } - type KickGroupMemberResp struct { - ErrorCode int32 `json:"errCode"` - ErrorMsg string `json:"errMsg"` - Data []Id2Result `json:"data"` - } - - var memberListResp KickGroupMemberResp - memberListResp.ErrorMsg = RpcResp.ErrorMsg - memberListResp.ErrorCode = RpcResp.ErrorCode - for _, v := range RpcResp.Id2Result { - memberListResp.Data = append(memberListResp.Data, - Id2Result{UId: v.UId, - Result: v.Result}) + var memberListResp api.KickGroupMemberResp + memberListResp.ErrMsg = RpcResp.ErrMsg + memberListResp.ErrCode = RpcResp.ErrCode + for _, v := range RpcResp.Id2ResultList { + memberListResp.Data = append(memberListResp.Data, &api.Id2Result{UserID: v.UserID, Result: v.Result}) } + log.NewInfo(req.OperationID, "KickGroupMember api return ", memberListResp) c.JSON(http.StatusOK, memberListResp) } -type GetGroupMembersInfoReq struct { - GroupID string `json:"groupID"` - MemberList []string `json:"memberList"` - OperationID string `json:"operationID"` -} -type GetGroupMembersInfoResp struct { - ErrorCode int32 `json:"errCode"` - ErrorMsg string `json:"errMsg"` - Data []MemberResult `json:"data"` -} - func GetGroupMembersInfo(c *gin.Context) { - log.Info("", "", "GetGroupMembersInfo start....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - - params := GetGroupMembersInfoReq{} + params := api.GetGroupMembersInfoReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - - req := &pb.GetGroupMembersInfoReq{ - OperationID: params.OperationID, - GroupID: params.GroupID, - MemberList: params.MemberList, - Token: c.Request.Header.Get("token"), + req := &rpc.GetGroupMembersInfoReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + 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.Info(req.Token, req.OperationID, "recv req: ", len(params.MemberList)) + log.NewInfo(req.OperationID, "GetGroupMembersInfo args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) RpcResp, err := client.GetGroupMembersInfo(context.Background(), req) if err != nil { - log.Error(req.Token, req.OperationID, "GetGroupMemberList failed, err: ", err.Error()) + log.NewError(req.OperationID, "GetGroupMemberList failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) return } - var memberListResp GetGroupMembersInfoResp - memberListResp.ErrorMsg = RpcResp.ErrorMsg - memberListResp.ErrorCode = RpcResp.ErrorCode - for _, v := range RpcResp.MemberList { - memberListResp.Data = append(memberListResp.Data, - MemberResult{GroupId: req.GroupID, - UserId: v.UserId, - Role: v.Role, - JoinTime: uint64(v.JoinTime), - Nickname: v.NickName, - FaceUrl: v.FaceUrl}) - } + memberListResp := api.GetGroupMembersInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, Data: RpcResp.MemberList} + log.NewInfo(req.OperationID, "GetGroupMembersInfo api return ", memberListResp) c.JSON(http.StatusOK, memberListResp) } -type GetGroupMemberListReq struct { - GroupID string `json:"groupID"` - Filter int32 `json:"filter"` - NextSeq int32 `json:"nextSeq"` - OperationID string `json:"operationID"` -} -type getGroupAllMemberReq struct { - GroupID string `json:"groupID"` - OperationID string `json:"operationID"` -} - -type MemberResult struct { - GroupId string `json:"groupID"` - UserId string `json:"userId"` - Role int32 `json:"role"` - JoinTime uint64 `json:"joinTime"` - Nickname string `json:"nickName"` - FaceUrl string `json:"faceUrl"` -} - func GetGroupMemberList(c *gin.Context) { - log.Info("", "", "GetGroupMemberList start....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - - params := GetGroupMemberListReq{} + params := api.GetGroupMemberListReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pb.GetGroupMemberListReq{ - OperationID: params.OperationID, - Filter: params.Filter, - NextSeq: params.NextSeq, - GroupID: params.GroupID, - Token: c.Request.Header.Get("token"), + req := &rpc.GetGroupMemberListReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + 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.Info(req.Token, req.OperationID, "recv req: ", req.String()) + log.NewInfo(req.OperationID, "GetGroupMemberList args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) + RpcResp, err := client.GetGroupMemberList(context.Background(), req) if err != nil { - log.Error(req.Token, req.OperationID, "GetGroupMemberList failed, err: ", err.Error()) + log.NewError(req.OperationID, "GetGroupMemberList failed, ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) return } - type GetGroupMemberListResp struct { - ErrorCode int32 `json:"errCode"` - ErrorMsg string `json:"errMsg"` - NextSeq int32 `json:"nextSeq"` - Data []MemberResult `json:"data"` - } - - var memberListResp GetGroupMemberListResp - memberListResp.ErrorMsg = RpcResp.ErrorMsg - memberListResp.ErrorCode = RpcResp.ErrorCode - memberListResp.NextSeq = RpcResp.NextSeq - for _, v := range RpcResp.MemberList { - memberListResp.Data = append(memberListResp.Data, - MemberResult{GroupId: req.GroupID, - UserId: v.UserId, - Role: v.Role, - JoinTime: uint64(v.JoinTime), - Nickname: v.NickName, - FaceUrl: v.FaceUrl}) - } + memberListResp := api.GetGroupMemberListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, Data: RpcResp.MemberList, NextSeq: RpcResp.NextSeq} c.JSON(http.StatusOK, memberListResp) - + log.NewInfo(req.OperationID, "GetGroupMemberList api return ", memberListResp) } func GetGroupAllMember(c *gin.Context) { - log.Info("", "", "GetGroupAllMember start....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - - params := getGroupAllMemberReq{} + params := api.GetGroupAllMemberReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pb.GetGroupAllMemberReq{ - GroupID: params.GroupID, - OperationID: params.OperationID, - Token: c.Request.Header.Get("token"), + req := &rpc.GetGroupAllMemberReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + 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.Info(req.Token, req.OperationID, "recv req: ", req.String()) + log.NewInfo(req.OperationID, "GetGroupAllMember args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) RpcResp, err := client.GetGroupAllMember(context.Background(), req) if err != nil { - log.Error(req.Token, req.OperationID, "GetGroupAllMember failed, err: ", err.Error()) + log.NewError(req.OperationID, "GetGroupAllMember failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) return } - type GetGroupMemberListResp struct { - ErrorCode int32 `json:"errCode"` - ErrorMsg string `json:"errMsg"` - Data []MemberResult `json:"data"` - } - - var memberListResp GetGroupMemberListResp - memberListResp.ErrorMsg = RpcResp.ErrorMsg - memberListResp.ErrorCode = RpcResp.ErrorCode - for _, v := range RpcResp.MemberList { - memberListResp.Data = append(memberListResp.Data, - MemberResult{GroupId: req.GroupID, - UserId: v.UserId, - Role: v.Role, - JoinTime: uint64(v.JoinTime), - Nickname: v.NickName, - FaceUrl: v.FaceUrl}) - } + memberListResp := api.GetGroupAllMemberResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, Data: RpcResp.MemberList} c.JSON(http.StatusOK, memberListResp) -} - -type groupResult struct { - GroupId string `json:"groupId"` - GroupName string `json:"groupName"` - Notification string `json:"notification"` - Introduction string `json:"introduction"` - FaceUrl string `json:"faceUrl"` - OwnerId string `json:"ownerId"` - CreateTime uint64 `json:"createTime"` - MemberCount uint32 `json:"memberCount"` + log.NewInfo(req.OperationID, "GetGroupAllMember api return ", memberListResp) } func GetJoinedGroupList(c *gin.Context) { - log.Info("", "", "GetJoinedGroupList start....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - fmt.Println("config: ", etcdConn, config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - - params := GetJoinedGroupListReq{} + params := api.GetJoinedGroupListReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pb.GetJoinedGroupListReq{ - OperationID: params.OperationID, - Token: c.Request.Header.Get("token"), + req := &rpc.GetJoinedGroupListReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + 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.Info(req.Token, req.OperationID, "recv req: ", req.String()) + log.NewInfo(req.OperationID, "GetJoinedGroupList args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) RpcResp, err := client.GetJoinedGroupList(context.Background(), req) if err != nil { - log.Error(req.Token, req.OperationID, "GetJoinedGroupList failed, err: ", err.Error()) + log.NewError(req.OperationID, "GetJoinedGroupList failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) return } - log.Info(req.Token, req.OperationID, "GetJoinedGroupList: ", RpcResp) - type GetJoinedGroupListResp struct { - ErrorCode int32 `json:"errCode"` - ErrorMsg string `json:"errMsg"` - Data []groupResult `json:"data"` - } - - var GroupListResp GetJoinedGroupListResp - GroupListResp.ErrorCode = RpcResp.ErrorCode - GroupListResp.ErrorMsg = RpcResp.ErrorMsg - for _, v := range RpcResp.GroupList { - GroupListResp.Data = append(GroupListResp.Data, - groupResult{GroupId: v.GroupId, GroupName: v.GroupName, - Notification: v.Notification, - Introduction: v.Introduction, - FaceUrl: v.FaceUrl, - OwnerId: v.OwnerId, - CreateTime: v.CreateTime, - MemberCount: v.MemberCount}) - } + GroupListResp := api.GetJoinedGroupListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, Data: RpcResp.GroupList} c.JSON(http.StatusOK, GroupListResp) -} - -type Id2Result struct { - UId string `json:"uid"` - Result int32 `json:"result"` + log.NewInfo(req.OperationID, "GetJoinedGroupList api return ", GroupListResp) } func InviteUserToGroup(c *gin.Context) { - log.Info("", "", "InviteUserToGroup start....") - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - - params := InviteUserToGroupReq{} + params := api.InviteUserToGroupReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pb.InviteUserToGroupReq{ - OperationID: params.OperationID, - GroupID: params.GroupID, - Reason: params.Reason, - UidList: params.UidList, - Token: c.Request.Header.Get("token"), + req := &rpc.InviteUserToGroupReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + 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.Info(req.Token, req.OperationID, "recv req: ", req.String()) + log.NewInfo(req.OperationID, "InviteUserToGroup args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) RpcResp, err := client.InviteUserToGroup(context.Background(), req) if err != nil { - log.Error(req.Token, req.OperationID, "InviteUserToGroup failed, err: ", err.Error()) + log.NewError(req.OperationID, "InviteUserToGroup failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) return } - type InviteUserToGroupResp struct { - ErrorCode int32 `json:"errCode"` - ErrorMsg string `json:"errMsg"` - I2R []Id2Result `json:"data"` + Resp := api.InviteUserToGroupResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} + for _, v := range RpcResp.Id2ResultList { + Resp.Data = append(Resp.Data, api.Id2Result{UserID: v.UserID, Result: v.Result}) } - - var iResp InviteUserToGroupResp - iResp.ErrorMsg = RpcResp.ErrorMsg - iResp.ErrorCode = RpcResp.ErrorCode - for _, v := range RpcResp.Id2Result { - iResp.I2R = append(iResp.I2R, Id2Result{UId: v.UId, Result: v.Result}) - } - - //resp := gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg, "data": RpcResp.Id2Result} - c.JSON(http.StatusOK, iResp) -} - -type paramsCreateGroupStruct struct { - MemberList []*pb.GroupAddMemberInfo `json:"memberList"` - GroupName string `json:"groupName"` - Introduction string `json:"introduction"` - Notification string `json:"notification"` - FaceUrl string `json:"faceUrl"` - OperationID string `json:"operationID" binding:"required"` - Ex string `json:"ex"` + c.JSON(http.StatusOK, Resp) + log.NewInfo(req.OperationID, "InviteUserToGroup api return ", Resp) } func CreateGroup(c *gin.Context) { - log.Info("", "", "api create group init ....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - //defer etcdConn.Close() - - params := paramsCreateGroupStruct{} + params := api.CreateGroupReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pb.CreateGroupReq{ - MemberList: params.MemberList, - GroupName: params.GroupName, - Introduction: params.Introduction, - Notification: params.Notification, - FaceUrl: params.FaceUrl, - OperationID: params.OperationID, - Ex: params.Ex, - Token: c.Request.Header.Get("token"), + req := &rpc.CreateGroupReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + 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.Info(req.Token, req.OperationID, "api create group is server,params=%s", req.String()) + log.NewInfo(req.OperationID, "CreateGroup args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) RpcResp, err := client.CreateGroup(context.Background(), req) if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,call create group rpc server failed", err.Error()) + log.NewError(req.OperationID, "CreateGroup failed", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) return } - log.InfoByArgs("call create group rpc server success,args=%s", RpcResp.String()) - if RpcResp.ErrorCode == 0 { - resp := gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg, "data": gin.H{"groupID": RpcResp.GroupID}} + + if RpcResp.ErrCode == 0 { + resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg, "data": gin.H{"groupInfo": RpcResp.GroupInfo}} c.JSON(http.StatusOK, resp) } else { - c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) - } - log.InfoByArgs("api create group success return,get args=%s,return args=%s", req.String(), RpcResp.String()) -} - -type paramsGroupApplicationList struct { - OperationID string `json:"operationID" binding:"required"` -} - -func newUserRegisterReq(params *paramsGroupApplicationList) *group.GetGroupApplicationListReq { - pbData := group.GetGroupApplicationListReq{ - OperationID: params.OperationID, + c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg}) } - return &pbData -} - -type paramsGroupApplicationListRet struct { - ID string `json:"id"` - GroupID string `json:"groupID"` - FromUserID string `json:"fromUserID"` - ToUserID string `json:"toUserID"` - Flag int32 `json:"flag"` - RequestMsg string `json:"reqMsg"` - HandledMsg string `json:"handledMsg"` - AddTime int64 `json:"createTime"` - FromUserNickname string `json:"fromUserNickName"` - ToUserNickname string `json:"toUserNickName"` - FromUserFaceUrl string `json:"fromUserFaceURL"` - ToUserFaceUrl string `json:"toUserFaceURL"` - HandledUser string `json:"handledUser"` - Type int32 `json:"type"` - HandleStatus int32 `json:"handleStatus"` - HandleResult int32 `json:"handleResult"` + log.NewInfo(req.OperationID, "InviteUserToGroup api return ", RpcResp) } +//my application 我发出去的 func GetGroupApplicationList(c *gin.Context) { - log.Info("", "", "api GetGroupApplicationList init ....") - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := group.NewGroupClient(etcdConn) - //defer etcdConn.Close() - - params := paramsGroupApplicationList{} + params := api.GetGroupApplicationListReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - pbData := newUserRegisterReq(¶ms) - - token := c.Request.Header.Get("token") - if claims, err := token_verify.ParseToken(token); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err"}) + req := &rpc.GetGroupApplicationListReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + 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 - } else { - pbData.UID = claims.UID } + log.NewInfo(req.OperationID, "GetGroupApplicationList args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) - log.Info("", "", "api GetGroupApplicationList is server, [data: %s]", pbData.String()) - reply, err := client.GetGroupApplicationList(context.Background(), pbData) + reply, err := client.GetGroupApplicationList(context.Background(), req) if err != nil { - log.Error("", "", "api GetGroupApplicationList call rpc fail, [data: %s] [err: %s]", pbData.String(), err.Error()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) return } - log.Info("", "", "api GetGroupApplicationList call rpc success, [data: %s] [reply: %s]", pbData.String(), reply.String()) - - unProcessCount := 0 - userReq := make([]paramsGroupApplicationListRet, 0) - if reply != nil && reply.Data != nil && reply.Data.User != nil { - for i := 0; i < len(reply.Data.User); i++ { - req := paramsGroupApplicationListRet{} - req.ID = reply.Data.User[i].ID - req.GroupID = reply.Data.User[i].GroupID - req.FromUserID = reply.Data.User[i].FromUserID - req.ToUserID = reply.Data.User[i].ToUserID - req.Flag = reply.Data.User[i].Flag - req.RequestMsg = reply.Data.User[i].RequestMsg - req.HandledMsg = reply.Data.User[i].HandledMsg - req.AddTime = reply.Data.User[i].AddTime - req.FromUserNickname = reply.Data.User[i].FromUserNickname - req.ToUserNickname = reply.Data.User[i].ToUserNickname - req.FromUserFaceUrl = reply.Data.User[i].FromUserFaceUrl - req.ToUserFaceUrl = reply.Data.User[i].ToUserFaceUrl - req.HandledUser = reply.Data.User[i].HandledUser - req.Type = reply.Data.User[i].Type - req.HandleStatus = reply.Data.User[i].HandleStatus - req.HandleResult = reply.Data.User[i].HandleResult - userReq = append(userReq, req) - - if req.Flag == 0 { - unProcessCount++ - } - } - } - - c.JSON(http.StatusOK, gin.H{ - "errCode": reply.ErrCode, - "errMsg": reply.ErrMsg, - "data": gin.H{ - "count": unProcessCount, - "user": userReq, - }, - }) -} - -type paramsGetGroupInfo struct { - GroupIDList []string `json:"groupIDList" binding:"required"` - OperationID string `json:"operationID" binding:"required"` + resp := api.GetGroupApplicationListResp{CommResp: api.CommResp{ErrCode: reply.ErrCode, ErrMsg: reply.ErrMsg}, Data: reply.GroupRequestList} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.OperationID, "GetGroupApplicationList api return ", resp) } func GetGroupsInfo(c *gin.Context) { - log.Info("", "", "api get groups info init ....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - //defer etcdConn.Close() - - params := paramsGetGroupInfo{} + params := api.GetGroupInfoReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pb.GetGroupsInfoReq{ - GroupIDList: params.GroupIDList, - Token: c.Request.Header.Get("token"), - OperationID: params.OperationID, + req := &rpc.GetGroupsInfoReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + 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.Info(req.Token, req.OperationID, "get groups info is server,params=%s", req.String()) + log.NewInfo(req.OperationID, "GetGroupsInfo args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) RpcResp, err := client.GetGroupsInfo(context.Background(), req) if err != nil { - log.Error(req.Token, req.OperationID, "call get groups info rpc server failed,err=%s", err.Error()) + log.NewError(req.OperationID, "GetGroupsInfo failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) return } - log.InfoByArgs("call get groups info rpc server success", RpcResp.String()) - if RpcResp.ErrorCode == 0 { - groupsInfo := make([]pb.GroupInfo, 0) - for _, v := range RpcResp.Data { - var groupInfo pb.GroupInfo - groupInfo.GroupId = v.GroupId - groupInfo.GroupName = v.GroupName - groupInfo.Notification = v.Notification - groupInfo.Introduction = v.Introduction - groupInfo.FaceUrl = v.FaceUrl - groupInfo.CreateTime = v.CreateTime - groupInfo.OwnerId = v.OwnerId - groupInfo.MemberCount = v.MemberCount - - groupsInfo = append(groupsInfo, groupInfo) - } - c.JSON(http.StatusOK, gin.H{ - "errCode": RpcResp.ErrorCode, - "errMsg": RpcResp.ErrorMsg, - "data": groupsInfo, - }) - } else { - c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) - } -} -type paramsGroupApplicationResponse struct { - OperationID string `json:"operationID" binding:"required"` - GroupID string `json:"groupID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` - FromUserNickName string `json:"fromUserNickName"` - FromUserFaceUrl string `json:"fromUserFaceUrl"` - ToUserID string `json:"toUserID" binding:"required"` - ToUserNickName string `json:"toUserNickName"` - ToUserFaceUrl string `json:"toUserFaceUrl"` - AddTime int64 `json:"addTime"` - RequestMsg string `json:"requestMsg"` - HandledMsg string `json:"handledMsg"` - Type int32 `json:"type"` - HandleStatus int32 `json:"handleStatus"` - HandleResult int32 `json:"handleResult"` - - UserID string `json:"userID"` -} - -func newGroupApplicationResponse(params *paramsGroupApplicationResponse) *group.GroupApplicationResponseReq { - pbData := group.GroupApplicationResponseReq{ - OperationID: params.OperationID, - GroupID: params.GroupID, - FromUserID: params.FromUserID, - FromUserNickName: params.FromUserNickName, - FromUserFaceUrl: params.FromUserFaceUrl, - ToUserID: params.ToUserID, - ToUserNickName: params.ToUserNickName, - ToUserFaceUrl: params.ToUserFaceUrl, - AddTime: params.AddTime, - RequestMsg: params.RequestMsg, - HandledMsg: params.HandledMsg, - Type: params.Type, - HandleStatus: params.HandleStatus, - HandleResult: params.HandleResult, - } - return &pbData + resp := api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.OperationID, "GetGroupsInfo api return ", resp) } +//process application func ApplicationGroupResponse(c *gin.Context) { - log.Info("", "", "api GroupApplicationResponse init ....") - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := group.NewGroupClient(etcdConn) - //defer etcdConn.Close() - - params := paramsGroupApplicationResponse{} + params := api.ApplicationGroupResponseReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - pbData := newGroupApplicationResponse(¶ms) - - token := c.Request.Header.Get("token") - if claims, err := token_verify.ParseToken(token); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err"}) + req := &rpc.GroupApplicationResponseReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + 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 - } else { - pbData.OwnerID = claims.UID } + log.NewInfo(req.OperationID, "ApplicationGroupResponse args ", req.String()) - log.Info("", "", "api GroupApplicationResponse is server, [data: %s]", pbData.String()) - reply, err := client.GroupApplicationResponse(context.Background(), pbData) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) + reply, err := client.GroupApplicationResponse(context.Background(), req) if err != nil { - log.Error("", "", "api GroupApplicationResponse call rpc fail, [data: %s] [err: %s]", pbData.String(), err.Error()) + log.NewError(req.OperationID, "GroupApplicationResponse failed ", req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) return } - log.Info("", "", "api GroupApplicationResponse call rpc success, [data: %s] [reply: %s]", pbData.String(), reply.String()) - c.JSON(http.StatusOK, gin.H{ - "errCode": reply.ErrCode, - "errMsg": reply.ErrMsg, - }) - -} - -type paramsJoinGroup struct { - GroupID string `json:"groupID" binding:"required"` - Message string `json:"message"` - OperationID string `json:"operationID" binding:"required"` + resp := api.CommResp{ErrCode: reply.ErrCode, ErrMsg: reply.ErrMsg} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.OperationID, "ApplicationGroupResponse api return ", resp) } func JoinGroup(c *gin.Context) { - log.Info("", "", "api join group init....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - //defer etcdConn.Close() - - params := paramsJoinGroup{} + params := api.JoinGroupReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pb.JoinGroupReq{ - GroupID: params.GroupID, - Message: params.Message, - Token: c.Request.Header.Get("token"), - OperationID: params.OperationID, + req := &rpc.JoinGroupReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + 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.Info(req.Token, req.OperationID, "api join group is server,params=%s", req.String()) + log.NewInfo(req.OperationID, "JoinGroup args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) + RpcResp, err := client.JoinGroup(context.Background(), req) if err != nil { - log.Error(req.Token, req.OperationID, "call join group rpc server failed,err=%s", err.Error()) + log.NewError(req.OperationID, "JoinGroup failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) return } - log.InfoByArgs("call join group rpc server success,args=%s", RpcResp.String()) - c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) -} - -type paramsQuitGroup struct { - GroupID string `json:"groupID" binding:"required"` - OperationID string `json:"operationID" binding:"required"` + resp := api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg} + c.JSON(http.StatusOK, resp) + log.NewInfo("JoinGroup api return", RpcResp.String()) } func QuitGroup(c *gin.Context) { - log.Info("", "", "api quit group init ....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - //defer etcdConn.Close() - - params := paramsQuitGroup{} + params := api.QuitGroupReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pb.QuitGroupReq{ - GroupID: params.GroupID, - OperationID: params.OperationID, - Token: c.Request.Header.Get("token"), + req := &rpc.QuitGroupReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + 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.Info(req.Token, req.OperationID, "api quit group is server,params=%s", req.String()) + log.NewInfo(req.OperationID, "QuitGroup args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) RpcResp, err := client.QuitGroup(context.Background(), req) if err != nil { - log.Error(req.Token, req.OperationID, "call quit group rpc server failed,err=%s", err.Error()) + log.NewError(req.OperationID, "call quit group rpc server failed,err=%s", err.Error()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) return } - log.InfoByArgs("call quit group rpc server success,args=%s", RpcResp.String()) - c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) - log.InfoByArgs("api quit group success return,get args=%s,return args=%s", req.String(), RpcResp.String()) -} - -type paramsSetGroupInfo struct { - GroupID string `json:"groupId" binding:"required"` - GroupName string `json:"groupName"` - Notification string `json:"notification"` - Introduction string `json:"introduction"` - FaceUrl string `json:"faceUrl"` - OperationID string `json:"operationID" binding:"required"` + resp := api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg} + c.JSON(http.StatusOK, resp) + log.NewInfo("QuitGroup api return", RpcResp.String()) } func SetGroupInfo(c *gin.Context) { - log.Info("", "", "api set group info init...") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - //defer etcdConn.Close() - - params := paramsSetGroupInfo{} + params := api.SetGroupInfoReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pb.SetGroupInfoReq{ - GroupID: params.GroupID, - GroupName: params.GroupName, - Notification: params.Notification, - Introduction: params.Introduction, - FaceUrl: params.FaceUrl, - Token: c.Request.Header.Get("token"), - OperationID: params.OperationID, + req := &rpc.SetGroupInfoReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + 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.Info(req.Token, req.OperationID, "api set group info is server,params=%s", req.String()) + log.NewInfo(req.OperationID, "SetGroupInfo args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) RpcResp, err := client.SetGroupInfo(context.Background(), req) if err != nil { - log.Error(req.Token, req.OperationID, "call set group info rpc server failed,err=%s", err.Error()) + log.NewError(req.OperationID, "SetGroupInfo failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) return } - log.InfoByArgs("call set group info rpc server success,args=%s", RpcResp.String()) - c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) -} - -type paramsTransferGroupOwner struct { - OperationID string `json:"operationID" binding:"required"` - GroupID string `json:"groupID" binding:"required"` - UID string `json:"uid" binding:"required"` -} - -func newTransferGroupOwnerReq(params *paramsTransferGroupOwner) *group.TransferGroupOwnerReq { - pbData := group.TransferGroupOwnerReq{ - OperationID: params.OperationID, - GroupID: params.GroupID, - NewOwner: params.UID, - } - return &pbData + resp := api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.OperationID, "SetGroupInfo api return ", resp) } func TransferGroupOwner(c *gin.Context) { - log.Info("", "", "api TransferGroupOwner init ....") - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := group.NewGroupClient(etcdConn) - //defer etcdConn.Close() - - params := paramsTransferGroupOwner{} + params := api.TransferGroupOwnerReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - pbData := newTransferGroupOwnerReq(¶ms) - - token := c.Request.Header.Get("token") - if claims, err := token_verify.ParseToken(token); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err"}) + req := &rpc.TransferGroupOwnerReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + 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 - } else { - pbData.OldOwner = claims.UID } + log.NewInfo(req.OperationID, "TransferGroupOwner args ", req.String()) - log.Info("", "", "api TransferGroupOwner is server, [data: %s]", pbData.String()) - reply, err := client.TransferGroupOwner(context.Background(), pbData) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) + reply, err := client.TransferGroupOwner(context.Background(), req) if err != nil { - log.Error("", "", "api TransferGroupOwner call rpc fail, [data: %s] [err: %s]", pbData.String(), err.Error()) + log.NewError(req.OperationID, "TransferGroupOwner failed ", req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) return } - log.Info("", "", "api TransferGroupOwner call rpc success, [data: %s] [reply: %s]", pbData.String(), reply.String()) - - c.JSON(http.StatusOK, gin.H{ - "errCode": reply.ErrCode, - "errMsg": reply.ErrMsg, - }) + resp := api.CommResp{ErrCode: reply.ErrCode, ErrMsg: reply.ErrMsg} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.OperationID, "TransferGroupOwner api return ", resp) } diff --git a/internal/demo/register/login.go b/internal/demo/register/login.go index bc2605e08..b6702bbf4 100644 --- a/internal/demo/register/login.go +++ b/internal/demo/register/login.go @@ -65,7 +65,7 @@ func Login(c *gin.Context) { defer resp.Body.Close() if err != nil { log.ErrorByKv("Failed to read file", account, "err", err.Error()) - c.JSON(http.StatusOK, gin.H{"errCode": constant.IoErrot, "errMsg": err.Error()}) + c.JSON(http.StatusOK, gin.H{"errCode": constant.IoError, "errMsg": err.Error()}) return } imRep := IMRegisterResp{} diff --git a/internal/demo/register/set_password.go b/internal/demo/register/set_password.go index 7dca79dc6..9d66a09b0 100644 --- a/internal/demo/register/set_password.go +++ b/internal/demo/register/set_password.go @@ -86,7 +86,7 @@ openIMRegisterTab: response, err := ioutil.ReadAll(resp.Body) defer resp.Body.Close() if err != nil { - c.JSON(http.StatusOK, gin.H{"errCode": constant.IoErrot, "errMsg": err.Error()}) + c.JSON(http.StatusOK, gin.H{"errCode": constant.IoError, "errMsg": err.Error()}) return } imrep := IMRegisterResp{} diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index 7acd4f37a..1b459c49f 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -9,10 +9,9 @@ import ( "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" pbFriend "Open_IM/pkg/proto/friend" - sdk_ws "Open_IM/pkg/proto/sdk_ws" + sdkws "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" "context" - "fmt" "google.golang.org/grpc" "net" "strconv" @@ -37,17 +36,17 @@ func NewFriendServer(port int) *friendServer { } func (s *friendServer) Run() { - log.Info("", "", fmt.Sprintf("rpc friend init....")) + log.NewInfo("0", "friendServer run...") ip := utils.ServerIP registerAddress := ip + ":" + strconv.Itoa(s.rpcPort) //listener network listener, err := net.Listen("tcp", registerAddress) if err != nil { - log.InfoByArgs(fmt.Sprintf("Failed to listen rpc friend network,err=%s", err.Error())) + log.NewError("0", "Listen failed ", err.Error(), registerAddress) return } - log.Info("", "", "listen network success, address = %s", registerAddress) + log.NewInfo("0", "listen ok ", registerAddress) defer listener.Close() //grpc server srv := grpc.NewServer() @@ -56,62 +55,59 @@ func (s *friendServer) Run() { pbFriend.RegisterFriendServer(srv, s) err = getcdv3.RegisterEtcd(s.etcdSchema, strings.Join(s.etcdAddr, ","), ip, s.rpcPort, s.rpcRegisterName, 10) if err != nil { - log.ErrorByArgs("register rpc fiend service to etcd failed,err=%s", err.Error()) + log.NewError("0", "RegisterEtcd failed ", err.Error(), s.etcdSchema, strings.Join(s.etcdAddr, ","), ip, s.rpcPort, s.rpcRegisterName) return } err = srv.Serve(listener) if err != nil { - log.ErrorByArgs("listen rpc friend error,err=%s", err.Error()) + log.NewError("0", "Serve failed ", err.Error(), listener) return } } -func (s *friendServer) GetFriendsInfo(ctx context.Context, req *pbFriend.GetFriendsInfoReq) (*pbFriend.GetFriendInfoResp, error) { - log.NewInfo(req.CommID.OperationID, "GetFriendsInfo args ", req.String()) - var ( - isInBlackList int32 - // isFriend int32 - comment string - ) - - friendShip, err := imdb.FindFriendRelationshipFromFriend(req.CommID.FromUserID, req.CommID.ToUserID) - if err != nil { - log.NewError(req.CommID.OperationID, "FindFriendRelationshipFromFriend failed ", err.Error()) - return &pbFriend.GetFriendInfoResp{ErrCode: constant.ErrSearchUserInfo.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil - // isFriend = constant.FriendFlag - } - comment = friendShip.Remark - - friendUserInfo, err := imdb.FindUserByUID(req.CommID.ToUserID) - if err != nil { - log.NewError(req.CommID.OperationID, "FindUserByUID failed ", err.Error()) - return &pbFriend.GetFriendInfoResp{ErrCode: constant.ErrSearchUserInfo.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil - } - - err = imdb.FindRelationshipFromBlackList(req.CommID.FromUserID, req.CommID.ToUserID) - if err == nil { - isInBlackList = constant.BlackListFlag - } - - resp := pbFriend.GetFriendInfoResp{ - ErrCode: 0, - ErrMsg: "", - Data: &pbFriend.FriendInfo{ - IsBlack: isInBlackList, - }, - } - utils.CopyStructFields(resp.Data.FriendUser, friendUserInfo) - resp.Data.IsBlack = isInBlackList - resp.Data.OwnerUserID = req.CommID.FromUserID - resp.Data.Remark = comment - resp.Data.CreateTime = friendUserInfo.CreateTime - - log.NewInfo(req.CommID.OperationID, "GetFriendsInfo ok ", resp) - return &resp, nil - -} - -func (s *friendServer) AddBlacklist(ctx context.Context, req *pbFriend.AddBlacklistReq) (*pbFriend.CommonResp, error) { +//// +//func (s *friendServer) GetFriendsInfo(ctx context.Context, req *pbFriend.GetFriendsInfoReq) (*pbFriend.GetFriendInfoResp, error) { +// return nil, nil +//// log.NewInfo(req.CommID.OperationID, "GetFriendsInfo args ", req.String()) +//// var ( +//// isInBlackList int32 +//// // isFriend int32 +//// comment string +//// ) +//// +//// friendShip, err := imdb.FindFriendRelationshipFromFriend(req.CommID.FromUserID, req.CommID.ToUserID) +//// if err != nil { +//// log.NewError(req.CommID.OperationID, "FindFriendRelationshipFromFriend failed ", err.Error()) +//// return &pbFriend.GetFriendInfoResp{ErrCode: constant.ErrSearchUserInfo.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil +//// // isFriend = constant.FriendFlag +//// } +//// comment = friendShip.Remark +//// +//// friendUserInfo, err := imdb.FindUserByUID(req.CommID.ToUserID) +//// if err != nil { +//// log.NewError(req.CommID.OperationID, "FindUserByUID failed ", err.Error()) +//// return &pbFriend.GetFriendInfoResp{ErrCode: constant.ErrSearchUserInfo.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil +//// } +//// +//// err = imdb.FindRelationshipFromBlackList(req.CommID.FromUserID, req.CommID.ToUserID) +//// if err == nil { +//// isInBlackList = constant.BlackListFlag +//// } +//// +//// resp := pbFriend.GetFriendInfoResp{ErrCode: 0, ErrMsg: "",} +//// +//// utils.CopyStructFields(resp.FriendInfoList, friendUserInfo) +//// resp.Data.IsBlack = isInBlackList +//// resp.Data.OwnerUserID = req.CommID.FromUserID +//// resp.Data.Remark = comment +//// resp.Data.CreateTime = friendUserInfo.CreateTime +//// +//// log.NewInfo(req.CommID.OperationID, "GetFriendsInfo ok ", resp) +//// return &resp, nil +//// +//} + +func (s *friendServer) AddBlacklist(ctx context.Context, req *pbFriend.AddBlacklistReq) (*pbFriend.AddBlacklistResp, error) { log.NewInfo(req.CommID.OperationID, "AddBlacklist args ", req.String()) ok := token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) if !ok { @@ -121,15 +117,14 @@ func (s *friendServer) AddBlacklist(ctx context.Context, req *pbFriend.AddBlackl err := imdb.InsertInToUserBlackList(req.CommID.FromUserID, req.CommID.ToUserID) if err != nil { log.NewError(req.CommID.OperationID, "InsertInToUserBlackList failed ", err.Error()) - return &pbFriend.CommonResp{ErrCode: constant.ErrMysql.ErrCode, ErrMsg: constant.ErrMysql.ErrMsg}, nil + return &pbFriend.AddBlacklistResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } log.NewInfo(req.CommID.OperationID, "InsertInToUserBlackList ok ", req.CommID.FromUserID, req.CommID.ToUserID) chat.BlackAddedNotification(req) - return &pbFriend.CommonResp{}, nil - + return &pbFriend.AddBlacklistResp{CommonResp: &pbFriend.CommonResp{}}, nil } -func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq) (*pbFriend.CommonResp, error) { +func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq) (*pbFriend.AddFriendResp, error) { log.NewInfo(req.CommID.OperationID, "AddFriend args ", req.String()) ok := token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) if !ok { @@ -138,18 +133,18 @@ func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq //Cannot add non-existent users if _, err := imdb.FindUserByUID(req.CommID.ToUserID); err != nil { log.NewError(req.CommID.OperationID, "FindUserByUID failed ", err.Error(), req.CommID.ToUserID) - return &pbFriend.CommonResp{ErrCode: constant.ErrAddFriend.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil + return &pbFriend.AddFriendResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } //Establish a latest relationship in the friend request table - err := imdb.ReplaceIntoFriendReq(req.CommID.FromUserID, req.CommID.ToUserID, constant.ApplicationFriendFlag, req.ReqMessage) + err := imdb.ReplaceIntoFriendReq(req.CommID.FromUserID, req.CommID.ToUserID, constant.ApplicationFriendFlag, req.ReqMsg) if err != nil { log.NewError(req.CommID.OperationID, "ReplaceIntoFriendReq failed ", err.Error()) - return &pbFriend.CommonResp{ErrCode: constant.ErrAddFriend.ErrCode, ErrMsg: constant.ErrAddFriend.ErrMsg}, nil + return &pbFriend.AddFriendResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } chat.FriendApplicationAddedNotification(req) - return &pbFriend.CommonResp{}, nil + return &pbFriend.AddFriendResp{CommonResp: &pbFriend.CommonResp{}}, nil } func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFriendReq) (*pbFriend.ImportFriendResp, error) { @@ -159,29 +154,29 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri if !utils.IsContain(req.OpUserID, config.Config.Manager.AppManagerUid) { log.NewError(req.OperationID, "not authorized", req.OpUserID) - c.ErrCode = constant.ErrAddFriend.ErrCode - c.ErrMsg = "not authorized" - return &pbFriend.ImportFriendResp{CommonResp: &c, FailedUidList: req.FriendUserIDList}, nil + c.ErrCode = constant.ErrAccess.ErrCode + c.ErrMsg = constant.ErrAccess.ErrMsg + return &pbFriend.ImportFriendResp{CommonResp: &c, FailedFriendUserIDList: req.FriendUserIDList}, nil } if _, err := imdb.FindUserByUID(req.FromUserID); err != nil { log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.FromUserID) - c.ErrCode = constant.ErrAddFriend.ErrCode + c.ErrCode = constant.ErrDB.ErrCode c.ErrMsg = "this user not exists,cant not add friend" - return &pbFriend.ImportFriendResp{CommonResp: &c, FailedUidList: req.FriendUserIDList}, nil + return &pbFriend.ImportFriendResp{CommonResp: &c, FailedFriendUserIDList: req.FriendUserIDList}, nil } for _, v := range req.FriendUserIDList { if _, fErr := imdb.FindUserByUID(v); fErr != nil { c.ErrMsg = "some uid establish failed" c.ErrCode = 408 - resp.FailedUidList = append(resp.FailedUidList, v) + resp.FailedFriendUserIDList = append(resp.FailedFriendUserIDList, v) } else { if _, err := imdb.FindFriendRelationshipFromFriend(req.FromUserID, v); err != nil { //Establish two single friendship err1 := imdb.InsertToFriend(req.FromUserID, v, 1) if err1 != nil { - resp.FailedUidList = append(resp.FailedUidList, v) + resp.FailedFriendUserIDList = append(resp.FailedFriendUserIDList, v) log.NewError(req.OperationID, "InsertToFriend failed", req.FromUserID, v, err1.Error()) c.ErrMsg = "some uid establish failed" c.ErrCode = 408 @@ -189,7 +184,7 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri } err2 := imdb.InsertToFriend(v, req.FromUserID, 1) if err2 != nil { - resp.FailedUidList = append(resp.FailedUidList, v) + resp.FailedFriendUserIDList = append(resp.FailedFriendUserIDList, v) log.NewError(req.OperationID, "InsertToFriend failed", v, req.FromUserID, err2.Error()) c.ErrMsg = "some uid establish failed" c.ErrCode = 408 @@ -208,26 +203,26 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri } //process Friend application -func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddFriendResponseReq) (*pbFriend.CommonResp, error) { +func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddFriendResponseReq) (*pbFriend.AddFriendResponseResp, error) { log.NewInfo(req.CommID.OperationID, "AddFriendResponse args ", req.String()) if !token_verify.CheckAccess(req.CommID.FromUserID, req.CommID.ToUserID) { log.NewError(req.CommID.OperationID, "CheckAccess failed ", req.CommID.FromUserID, req.CommID.ToUserID) - return &pbFriend.CommonResp{ErrCode: constant.ErrAgreeToAddFriend.ErrCode, ErrMsg: constant.ErrAgreeToAddFriend.ErrMsg}, nil + return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } //Check there application before agreeing or refuse to a friend's application //req.CommID.FromUserID process req.CommID.ToUserID if _, err := imdb.FindFriendApplyFromFriendReqByUid(req.CommID.ToUserID, req.CommID.FromUserID); err != nil { log.NewError(req.CommID.OperationID, "FindFriendApplyFromFriendReqByUid failed ", err.Error(), req.CommID.ToUserID, req.CommID.FromUserID) - return &pbFriend.CommonResp{ErrCode: constant.ErrAgreeToAddFriend.ErrCode, ErrMsg: constant.ErrAgreeToAddFriend.ErrMsg}, nil + return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } //Change friend request status flag err := imdb.UpdateFriendRelationshipToFriendReq(req.CommID.ToUserID, req.CommID.FromUserID, req.Flag) if err != nil { log.NewError(req.CommID.OperationID, "UpdateFriendRelationshipToFriendReq failed ", err.Error(), req.CommID.ToUserID, req.CommID.FromUserID, req.Flag) - return &pbFriend.CommonResp{ErrCode: constant.ErrMysql.ErrCode, ErrMsg: constant.ErrAgreeToAddFriend.ErrMsg}, nil + return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } log.NewInfo(req.CommID.OperationID, "rpc AddFriendResponse ok") //Change the status of the friend request form @@ -241,43 +236,43 @@ func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddF err = imdb.InsertToFriend(req.CommID.FromUserID, req.CommID.ToUserID, req.Flag) if err != nil { log.NewError(req.CommID.OperationID, "InsertToFriend failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID, req.Flag) - return &pbFriend.CommonResp{ErrCode: constant.ErrAgreeToAddFriend.ErrCode, ErrMsg: constant.ErrAgreeToAddFriend.ErrMsg}, nil + return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } } _, err = imdb.FindFriendRelationshipFromFriend(req.CommID.ToUserID, req.CommID.FromUserID) if err == nil { log.NewWarn(req.CommID.OperationID, "FindFriendRelationshipFromFriend exist", req.CommID.ToUserID, req.CommID.FromUserID) - return &pbFriend.CommonResp{}, nil + return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{}}, nil } err = imdb.InsertToFriend(req.CommID.ToUserID, req.CommID.FromUserID, req.Flag) if err != nil { log.NewError(req.CommID.OperationID, "InsertToFriend failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID, req.Flag) - return &pbFriend.CommonResp{ErrCode: constant.ErrAgreeToAddFriend.ErrCode, ErrMsg: constant.ErrAgreeToAddFriend.ErrMsg}, nil + return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } } chat.FriendApplicationProcessedNotification(req) chat.FriendAddedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID) - return &pbFriend.CommonResp{}, nil + return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{}}, nil } -func (s *friendServer) DeleteFriend(ctx context.Context, req *pbFriend.DeleteFriendReq) (*pbFriend.CommonResp, error) { +func (s *friendServer) DeleteFriend(ctx context.Context, req *pbFriend.DeleteFriendReq) (*pbFriend.DeleteFriendResp, error) { log.NewInfo(req.CommID.OperationID, "DeleteFriend args ", req.String()) //Parse token, to find current user information if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) - return &pbFriend.CommonResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + return &pbFriend.DeleteFriendResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } err := imdb.DeleteSingleFriendInfo(req.CommID.FromUserID, req.CommID.ToUserID) if err != nil { log.NewError(req.CommID.OperationID, "DeleteSingleFriendInfo failed", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) - return &pbFriend.CommonResp{ErrCode: constant.ErrMysql.ErrCode, ErrMsg: constant.ErrMysql.ErrMsg}, nil + return &pbFriend.DeleteFriendResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } log.NewInfo(req.CommID.OperationID, "DeleteFriend rpc ok") chat.FriendDeletedNotification(req) - return &pbFriend.CommonResp{}, nil + return &pbFriend.DeleteFriendResp{CommonResp: &pbFriend.CommonResp{}}, nil } func (s *friendServer) GetBlacklist(ctx context.Context, req *pbFriend.GetBlacklistReq) (*pbFriend.GetBlacklistResp, error) { @@ -286,20 +281,20 @@ func (s *friendServer) GetBlacklist(ctx context.Context, req *pbFriend.GetBlackl //Parse token, to find current user information if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { log.NewError(req.CommID.OperationID, "CheckAccess failed", req.CommID.OpUserID, req.CommID.FromUserID) - return &pbFriend.GetBlacklistResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + return &pbFriend.GetBlacklistResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } blackListInfo, err := imdb.GetBlackListByUID(req.CommID.FromUserID) if err != nil { log.NewError(req.CommID.OperationID, "GetBlackListByUID failed ", err.Error(), req.CommID.FromUserID) - return &pbFriend.GetBlacklistResp{ErrCode: constant.ErrGetBlackList.ErrCode, ErrMsg: constant.ErrGetBlackList.ErrMsg}, nil + return &pbFriend.GetBlacklistResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } var ( - userInfoList []*sdk_ws.PublicUserInfo + userInfoList []*sdkws.PublicUserInfo ) for _, blackUser := range blackListInfo { - var blackUserInfo sdk_ws.PublicUserInfo + var blackUserInfo sdkws.PublicUserInfo //Find black user information us, err := imdb.FindUserByUID(blackUser.BlockUserID) if err != nil { @@ -310,49 +305,50 @@ func (s *friendServer) GetBlacklist(ctx context.Context, req *pbFriend.GetBlackl userInfoList = append(userInfoList, &blackUserInfo) } log.NewInfo(req.CommID.OperationID, "rpc GetBlacklist ok") - return &pbFriend.GetBlacklistResp{Data: userInfoList}, nil + return &pbFriend.GetBlacklistResp{BlackUserInfoList: userInfoList}, nil } -func (s *friendServer) SetFriendComment(ctx context.Context, req *pbFriend.SetFriendCommentReq) (*pbFriend.CommonResp, error) { +func (s *friendServer) SetFriendComment(ctx context.Context, req *pbFriend.SetFriendCommentReq) (*pbFriend.SetFriendCommentResp, error) { log.NewInfo(req.CommID.OperationID, "SetFriendComment args ", req.String()) //Parse token, to find current user information if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { log.NewError(req.CommID.OperationID, "CheckAccess false", req.CommID.OpUserID, req.CommID.FromUserID) - return &pbFriend.CommonResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + return &pbFriend.SetFriendCommentResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } err := imdb.UpdateFriendComment(req.CommID.FromUserID, req.CommID.OpUserID, req.Remark) if err != nil { log.NewError(req.CommID.OperationID, "UpdateFriendComment failed ", err.Error(), req.CommID.FromUserID, req.CommID.OpUserID, req.Remark) - return &pbFriend.CommonResp{ErrCode: constant.ErrSetFriendComment.ErrCode, ErrMsg: constant.ErrSetFriendComment.ErrMsg}, nil + return &pbFriend.SetFriendCommentResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } log.NewInfo(req.CommID.OperationID, "rpc SetFriendComment ok") chat.FriendInfoChangedNotification(req) - return &pbFriend.CommonResp{}, nil + return &pbFriend.SetFriendCommentResp{CommonResp: &pbFriend.CommonResp{}}, nil } -func (s *friendServer) RemoveBlacklist(ctx context.Context, req *pbFriend.RemoveBlacklistReq) (*pbFriend.CommonResp, error) { +func (s *friendServer) RemoveBlacklist(ctx context.Context, req *pbFriend.RemoveBlacklistReq) (*pbFriend.RemoveBlacklistResp, error) { log.NewInfo(req.CommID.OperationID, "RemoveBlacklist args ", req.String()) //Parse token, to find current user information if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { log.NewError(req.CommID.OperationID, "CheckAccess false", req.CommID.OpUserID, req.CommID.FromUserID) - return &pbFriend.CommonResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + return &pbFriend.RemoveBlacklistResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } err := imdb.RemoveBlackList(req.CommID.FromUserID, req.CommID.ToUserID) if err != nil { log.NewError(req.CommID.OperationID, "RemoveBlackList failed", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) - return &pbFriend.CommonResp{ErrCode: constant.ErrMysql.ErrCode, ErrMsg: constant.ErrMysql.ErrMsg}, nil + return &pbFriend.RemoveBlacklistResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil + } log.NewInfo(req.CommID.OperationID, "rpc RemoveBlacklist ok") chat.BlackDeletedNotification(req) - return &pbFriend.CommonResp{}, nil + return &pbFriend.RemoveBlacklistResp{CommonResp: &pbFriend.CommonResp{}}, nil } func (s *friendServer) IsInBlackList(ctx context.Context, req *pbFriend.IsInBlackListReq) (*pbFriend.IsInBlackListResp, error) { log.NewInfo("IsInBlackList args ", req.String()) if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { log.NewError(req.CommID.OperationID, "CheckAccess false", req.CommID.OpUserID, req.CommID.FromUserID) - return &pbFriend.IsInBlackListResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + return &pbFriend.IsInBlackListResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } var isInBlacklist = false @@ -366,44 +362,44 @@ func (s *friendServer) IsInBlackList(ctx context.Context, req *pbFriend.IsInBlac func (s *friendServer) IsFriend(ctx context.Context, req *pbFriend.IsFriendReq) (*pbFriend.IsFriendResp, error) { log.NewInfo("IsFriend args ", req.String()) - var isFriend int32 + var isFriend bool if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) - return &pbFriend.IsFriendResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + return &pbFriend.IsFriendResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } _, err := imdb.FindFriendRelationshipFromFriend(req.CommID.FromUserID, req.CommID.ToUserID) if err == nil { - isFriend = constant.FriendFlag + isFriend = true } else { - isFriend = constant.ApplicationFriendFlag + isFriend = false } log.NewInfo("IsFriend rpc ok") - return &pbFriend.IsFriendResp{ShipType: isFriend}, nil + return &pbFriend.IsFriendResp{Response: isFriend}, nil } func (s *friendServer) GetFriendList(ctx context.Context, req *pbFriend.GetFriendListReq) (*pbFriend.GetFriendListResp, error) { log.NewInfo("GetFriendList args ", req.String()) - var userInfoList []*pbFriend.FriendInfo + var userInfoList []*sdkws.FriendInfo //Parse token, to find current user information if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) - return &pbFriend.GetFriendListResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + return &pbFriend.GetFriendListResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } friends, err := imdb.FindUserInfoFromFriend(req.CommID.FromUserID) if err != nil { log.NewError(req.CommID.OperationID, "FindUserInfoFromFriend failed", err.Error(), req.CommID.FromUserID) - return &pbFriend.GetFriendListResp{ErrCode: constant.ErrSearchUserInfo.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil + return &pbFriend.GetFriendListResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } for _, friendUser := range friends { - var friendUserInfo pbFriend.FriendInfo + var friendUserInfo sdkws.FriendInfo //find user is in blackList err = imdb.FindRelationshipFromBlackList(req.CommID.FromUserID, friendUser.FriendUserID) - if err == nil { - friendUserInfo.IsBlack = constant.BlackListFlag - } else { - friendUserInfo.IsBlack = 0 - } + //if err == nil { + // friendUserInfo.IsBlack = constant.BlackListFlag + //} else { + // friendUserInfo.IsBlack = 0 + //} //Find user information us, err := imdb.FindUserByUID(friendUser.FriendUserID) if err != nil { @@ -416,77 +412,57 @@ func (s *friendServer) GetFriendList(ctx context.Context, req *pbFriend.GetFrien friendUserInfo.CreateTime = friendUser.CreateTime userInfoList = append(userInfoList, &friendUserInfo) } - log.NewInfo(req.CommID.OperationID, "rpc GetFriendList ok", pbFriend.GetFriendListResp{Data: userInfoList}) - return &pbFriend.GetFriendListResp{Data: userInfoList}, nil + log.NewInfo(req.CommID.OperationID, "rpc GetFriendList ok", pbFriend.GetFriendListResp{FriendInfoList: userInfoList}) + return &pbFriend.GetFriendListResp{FriendInfoList: userInfoList}, nil } -func (s *friendServer) GetFriendApplyList(ctx context.Context, req *pbFriend.GetFriendApplyReq) (*pbFriend.GetFriendApplyResp, error) { +func (s *friendServer) GetFriendApplyList(ctx context.Context, req *pbFriend.GetFriendApplyListReq) (*pbFriend.GetFriendApplyListResp, error) { log.NewInfo(req.CommID.OperationID, "GetFriendApplyList args ", req.String()) - var appleUserList []*pbFriend.ApplyUserInfo + //Parse token, to find current user information if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) - return &pbFriend.GetFriendApplyResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + return &pbFriend.GetFriendApplyListResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } // Find the current user friend applications received ApplyUsersInfo, err := imdb.FindFriendsApplyFromFriendReq(req.CommID.FromUserID) if err != nil { log.NewError(req.CommID.OperationID, "FindFriendsApplyFromFriendReq ", err.Error(), req.CommID.FromUserID) - return &pbFriend.GetFriendApplyResp{ErrCode: constant.ErrMysql.ErrCode, ErrMsg: constant.ErrMysql.ErrMsg}, nil + return &pbFriend.GetFriendApplyListResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } + var appleUserList []*sdkws.FriendRequest for _, applyUserInfo := range ApplyUsersInfo { - var userInfo pbFriend.ApplyUserInfo - //Find friend application status - userInfo.Flag = applyUserInfo.Flag - userInfo.ReqMessage = applyUserInfo.ReqMessage - userInfo.ApplyTime = applyUserInfo.CreateTime - - //Find user information - us, err := imdb.FindUserByUID(applyUserInfo.ReqID) - if err != nil { - log.NewError(req.CommID.OperationID, "FindUserByUID failed ", err.Error(), applyUserInfo.ReqID) - continue - } - utils.CopyStructFields(userInfo.UserInfo, us) + var userInfo sdkws.FriendRequest + utils.CopyStructFields(&userInfo, applyUserInfo) appleUserList = append(appleUserList, &userInfo) } - log.NewInfo(req.CommID.OperationID, "rpc GetFriendApplyList ok", pbFriend.GetFriendApplyResp{Data: appleUserList}) - return &pbFriend.GetFriendApplyResp{Data: appleUserList}, nil + log.NewInfo(req.CommID.OperationID, "rpc GetFriendApplyList ok", pbFriend.GetFriendApplyListResp{FriendRequestList: appleUserList}) + return &pbFriend.GetFriendApplyListResp{FriendRequestList: appleUserList}, nil } -func (s *friendServer) GetSelfApplyList(ctx context.Context, req *pbFriend.GetFriendApplyReq) (*pbFriend.GetFriendApplyResp, error) { +func (s *friendServer) GetSelfApplyList(ctx context.Context, req *pbFriend.GetSelfApplyListReq) (*pbFriend.GetSelfApplyListResp, error) { log.NewInfo(req.CommID.OperationID, "GetSelfApplyList args ", req.String()) - var selfApplyOtherUserList []*pbFriend.ApplyUserInfo + var selfApplyOtherUserList []*sdkws.FriendRequest //Parse token, to find current user information if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) - return &pbFriend.GetFriendApplyResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + return &pbFriend.GetSelfApplyListResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } // Find the self add other userinfo usersInfo, err := imdb.FindSelfApplyFromFriendReq(req.CommID.FromUserID) if err != nil { log.NewError(req.CommID.OperationID, "FindSelfApplyFromFriendReq failed ", err.Error(), req.CommID.FromUserID) - return &pbFriend.GetFriendApplyResp{ErrCode: constant.ErrMysql.ErrCode, ErrMsg: constant.ErrMysql.ErrMsg}, nil + return &pbFriend.GetSelfApplyListResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } for _, selfApplyOtherUserInfo := range usersInfo { - var userInfo pbFriend.ApplyUserInfo - //Find friend application status - userInfo.Flag = selfApplyOtherUserInfo.Flag - userInfo.ReqMessage = selfApplyOtherUserInfo.ReqMessage - userInfo.ApplyTime = selfApplyOtherUserInfo.CreateTime - //Find user information - us, err := imdb.FindUserByUID(selfApplyOtherUserInfo.UserID) - if err != nil { - log.NewError(req.CommID.OperationID, "FindUserByUID failed", err.Error(), selfApplyOtherUserInfo.UserID) - continue - } - utils.CopyStructFields(userInfo.UserInfo, us) + var userInfo sdkws.FriendRequest // pbFriend.ApplyUserInfo + utils.CopyStructFields(&userInfo, selfApplyOtherUserInfo) selfApplyOtherUserList = append(selfApplyOtherUserList, &userInfo) } - log.NewInfo(req.CommID.OperationID, "rpc GetSelfApplyList ok", pbFriend.GetFriendApplyResp{Data: selfApplyOtherUserList}) - return &pbFriend.GetFriendApplyResp{Data: selfApplyOtherUserList}, nil + log.NewInfo(req.CommID.OperationID, "rpc GetSelfApplyList ok", pbFriend.GetSelfApplyListResp{FriendRequestList: selfApplyOtherUserList}) + return &pbFriend.GetSelfApplyListResp{FriendRequestList: selfApplyOtherUserList}, nil } diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index cd2ce23df..db04d91f7 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -71,36 +71,36 @@ func (s *groupServer) Run() { func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupReq) (*pbGroup.CreateGroupResp, error) { log.NewInfo(req.OperationID, "CreateGroup, args ", req.String()) - if !token_verify.CheckAccess(req.OpUserID, req.FromUserID) { - log.NewError(req.OperationID, "CheckAccess false ", req.OpUserID, req.FromUserID) - return &pbGroup.CreateGroupResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + if !token_verify.CheckAccess(req.OpUserID, req.OwnerUserID) { + log.NewError(req.OperationID, "CheckAccess false ", req.OpUserID, req.OwnerUserID) + return &pbGroup.CreateGroupResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } var okUserIDList []string //Time stamp + MD5 to generate group chat id groupId := utils.Md5(strconv.FormatInt(time.Now().UnixNano(), 10)) //to group - err := im_mysql_model.InsertIntoGroup(groupId, req.GroupName, req.Introduction, req.Notification, req.FaceUrl, req.Ext) + err := im_mysql_model.InsertIntoGroup(groupId, req.GroupInfo.GroupName, req.GroupInfo.Introduction, req.GroupInfo.Notification, req.GroupInfo.FaceUrl, req.GroupInfo.Ex, req.GroupInfo.GroupType) if err != nil { - log.NewError(req.OperationID, "InsertIntoGroup failed, ", err.Error(), groupId, req.GroupName, req.Introduction, req.Notification, req.FaceUrl, req.Ext) - return &pbGroup.CreateGroupResp{ErrCode: constant.ErrCreateGroup.ErrCode, ErrMsg: constant.ErrCreateGroup.ErrMsg}, nil + log.NewError(req.OperationID, "InsertIntoGroup failed, ", err.Error(), groupId, req.GroupInfo.GroupName, req.GroupInfo.Introduction, req.GroupInfo.Notification, req.GroupInfo.FaceUrl, req.GroupInfo.Ex, req.GroupInfo.GroupType) + return &pbGroup.CreateGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } - us, err := im_mysql_model.FindUserByUID(req.FromUserID) + us, err := im_mysql_model.FindUserByUID(req.OwnerUserID) if err != nil { - log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.FromUserID) - return &pbGroup.CreateGroupResp{ErrCode: constant.ErrCreateGroup.ErrCode, ErrMsg: constant.ErrCreateGroup.ErrMsg}, nil + log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.OwnerUserID) + return &pbGroup.CreateGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } //to group member err = im_mysql_model.InsertIntoGroupMember(groupId, us.UserID, us.Nickname, us.FaceUrl, constant.GroupOwner) if err != nil { log.NewError(req.OperationID, "InsertIntoGroupMember failed ", err.Error()) - return &pbGroup.CreateGroupResp{ErrCode: constant.ErrCreateGroup.ErrCode, ErrMsg: constant.ErrCreateGroup.ErrMsg}, nil + return &pbGroup.CreateGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } - err = db.DB.AddGroupMember(groupId, req.FromUserID) + err = db.DB.AddGroupMember(groupId, req.OwnerUserID) if err != nil { - log.NewError(req.OperationID, "AddGroupMember failed ", err.Error(), groupId, req.FromUserID) + log.NewError(req.OperationID, "AddGroupMember failed ", err.Error(), groupId, req.OwnerUserID) // return &pbGroup.CreateGroupResp{ErrCode: constant.ErrCreateGroup.ErrCode, ErrMsg: constant.ErrCreateGroup.ErrMsg}, nil } @@ -111,13 +111,13 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), user.UserID) continue } - if user.Role == 1 { + if user.RoleLevel == 1 { log.NewError(req.OperationID, "only one owner, failed ", user) continue } - err = im_mysql_model.InsertIntoGroupMember(groupId, user.UserID, us.Nickname, us.FaceUrl, user.Role) + err = im_mysql_model.InsertIntoGroupMember(groupId, user.UserID, us.Nickname, us.FaceUrl, user.RoleLevel) if err != nil { - log.NewError(req.OperationID, "InsertIntoGroupMember failed ", groupId, user.UserID, us.Nickname, us.FaceUrl, user.Role) + log.NewError(req.OperationID, "InsertIntoGroupMember failed ", groupId, user.UserID, us.Nickname, us.FaceUrl, user.RoleLevel) } okUserIDList = append(okUserIDList, user.UserID) err = db.DB.AddGroupMember(groupId, user.UserID) @@ -130,11 +130,11 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR group, err := im_mysql_model.FindGroupInfoByGroupId(groupId) if err != nil { log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", err.Error(), groupId) - resp.ErrCode = constant.ErrCreateGroup.ErrCode - resp.ErrMsg = constant.ErrCreateGroup.ErrMsg + resp.ErrCode = constant.ErrDB.ErrCode + resp.ErrMsg = constant.ErrDB.ErrMsg return resp, nil } - chat.GroupCreatedNotification(req.OperationID, req.OpUserID, req.FromUserID, groupId, okUserIDList) + chat.GroupCreatedNotification(req.OperationID, req.OpUserID, req.OwnerUserID, groupId, okUserIDList) utils.CopyStructFields(resp.GroupInfo, group) log.NewInfo(req.OperationID, "rpc CreateGroup return ", resp.String()) return resp, nil @@ -144,14 +144,14 @@ func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJo log.NewInfo(req.OperationID, "GetJoinedGroupList, args ", req.String()) if !token_verify.CheckAccess(req.OpUserID, req.FromUserID) { log.NewError(req.OperationID, "CheckAccess false ", req.OpUserID, req.FromUserID) - return &pbGroup.GetJoinedGroupListResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + return &pbGroup.GetJoinedGroupListResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } //group list joinedGroupList, err := imdb.GetJoinedGroupIdListByMemberId(req.FromUserID) if err != nil { log.NewError(req.OperationID, "GetJoinedGroupIdListByMemberId failed ", err.Error(), req.FromUserID) - return &pbGroup.GetJoinedGroupListResp{ErrCode: constant.ErrParam.ErrCode, ErrMsg: constant.ErrParam.ErrMsg}, nil + return &pbGroup.GetJoinedGroupListResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } var resp pbGroup.GetJoinedGroupListResp @@ -163,7 +163,6 @@ func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJo if num > 0 && owner != nil && err2 == nil && group != nil && err == nil { utils.CopyStructFields(&groupNode, group) groupNode.CreateTime = group.CreateTime - utils.CopyStructFields(groupNode.Owner, owner) groupNode.MemberCount = uint32(num) resp.GroupList = append(resp.GroupList, &groupNode) } else { @@ -241,8 +240,8 @@ func (s *groupServer) GetGroupAllMember(ctx context.Context, req *pbGroup.GetGro resp.ErrCode = 0 memberList, err := imdb.FindGroupMemberListByGroupId(req.GroupID) if err != nil { - resp.ErrCode = constant.ErrDb.ErrCode - resp.ErrMsg = constant.ErrDb.ErrMsg + resp.ErrCode = constant.ErrDB.ErrCode + resp.ErrMsg = constant.ErrDB.ErrMsg log.NewError(req.OperationID, "FindGroupMemberListByGroupId failed,", err.Error(), req.GroupID) return &resp, nil } @@ -273,7 +272,7 @@ func (s *groupServer) GetGroupMemberList(ctx context.Context, req *pbGroup.GetGr resp.ErrCode = 0 memberList, err := imdb.GetGroupMemberByGroupId(req.GroupID, req.Filter, req.NextSeq, 30) if err != nil { - resp.ErrCode = constant.ErrDb.ErrCode + resp.ErrCode = constant.ErrDB.ErrCode resp.ErrMsg = err.Error() log.NewError(req.OperationID, "GetGroupMemberByGroupId failed,", req.GroupID, req.Filter, req.NextSeq, 30) return &resp, nil @@ -301,7 +300,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou ownerList, err := imdb.GetOwnerManagerByGroupId(req.GroupID) if err != nil { log.NewError(req.OperationID, "GetOwnerManagerByGroupId failed ", err.Error(), req.GroupID) - return &pbGroup.KickGroupMemberResp{ErrCode: constant.ErrParam.ErrCode, ErrMsg: constant.ErrParam.ErrMsg}, nil + return &pbGroup.KickGroupMemberResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } //op is group owner? var flag = 0 @@ -328,7 +327,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou if len(req.KickedUserIDList) == 0 { log.NewError(req.OperationID, "failed, kick list 0") - return &pbGroup.KickGroupMemberResp{ErrCode: constant.ErrParam.ErrCode, ErrMsg: constant.ErrParam.ErrMsg}, nil + return &pbGroup.KickGroupMemberResp{ErrCode: constant.ErrArgs.ErrCode, ErrMsg: constant.ErrArgs.ErrMsg}, nil } groupOwnerUserID := "" @@ -422,12 +421,12 @@ func (s *groupServer) GetGroupsInfo(ctx context.Context, req *pbGroup.GetGroupsI return &resp, nil } -func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.GroupApplicationResponseReq) (*pbGroup.CommonResp, error) { +func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.GroupApplicationResponseReq) (*pbGroup.GroupApplicationResponseResp, error) { log.NewInfo(req.OperationID, "GroupApplicationResponse args ", req.String()) reply, err := imdb.GroupApplicationResponse(req) if err != nil { log.NewError(req.OperationID, "GroupApplicationResponse failed ", err.Error(), req.String()) - return &pbGroup.CommonResp{ErrCode: 702, ErrMsg: err.Error()}, nil + return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{ErrCode: 702, ErrMsg: err.Error()}}, nil } if req.HandleResult == 1 { @@ -471,13 +470,13 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.G return reply, nil } -func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) (*pbGroup.CommonResp, error) { +func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) (*pbGroup.JoinGroupResp, error) { log.NewInfo(req.OperationID, "JoinGroup args ", req.String()) applicationUserInfo, err := im_mysql_model.FindUserByUID(req.OpUserID) if err != nil { log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.OpUserID) - return &pbGroup.CommonResp{ErrCode: constant.ErrSearchUserInfo.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil + return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } _, err = im_mysql_model.FindGroupRequestUserInfoByGroupIDAndUid(req.GroupID, req.OpUserID) @@ -487,34 +486,34 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) if err = im_mysql_model.InsertIntoGroupRequest(req.GroupID, req.OpUserID, "0", req.ReqMessage, applicationUserInfo.Nickname, applicationUserInfo.FaceUrl); err != nil { log.NewError(req.OperationID, "InsertIntoGroupRequest ", err.Error(), req.GroupID, req.OpUserID, "0", req.ReqMessage, applicationUserInfo.Nickname, applicationUserInfo.FaceUrl) - return &pbGroup.CommonResp{ErrCode: constant.ErrJoinGroupApplication.ErrCode, ErrMsg: constant.ErrJoinGroupApplication.ErrMsg}, nil + return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } memberList, err := im_mysql_model.FindGroupMemberListByGroupIdAndFilterInfo(req.GroupID, constant.GroupOwner) if len(memberList) == 0 { log.NewError(req.OperationID, "FindGroupMemberListByGroupIdAndFilterInfo failed ", req.GroupID, constant.GroupOwner, err) - return &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}, nil + return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}, nil } chat.JoinApplicationNotification(req) log.NewInfo(req.OperationID, "ReceiveJoinApplicationNotification rpc return ") - return &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}, nil + return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}, nil } -func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq) (*pbGroup.CommonResp, error) { +func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq) (*pbGroup.QuitGroupResp, error) { log.NewError("QuitGroup args ", req.String()) _, err := im_mysql_model.FindGroupMemberInfoByGroupIdAndUserId(req.GroupID, req.OpUserID) if err != nil { log.NewError(req.OperationID, "FindGroupMemberInfoByGroupIdAndUserId failed", err.Error(), req.GroupID, req.OpUserID) - return &pbGroup.CommonResp{ErrCode: constant.ErrQuitGroup.ErrCode, ErrMsg: constant.ErrQuitGroup.ErrMsg}, nil + return &pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } err = im_mysql_model.DeleteGroupMemberByGroupIdAndUserId(req.GroupID, req.OpUserID) if err != nil { log.NewError(req.OperationID, "DeleteGroupMemberByGroupIdAndUserId failed ", err.Error(), req.GroupID, req.OpUserID) - return &pbGroup.CommonResp{ErrCode: constant.ErrQuitGroup.ErrCode, ErrMsg: constant.ErrQuitGroup.ErrMsg}, nil + return &pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } err = db.DB.DelGroupMember(req.GroupID, req.OpUserID) @@ -525,7 +524,7 @@ func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq) chat.MemberLeaveNotification(req) log.NewInfo(req.OperationID, "rpc QuitGroup return ") - return &pbGroup.CommonResp{}, nil + return &pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}, nil } func hasAccess(req *pbGroup.SetGroupInfoReq) bool { @@ -543,17 +542,17 @@ func hasAccess(req *pbGroup.SetGroupInfoReq) bool { } } -func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInfoReq) (*pbGroup.CommonResp, error) { +func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInfoReq) (*pbGroup.SetGroupInfoResp, error) { log.NewInfo(req.OperationID, "SetGroupInfo args ", req.String()) if !hasAccess(req) { log.NewError(req.OperationID, "no access ") - return &pbGroup.CommonResp{ErrCode: constant.ErrSetGroupInfo.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil + return &pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } group, err := im_mysql_model.FindGroupInfoByGroupId(req.GroupInfo.GroupID) if err != nil { log.NewError(req.OperationID, "FindGroupInfoByGroupId failed, ", err.Error(), req.GroupInfo.GroupID) - return &pbGroup.CommonResp{ErrCode: constant.ErrSetGroupInfo.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil + return &pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } ////bitwise operators: 0001:groupName; 0010:Notification 0100:Introduction; 1000:FaceUrl; 10000:owner @@ -572,7 +571,7 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf } //only administrators can set group information if err = im_mysql_model.SetGroupInfo(req.GroupInfo.GroupID, req.GroupInfo.GroupName, req.GroupInfo.Introduction, req.GroupInfo.Notification, req.GroupInfo.FaceUrl, ""); err != nil { - return &pbGroup.CommonResp{ErrCode: constant.ErrSetGroupInfo.ErrCode, ErrMsg: constant.ErrSetGroupInfo.ErrMsg}, nil + return &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } if changedType != 0 { @@ -582,13 +581,13 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf return &pbGroup.CommonResp{}, nil } -func (s *groupServer) TransferGroupOwner(_ context.Context, req *pbGroup.TransferGroupOwnerReq) (*pbGroup.CommonResp, error) { +func (s *groupServer) TransferGroupOwner(_ context.Context, req *pbGroup.TransferGroupOwnerReq) (*pbGroup.TransferGroupOwnerResp, error) { log.NewInfo(req.OperationID, "TransferGroupOwner ", req.String()) reply, err := im_mysql_model.TransferGroupOwner(req) if err != nil { log.NewError("TransferGroupOwner ", req.String()) - return &pbGroup.CommonResp{ErrCode: constant.ErrDb.ErrCode, ErrMsg: constant.ErrDb.ErrMsg}, nil + return &pbGroup.TransferGroupOwnerResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } changedType := int32(1) << 4 chat.GroupInfoChangedNotification(req.OperationID, req.OpUserID, req.GroupID, changedType) diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go new file mode 100644 index 000000000..3b20185d8 --- /dev/null +++ b/pkg/base_info/friend_api_struct.go @@ -0,0 +1,155 @@ +package base_info + +import open_im_sdk "Open_IM/pkg/proto/sdk_ws" + +open_im_sdk "Open_IM/pkg/proto/sdk_ws" + +type paramsCommFriend struct { + OperationID string `json:"operationID" binding:"required"` + ToUserID string `json:"toUserID" binding:"required"` + FromUserID string `json:"fromUserID" binding:"required"` +} + + + +type AddBlacklistReq struct { + paramsCommFriend +} +type AddBlacklistResp struct { + CommResp +} + + + +type ImportFriendReq struct { + FriendUserIDList []string `json:"friendUserIDList" binding:"required"` + OperationID string `json:"operationID" binding:"required"` + FromUserID string `json:"fromUserID" binding:"required"` +} +type ImportFriendResp struct { + CommResp + Data []string `json:"data"` +} + + +type AddFriendReq struct { + paramsCommFriend + ReqMsg string `json:"reqMsg"` +} +type AddFriendResp struct { + CommResp +} + + +type AddFriendResponseReq struct { + paramsCommFriend + Flag int32 `json:"flag" binding:"required"` + HandleMsg string `json:"handleMsg"` +} +type AddFriendResponseResp struct { + CommResp +} + + + +type DeleteFriendReq struct { + paramsCommFriend +} +type DeleteFriendResp struct { + CommResp +} + + + +type GetBlackListReq struct { + paramsCommFriend +} +type GetBlackListResp struct { + CommResp + BlackUserInfoList []*blackUserInfo `json:"data"` +} + + +//type PublicUserInfo struct { +// UserID string `json:"userID"` +// Nickname string `json:"nickname"` +// FaceUrl string `json:"faceUrl"` +// Gender int32 `json:"gender"` +//} + +type blackUserInfo struct { + open_im_sdk.PublicUserInfo +} + + +type SetFriendCommentReq struct { + paramsCommFriend + Remark string `json:"remark" binding:"required"` +} +type SetFriendCommentResp struct { + CommResp +} + + +type RemoveBlackListReq struct { + paramsCommFriend +} +type RemoveBlackListResp struct { + CommResp +} + +type IsFriendReq struct { + paramsCommFriend +} +type IsFriendResp struct { + CommResp + Response bool `json:"response"` +} + + +type GetFriendsInfoReq struct { + paramsCommFriend +} +type GetFriendsInfoResp struct { + CommResp + FriendInfoList []*open_im_sdk.FriendInfo `json:"data"` +} + +type GetFriendListReq struct { + paramsCommFriend +} +type GetFriendListResp struct { + CommResp + FriendInfoList []*open_im_sdk.FriendInfo `json:"data"` +} + + + + + +type GetFriendApplyListReq struct { + paramsCommFriend +} +type GetFriendApplyListResp struct { + CommResp + FriendRequestList open_im_sdk.FriendRequest `json:"data"` +} + +type GetSelfApplyListReq struct { + paramsCommFriend +} +type GetSelfApplyListResp struct { + CommResp + FriendRequestList open_im_sdk.FriendRequest `json:"data"` +} + + + + + + + + + + + diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go new file mode 100644 index 000000000..726a9c24a --- /dev/null +++ b/pkg/base_info/group_api_struct.go @@ -0,0 +1,153 @@ +package base_info + +import ( + pb "Open_IM/pkg/proto/group" + open_im_sdk "Open_IM/pkg/proto/sdk_ws" +) + +type CommResp struct { + ErrCode int32 `json:"errCode"` + ErrMsg string `json:"errMsg"` +} +type Id2Result struct { + UserID string `json:"userID"` + Result int32 `json:"result"` +} + +type KickGroupMemberReq struct { + GroupID string `json:"groupID" binding:"required"` + KickedUserIDList []string `json:"kickedUserIDList" binding:"required"` + Reason string `json:"reason"` + OperationID string `json:"operationID" binding:"required"` +} +type KickGroupMemberResp struct { + CommResp + Data []*Id2Result `json:"data"` +} + +type GetGroupMembersInfoReq struct { + GroupID string `json:"groupID" binding:"required"` + MemberList []string `json:"memberList" binding:"required"` + OperationID string `json:"operationID" binding:"required"` +} +type GetGroupMembersInfoResp struct { + CommResp + Data []*open_im_sdk.GroupMemberFullInfo `json:"data"` +} + +type InviteUserToGroupReq struct { + GroupID string `json:"groupID" binding:"required"` + InvitedUserIDList []string `json:"uidList" binding:"required"` + Reason string `json:"reason"` + OperationID string `json:"operationID" binding:"required"` +} +type InviteUserToGroupResp struct { + CommResp + Data []Id2Result `json:"data"` +} + +type GetJoinedGroupListReq struct { + OperationID string `json:"operationID" binding:"required"` + FromUserID string `json:"fromUserID" binding:"required"` +} +type GetJoinedGroupListResp struct { + CommResp + Data []*open_im_sdk.GroupInfo `json:"data"` +} + +type GetGroupMemberListReq struct { + GroupID string `json:"groupID"` + Filter int32 `json:"filter"` + NextSeq int32 `json:"nextSeq"` + OperationID string `json:"operationID"` +} +type GetGroupMemberListResp struct { + CommResp + NextSeq int32 `json:"nextSeq"` + Data []*open_im_sdk.GroupMemberFullInfo `json:"data"` +} + +type GetGroupAllMemberReq struct { + GroupID string `json:"groupID"` + OperationID string `json:"operationID"` +} +type GetGroupAllMemberResp struct { + CommResp + Data []*open_im_sdk.GroupMemberFullInfo `json:"data"` +} + +type CreateGroupReq struct { + MemberList []*pb.GroupAddMemberInfo `json:"memberList"` + GroupName string `json:"groupName"` + Introduction string `json:"introduction"` + Notification string `json:"notification"` + FaceUrl string `json:"faceUrl"` + OperationID string `json:"operationID" binding:"required"` + GroupType int32 `json:"groupType"` + Ex string `json:"ex"` +} +type CreateGroupResp struct { + CommResp + Data open_im_sdk.GroupInfo `json:"data"` +} + +type GetGroupApplicationListReq struct { + OperationID string `json:"operationID" binding:"required"` + FromUserID string `json:"fromUserID" binding:"required"` //my application +} +type GetGroupApplicationListResp struct { + CommResp + Data []*open_im_sdk.GroupRequest `json:"data"` +} + +type GetGroupInfoReq struct { + GroupIDList []string `json:"groupIDList" binding:"required"` + OperationID string `json:"operationID" binding:"required"` +} +type GetGroupInfoResp struct { + CommResp + Data []open_im_sdk.GroupInfo `json:"data"` +} + +type ApplicationGroupResponseReq struct { + OperationID string `json:"groupIDList" binding:"required"` + GroupID string `json:"groupIDList" binding:"required"` + FromUserID string `json:"groupIDList" binding:"required"` + HandledMsg string `json:"groupIDList" binding:"required"` + HandleResult int32 `json:"groupIDList" binding:"required"` +} +type ApplicationGroupResponseResp struct { + CommResp +} + +type JoinGroupReq struct { + GroupID string `json:"groupID"` + ReqMessage string `json:"reqMessage"` + OperationID string `json:"operationID"` +} +type JoinGroupResp struct { + CommResp +} + +type QuitGroupReq struct { + GroupID string `json:"groupID" binding:"required"` + OperationID string `json:"operationID" binding:"required"` +} +type QuitGroupResp struct { + CommResp +} + +type SetGroupInfoReq struct { + open_im_sdk.GroupInfo + OperationID string `json:"operationID" binding:"required"` +} +type SetGroupInfoResp struct { + CommResp +} + +type TransferGroupOwnerReq struct { + GroupID string `json:"groupID" binding:"required"` + OldOwnerUserID string `json:"oldOwnerUserID" binding:"required"` + NewOwnerUserID string `json:"newOwnerUserID" binding:"required"` + OperationID string `json:"operationID" binding:"required"` +} diff --git a/pkg/base_info/public_struct.go b/pkg/base_info/public_struct.go new file mode 100644 index 000000000..3669518e7 --- /dev/null +++ b/pkg/base_info/public_struct.go @@ -0,0 +1,95 @@ +//package base_info +// +//type GroupInfo struct { +// GroupID string `json:"groupID"` +// GroupName string `json:"groupName"` +// Notification string `json:"notification"` +// Introduction string `json:"introduction"` +// FaceUrl string `json:"faceUrl"` +// OperationID string `json:"operationID"` +// OwnerUserID string `json:"ownerUserID"` +// CreateTime int64 `json:"createTime"` +// MemberCount uint32 `json:"memberCount"` +// Ex string `json:"ex"` +// Status int32 `json:"status"` +// CreatorUserID string `json:"creatorUserID"` +// GroupType int32 `json:"groupType"` +//} +// +//type GroupMemberFullInfo struct { +// GroupID string `json:"groupID"` +// UserID string `json:"userID"` +// RoleLevel int32 `json:"roleLevel"` +// JoinTime uint64 `json:"joinTime"` +// Nickname string `json:"nickname"` +// FaceUrl string `json:"faceUrl"` +// FriendRemark string `json:"friendRemark"` +// AppMangerLevel int32 `json:"appMangerLevel"` +// JoinSource int32 `json:"joinSource"` +// OperatorUserID string `json:"operatorUserID"` +// Ex string `json:"ex"` +//} +// +//type PublicUserInfo struct { +// UserID string `json:"userID"` +// Nickname string `json:"nickname"` +// FaceUrl string `json:"faceUrl"` +// Gender int32 `json:"gender"` +//} +// +//type UserInfo struct { +// UserID string `json:"userID"` +// Nickname string `json:"nickname"` +// FaceUrl string `json:"faceUrl"` +// Gender int32 `json:"gender"` +// Mobile string `json:"mobile"` +// Birth string `json:"birth"` +// Email string `json:"email"` +// Ex string `json:"ex"` +//} +// +//type FriendInfo struct { +// OwnerUserID string `json:"ownerUserID"` +// Remark string `json:"remark"` +// CreateTime int64 `json:"createTime"` +// FriendUser UserInfo `json:"friendUser"` +// AddSource int32 `json:"addSource"` +// OperatorUserID string `json:"operatorUserID"` +// Ex string `json:"ex"` +//} +// +//type BlackInfo struct { +// OwnerUserID string `json:"ownerUserID"` +// CreateTime int64 `json:"createTime"` +// BlackUser PublicUserInfo `json:"friendUser"` +// AddSource int32 `json:"addSource"` +// OperatorUserID string `json:"operatorUserID"` +// Ex string `json:"ex"` +//} +// +//type GroupRequest struct { +// UserID string `json:"userID"` +// GroupID string `json:"groupID"` +// HandleResult string `json:"handleResult"` +// ReqMsg string `json:"reqMsg"` +// HandleMsg string `json:"handleMsg"` +// ReqTime int64 `json:"reqTime"` +// HandleUserID string `json:"handleUserID"` +// HandleTime int64 `json:"handleTime"` +// Ex string `json:"ex"` +//} +// +//type FriendRequest struct { +// FromUserID string `json:"fromUserID"` +// ToUserID string `json:"toUserID"` +// HandleResult int32 `json:"handleResult"` +// ReqMessage string `json:"reqMessage"` +// CreateTime int64 `json:"createTime"` +// HandlerUserID string `json:"handlerUserID"` +// HandleMsg string `json:"handleMsg"` +// HandleTime int64 `json:"handleTime"` +// Ex string `json:"ex"` +//} +// +// +// diff --git a/pkg/common/constant/error.go b/pkg/common/constant/error.go index 7541a784e..6df403140 100644 --- a/pkg/common/constant/error.go +++ b/pkg/common/constant/error.go @@ -11,53 +11,60 @@ type ErrInfo struct { var ( OK = ErrInfo{0, ""} - ErrMysql = ErrInfo{100, ""} - ErrMongo = ErrInfo{110, ""} - ErrRedis = ErrInfo{120, ""} - ErrParseToken = ErrInfo{200, "Parse token failed"} - ErrCreateToken = ErrInfo{201, "Create token failed"} - ErrAppServerKey = ErrInfo{300, "key error"} - ErrTencentCredential = ErrInfo{400, ""} + // ErrMysql = ErrInfo{100, ""} + // ErrMongo = ErrInfo{110, ""} + // ErrRedis = ErrInfo{120, ""} + ErrParseToken = ErrInfo{200, ParseTokenMsg.Error()} + // ErrCreateToken = ErrInfo{201, "Create token failed"} + // ErrAppServerKey = ErrInfo{300, "key error"} + ErrTencentCredential = ErrInfo{400, ThirdPartyMsg.Error()} - ErrorUserRegister = ErrInfo{600, "User registration failed"} - ErrAccountExists = ErrInfo{601, "The account is already registered and cannot be registered again"} - ErrUserPassword = ErrInfo{602, "User password error"} - ErrRefreshToken = ErrInfo{605, "Failed to refresh token"} - ErrAddFriend = ErrInfo{606, "Failed to add friends"} - ErrAgreeToAddFriend = ErrInfo{607, "Failed to agree application"} - ErrAddFriendToBlack = ErrInfo{608, "Failed to add friends to the blacklist"} - ErrGetBlackList = ErrInfo{609, "Failed to get blacklist"} - ErrDeleteFriend = ErrInfo{610, "Failed to delete friend"} - ErrGetFriendApplyList = ErrInfo{611, "Failed to get friend application list"} - ErrGetFriendList = ErrInfo{612, "Failed to get friend list"} - ErrRemoveBlackList = ErrInfo{613, "Failed to remove blacklist"} - ErrSearchUserInfo = ErrInfo{614, "Can't find the user information"} - ErrDelAppleDeviceToken = ErrInfo{615, ""} - ErrModifyUserInfo = ErrInfo{616, "update user some attribute failed"} - ErrSetFriendComment = ErrInfo{617, "set friend comment failed"} - ErrSearchUserInfoFromTheGroup = ErrInfo{618, "There is no such group or the user not in the group"} - ErrCreateGroup = ErrInfo{619, "create group chat failed"} - ErrJoinGroupApplication = ErrInfo{620, "Failed to apply to join the group"} - ErrQuitGroup = ErrInfo{621, "Failed to quit the group"} - ErrSetGroupInfo = ErrInfo{622, "Failed to set group info"} - ErrParam = ErrInfo{700, "param failed"} - ErrTokenExpired = ErrInfo{701, TokenExpired.Error()} - ErrTokenInvalid = ErrInfo{702, TokenInvalid.Error()} - ErrTokenMalformed = ErrInfo{703, TokenMalformed.Error()} - ErrTokenNotValidYet = ErrInfo{704, TokenNotValidYet.Error()} - ErrTokenUnknown = ErrInfo{705, TokenUnknown.Error()} + // ErrorUserRegister = ErrInfo{600, "User registration failed"} + // ErrAccountExists = ErrInfo{601, "The account is already registered and cannot be registered again"} + // ErrUserPassword = ErrInfo{602, "User password error"} + // ErrRefreshToken = ErrInfo{605, "Failed to refresh token"} + // ErrAddFriend = ErrInfo{606, "Failed to add friends"} + // ErrAgreeToAddFriend = ErrInfo{607, "Failed to agree application"} + // ErrAddFriendToBlack = ErrInfo{608, "Failed to add friends to the blacklist"} + // ErrGetBlackList = ErrInfo{609, "Failed to get blacklist"} + // ErrDeleteFriend = ErrInfo{610, "Failed to delete friend"} + // ErrGetFriendApplyList = ErrInfo{611, "Failed to get friend application list"} + // ErrGetFriendList = ErrInfo{612, "Failed to get friend list"} + // ErrRemoveBlackList = ErrInfo{613, "Failed to remove blacklist"} + // ErrSearchUserInfo = ErrInfo{614, "Can't find the user information"} + // ErrDelAppleDeviceToken = ErrInfo{615, ""} + // ErrModifyUserInfo = ErrInfo{616, "update user some attribute failed"} + // ErrSetFriendComment = ErrInfo{617, "set friend comment failed"} + // ErrSearchUserInfoFromTheGroup = ErrInfo{618, "There is no such group or the user not in the group"} + // ErrCreateGroup = ErrInfo{619, "create group chat failed"} + // ErrJoinGroupApplication = ErrInfo{620, "Failed to apply to join the group"} + // ErrQuitGroup = ErrInfo{621, "Failed to quit the group"} + // ErrSetGroupInfo = ErrInfo{622, "Failed to set group info"} + // ErrParam = ErrInfo{700, "param failed"} + ErrTokenExpired = ErrInfo{701, TokenExpiredMsg.Error()} + ErrTokenInvalid = ErrInfo{702, TokenInvalidMsg.Error()} + ErrTokenMalformed = ErrInfo{703, TokenMalformedMsg.Error()} + ErrTokenNotValidYet = ErrInfo{704, TokenNotValidYetMsg.Error()} + ErrTokenUnknown = ErrInfo{705, TokenUnknownMsg.Error()} - ErrAccess = ErrInfo{ErrCode: 800, ErrMsg: "no permission"} - - ErrDb = ErrInfo{ErrCode: 900, ErrMsg: "db failed"} + ErrAccess = ErrInfo{ErrCode: 801, ErrMsg: AccessMsg.Error()} + ErrDB = ErrInfo{ErrCode: 802, ErrMsg: DBMsg.Error()} + ErrArgs = ErrInfo{ErrCode: 8003, ErrMsg: ArgsMsg.Error()} ) var ( - TokenExpired = errors.New("token is timed out, please log in again") - TokenInvalid = errors.New("token has been invalidated") - TokenNotValidYet = errors.New("token not active yet") - TokenMalformed = errors.New("that's not even a token") - TokenUnknown = errors.New("couldn't handle this token") + ParseTokenMsg = errors.New("parse token failed") + TokenExpiredMsg = errors.New("token is timed out, please log in again") + TokenInvalidMsg = errors.New("token has been invalidated") + TokenNotValidYetMsg = errors.New("token not active yet") + TokenMalformedMsg = errors.New("that's not even a token") + TokenUnknownMsg = errors.New("couldn't handle this token") + + AccessMsg = errors.New("no permission") + DBMsg = errors.New("db failed") + ArgsMsg = errors.New("args failed") + + ThirdPartyMsg = errors.New("third party error") ) const ( @@ -67,7 +74,7 @@ const ( LogicalError = 10003 ServerError = 10004 HttpError = 10005 - IoErrot = 10006 + IoError = 10006 IntentionalError = 10007 ) diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_model.go b/pkg/common/db/mysql_model/im_mysql_model/friend_model.go index 8eefd1c63..6f5c5060e 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_model.go @@ -6,17 +6,13 @@ import ( "time" ) -func InsertToFriend(ownerId, friendId string, flag int32) error { +func InsertToFriend(toInsertFollow *Friend) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - toInsertFollow := Friend{ - OwnerUserID: ownerId, - FriendUserID: friendId, - FriendFlag: flag, - CreateTime: time.Now(), - } + toInsertFollow.CreateTime = time.Now() + err = dbConn.Table("friend").Create(toInsertFollow).Error if err != nil { return err @@ -24,46 +20,56 @@ func InsertToFriend(ownerId, friendId string, flag int32) error { return nil } -func FindFriendRelationshipFromFriend(ownerId, friendId string) (*Friend, error) { +func FindFriendRelationshipFromFriend(OwnerUserID, FriendUserID string) (*Friend, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } var friend Friend - err = dbConn.Table("friend").Where("owner_id=? and friend_id=?", ownerId, friendId).Find(&friend).Error + err = dbConn.Table("friend").Where("owner_user_id=? and friend_user_id=?", OwnerUserID, FriendUserID).Find(&friend).Error if err != nil { return nil, err } return &friend, err } -func FindUserInfoFromFriend(ownerId string) ([]Friend, error) { +func FindUserInfoFromFriend(OwnerUserID string) ([]Friend, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } var friends []Friend - err = dbConn.Table("friend").Where("owner_id=?", ownerId).Find(&friends).Error + err = dbConn.Table("friend").Where("owner_user_id=?", OwnerUserID).Find(&friends).Error if err != nil { return nil, err } return friends, nil } -func UpdateFriendComment(ownerId, friendId, comment string) error { +func UpdateFriendComment(OwnerUserID, FriendUserID, Remark string) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - err = dbConn.Exec("update friend set comment=? where owner_id=? and friend_id=?", comment, ownerId, friendId).Error + err = dbConn.Exec("update friend set remark=? where owner_user_id=? and friend_user_id=?", Remark, OwnerUserID, FriendUserID).Error return err } -func DeleteSingleFriendInfo(ownerId, friendId string) error { +func DeleteSingleFriendInfo(OwnerUserID, FriendUserID string) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - err = dbConn.Table("friend").Where("owner_id=? and friend_id=?", ownerId, friendId).Delete(Friend{}).Error + err = dbConn.Table("friend").Where("owner_user_id=? and friend_user_id=?", OwnerUserID, FriendUserID).Delete(Friend{}).Error return err } + +//type Friend struct { +// OwnerUserID string `gorm:"column:owner_user_id;primaryKey;"` +// FriendUserID string `gorm:"column:friend_user_id;primaryKey;"` +// Remark string `gorm:"column:remark"` +// CreateTime time.Time `gorm:"column:create_time"` +// AddSource int32 `gorm:"column:add_source"` +// OperatorUserID string `gorm:"column:operator_user_id"` +// Ex string `gorm:"column:ex"` +//} diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go index 9ccf17a0e..e2a332364 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go @@ -2,43 +2,42 @@ package im_mysql_model import ( "Open_IM/pkg/common/db" - "time" ) -// reqId add userId -func ReplaceIntoFriendReq(reqId, userId string, flag int32, reqMessage string) error { - dbConn, err := db.DB.MysqlDB.DefaultGormDB() - if err != nil { - return err - } - err = dbConn.Exec("replace into friend_request(req_id,user_id,flag,req_message,create_time) values(?,?,?,?,?)", reqId, userId, flag, reqMessage, time.Now()).Error - if err != nil { - return err - } - return nil -} +//type FriendRequest struct { +// FromUserID string `gorm:"column:from_user_id;primaryKey;"` +// ToUserID string `gorm:"column:to_user_id;primaryKey;"` +// HandleResult int32 `gorm:"column:handle_result"` +// ReqMessage string `gorm:"column:req_message"` +// CreateTime time.Time `gorm:"column:create_time"` +// HandlerUserID string `gorm:"column:handler_user_id"` +// HandleMsg string `gorm:"column:handle_msg"` +// HandleTime time.Time `gorm:"column:handle_time"` +// Ex string `gorm:"column:ex"` +//} -func FindFriendsApplyFromFriendReq(userId string) ([]FriendRequest, error) { +// who apply to add me +func GetReceivedFriendsApplicationListByUserID(ToUserID string) ([]FriendRequest, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } var usersInfo []FriendRequest - //dbConn.LogMode(true) - err = dbConn.Table("friend_request").Where("user_id=?", userId).Find(&usersInfo).Error + err = dbConn.Table("friend_request").Where("to_user_id=?", ToUserID).Find(&usersInfo).Error if err != nil { return nil, err } return usersInfo, nil } -func FindSelfApplyFromFriendReq(userId string) ([]FriendRequest, error) { +//I apply to add somebody +func GetSendFriendApplicationListByUserID(FromUserID string) ([]FriendRequest, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } var usersInfo []FriendRequest - err = dbConn.Table("friend_request").Where("req_id=?", userId).Find(&usersInfo).Error + err = dbConn.Table("friend_request").Where("from_user_id=?", FromUserID).Find(&usersInfo).Error if err != nil { return nil, err } @@ -46,26 +45,25 @@ func FindSelfApplyFromFriendReq(userId string) ([]FriendRequest, error) { } //reqId apply to add userId already -func FindFriendApplyFromFriendReqByUid(reqId, userId string) (*FriendRequest, error) { +func FindFriendApplicationByBothUserID(FromUserId, ToUserID string) (*FriendRequest, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } var friendRequest FriendRequest - err = dbConn.Table("friend_request").Where("req_id=? and user_id=?", reqId, userId).Find(&friendRequest).Error + err = dbConn.Table("friend_request").Where("from_user_id=? and to_user_id=?", FromUserId, ToUserID).Find(&friendRequest).Error if err != nil { return nil, err } return &friendRequest, nil } -//userId process reqId -func UpdateFriendRelationshipToFriendReq(reqId, userId string, flag int32) error { +func UpdateFriendApplication(friendRequest FriendRequest) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - err = dbConn.Exec("update friend_request set flag=? where req_id=? and user_id=?", flag, reqId, userId).Error + err = dbConn.Table("friend_request").Where("from_user_id=? and to_user_id=?", friendRequest.FromUserID, friendRequest.ToUserID).Update(&friendRequest).Error if err != nil { return err } diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go index 578b56632..888fff2e8 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go @@ -2,15 +2,25 @@ package im_mysql_model import ( "Open_IM/pkg/common/db" - "time" ) -func InsertIntoGroupMember(groupId, uid, nickName, userGroupFaceUrl string, administratorLevel int32) error { +//type GroupMember struct { +// GroupID string `gorm:"column:group_id;primaryKey;"` +// UserID string `gorm:"column:user_id;primaryKey;"` +// NickName string `gorm:"column:nickname"` +// FaceUrl string `gorm:"user_group_face_url"` +// RoleLevel int32 `gorm:"column:role_level"` +// JoinTime time.Time `gorm:"column:join_time"` +// JoinSource int32 `gorm:"column:join_source"` +// OperatorUserID string `gorm:"column:operator_user_id"` +// Ex string `gorm:"column:ex"` +//} + +func InsertIntoGroupMember(toInsertInfo GroupMember) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - toInsertInfo := GroupMember{GroupID: groupId, UserID: uid, NickName: nickName, AdministratorLevel: administratorLevel, JoinTime: time.Now(), FaceUrl: userGroupFaceUrl} err = dbConn.Table("group_member").Create(toInsertInfo).Error if err != nil { return err @@ -18,154 +28,154 @@ func InsertIntoGroupMember(groupId, uid, nickName, userGroupFaceUrl string, admi return nil } -func FindGroupMemberListByUserId(uid string) ([]GroupMember, error) { +func GetGroupMemberListByUserID(userID string) ([]GroupMember, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } var groupMemberList []GroupMember - err = dbConn.Raw("select * from `group_member` where uid=?", uid).Find(&groupMemberList).Error + err = dbConn.Table("group_member").Where("user_id=?", userID).Find(&groupMemberList).Error if err != nil { return nil, err } return groupMemberList, nil } -func FindGroupMemberListByGroupId(groupId string) ([]GroupMember, error) { +func GetGroupMemberListByGroupID(groupID string) ([]GroupMember, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } var groupMemberList []GroupMember - err = dbConn.Raw("select * from `group_member` where group_id=?", groupId).Find(&groupMemberList).Error + err = dbConn.Table("group_member").Where("group_id=?", groupID).Find(&groupMemberList).Error if err != nil { return nil, err } return groupMemberList, nil } -func FindGroupMemberListByGroupIdAndFilterInfo(groupId string, filter int32) ([]GroupMember, error) { +func GetGroupMemberListByGroupIDAndFilter(groupID string, filter int32) ([]GroupMember, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() - dbConn.LogMode(true) if err != nil { return nil, err } var groupMemberList []GroupMember - err = dbConn.Raw("select * from `group_member` where group_id=? and administrator_level=?", groupId, filter).Find(&groupMemberList).Error + err = dbConn.Table("group_member").Where("group_id=? and role_level=?", groupID, filter).Find(&groupMemberList).Error if err != nil { return nil, err } return groupMemberList, nil } -func FindGroupMemberInfoByGroupIdAndUserId(groupId, uid string) (*GroupMember, error) { + +func GetGroupMemberInfoByGroupIDAndUserID(groupID, userID string) (*GroupMember, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } var groupMember GroupMember - err = dbConn.Raw("select * from `group_member` where group_id=? and uid=? limit 1", groupId, uid).Find(&groupMember).Error + err = dbConn.Table("group_member").Where("group_id=? and user_id=? limit 1", groupID, userID).Find(&groupMember).Error if err != nil { return nil, err } return &groupMember, nil } -func DeleteGroupMemberByGroupIdAndUserId(groupId, uid string) error { +func DeleteGroupMemberByGroupIDAndUserID(groupID, userID string) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - err = dbConn.Exec("delete from `group_member` where group_id=? and uid=?", groupId, uid).Error + err = dbConn.Table("group_member").Where("group_id=? and user_id=? limit 1", groupID, userID).Delete(&GroupMember{}).Error if err != nil { return err } return nil } -func UpdateOwnerGroupNickName(groupId, userId, groupNickName string) error { +func UpdateGroupMemberInfo(groupMemberInfo GroupMember) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - err = dbConn.Exec("update `group_member` set nickname=? where group_id=? and uid=?", groupNickName, groupId, userId).Error + err = dbConn.Table("group_member").Where("group_id=? and user_id=?", groupMemberInfo.GroupID, groupMemberInfo.UserID).Update(&groupMemberInfo).Error if err != nil { return err } return nil } -func SelectGroupList(groupID string) ([]string, error) { - var groupUserID string - var groupList []string +func GetOwnerManagerByGroupID(groupID string) ([]GroupMember, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { - return groupList, err + return nil, err } - - rows, err := dbConn.Model(&GroupMember{}).Where("group_id = ?", groupID).Select("user_id").Rows() + var groupMemberList []GroupMember + err = dbConn.Table("group_member").Where("group_id=? and role_level>0", groupID).Find(&groupMemberList).Error if err != nil { - return groupList, err - } - defer rows.Close() - for rows.Next() { - rows.Scan(&groupUserID) - groupList = append(groupList, groupUserID) + return nil, err } - return groupList, nil + return groupMemberList, nil } -func UpdateTheUserAdministratorLevel(groupId, uid string, administratorLevel int64) error { +func GetGroupMemberNumByGroupID(groupID string) int32 { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { - return err + return 0 } - err = dbConn.Exec("update `group_member` set administrator_level=? where group_id=? and uid=?", administratorLevel, groupId, uid).Error + var number int32 + err = dbConn.Table("group_member").Where("group_id=?", groupID).Count(&number).Error if err != nil { - return err + return 0 } - return nil + return number } -func GetOwnerManagerByGroupId(groupId string) ([]GroupMember, error) { - dbConn, err := db.DB.MysqlDB.DefaultGormDB() +func GetGroupOwnerInfoByGroupID(groupID string) (*GroupMember, error) { + omList, err := GetOwnerManagerByGroupID(groupID) if err != nil { return nil, err } - var groupMemberList []GroupMember - err = dbConn.Raw("select * from `group_member` where group_id=? and administrator_level > 0", groupId).Find(&groupMemberList).Error - if err != nil { - return nil, err + for _, v := range omList { + if v.RoleLevel == 1 { + return &v, nil + } } - return groupMemberList, nil + return nil, nil } -func IsExistGroupMember(groupId, uid string) bool { +func IsExistGroupMember(groupID, userID string) bool { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return false } var number int32 - err = dbConn.Raw("select count(*) from `group_member` where group_id = ? and uid = ?", groupId, uid).Count(&number).Error + err = dbConn.Table("group_member").Where("group_id = ? and user_id = ?", groupID, userID).Count(&number).Error if err != nil { return false } - if number != 1 { return false } return true } -func RemoveGroupMember(groupId string, memberId string) error { - return DeleteGroupMemberByGroupIdAndUserId(groupId, memberId) +func RemoveGroupMember(groupID string, UserID string) error { + return DeleteGroupMemberByGroupIDAndUserID(groupID, UserID) } -func GetMemberInfoById(groupId string, memberId string) (*GroupMember, error) { - return FindGroupMemberInfoByGroupIdAndUserId(groupId, memberId) +func GetMemberInfoByID(groupID string, userID string) (*GroupMember, error) { + return GetGroupMemberInfoByGroupIDAndUserID(groupID, userID) } -func GetGroupMemberByGroupId(groupId string, filter int32, begin int32, maxNumber int32) ([]GroupMember, error) { - memberList, err := FindGroupMemberListByGroupId(groupId) //sorted by join time +func GetGroupMemberByGroupID(groupID string, filter int32, begin int32, maxNumber int32) ([]GroupMember, error) { + var memberList []GroupMember + var err error + if filter >= 0 { + memberList, err = GetGroupMemberListByGroupIDAndFilter(groupID, filter) //sorted by join time + } else { + memberList, err = GetGroupMemberListByGroupID(groupID) + } + if err != nil { return nil, err } @@ -182,49 +192,35 @@ func GetGroupMemberByGroupId(groupId string, filter int32, begin int32, maxNumbe return memberList[begin:end], nil } -func GetJoinedGroupIdListByMemberId(memberId string) ([]GroupMember, error) { - return FindGroupMemberListByUserId(memberId) -} - -func GetGroupMemberNumByGroupId(groupId string) int32 { - dbConn, err := db.DB.MysqlDB.DefaultGormDB() - if err != nil { - return 0 - } - var number int32 - err = dbConn.Raw("select count(*) from `group_member` where group_id=? ", groupId).Count(&number).Error - if err != nil { - return 0 - } - return number -} - -func GetGroupOwnerByGroupId(groupId string) string { - omList, err := GetOwnerManagerByGroupId(groupId) - if err != nil { - return "" - } - for _, v := range omList { - if v.AdministratorLevel == 1 { - return v.UserID - } - } - return "" -} - -func GetGroupOwnerInfoByGroupId(groupId string) (*GroupMember, error) { - omList, err := GetOwnerManagerByGroupId(groupId) +func GetJoinedGroupIDListByUserID(userID string) ([]string, error) { + memberList, err := GetGroupMemberListByUserID(userID) if err != nil { return nil, err } - for _, v := range omList { - if v.AdministratorLevel == 1 { - return v, nil - } - } - return nil, nil -} - -func InsertGroupMember(groupId, userId, nickName, userFaceUrl string, role int32) error { - return InsertIntoGroupMember(groupId, userId, nickName, userFaceUrl, role) -} + var groupIDList []string = make([]string, len(memberList)) + for _, v := range memberList { + groupIDList = append(groupIDList, v.GroupID) + } + return groupIDList, nil +} + +// +//func SelectGroupList(groupID string) ([]string, error) { +// var groupUserID string +// var groupList []string +// dbConn, err := db.DB.MysqlDB.DefaultGormDB() +// if err != nil { +// return groupList, err +// } +// +// rows, err := dbConn.Model(&GroupMember{}).Where("group_id = ?", groupID).Select("user_id").Rows() +// if err != nil { +// return groupList, err +// } +// defer rows.Close() +// for rows.Next() { +// rows.Scan(&groupUserID) +// groupList = append(groupList, groupUserID) +// } +// return groupList, nil +//} diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_model.go index db4e7f3c0..5fc580c8a 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_model.go @@ -8,17 +8,16 @@ import ( "time" ) -func InsertIntoGroup(groupId, name, introduction, notification, faceUrl, ex string) error { +func InsertIntoGroup(groupInfo Group) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - //Default group name - if name == "" { - name = "Group Chat" + if groupInfo.GroupName == "" { + groupInfo.GroupName = "Group Chat" } - toInsertInfo := Group{GroupID: groupId, GroupName: name, Introduction: introduction, Notification: notification, FaceUrl: faceUrl, CreateTime: time.Now(), Ex: ex} - err = dbConn.Table("group").Create(toInsertInfo).Error + groupInfo.CreateTime = time.Now() + err = dbConn.Table("group").Create(groupInfo).Error if err != nil { return err } @@ -164,7 +163,7 @@ func GetGroupApplicationList(uid string) (*group.GetGroupApplicationListResp, er return reply, nil } -func TransferGroupOwner(pb *group.TransferGroupOwnerReq) (*group.CommonResp, error) { +func TransferGroupOwner(pb *group.TransferGroupOwnerReq) (*group.TransferGroupOwnerResp, error) { oldOwner, err := FindGroupMemberInfoByGroupIdAndUserId(pb.GroupID, pb.OldOwnerUserID) if err != nil { return nil, err @@ -187,7 +186,7 @@ func TransferGroupOwner(pb *group.TransferGroupOwnerReq) (*group.CommonResp, err return nil, err } - return &group.CommonResp{}, nil + return &group.TransferGroupOwnerResp{CommonResp: &group.CommonResp{ErrCode: 0}}, nil } func GroupApplicationResponse(pb *group.GroupApplicationResponseReq) (*group.CommonResp, error) { diff --git a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go index f25f4081f..45741797e 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go +++ b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go @@ -2,69 +2,82 @@ package im_mysql_model import "time" -type User struct { - UserID string `gorm:"column:uid;primaryKey;"` - Nickname string `gorm:"column:name"` - FaceUrl string `gorm:"column:icon"` - Gender int32 `gorm:"column:gender"` - Mobile string `gorm:"column:mobile"` - Birth string `gorm:"column:birth"` - Email string `gorm:"column:email"` - Ex string `gorm:"column:ex"` - CreateTime time.Time `gorm:"column:create_time"` -} - type Friend struct { - OwnerUserID string `gorm:"column:owner_id"` - FriendUserID string `gorm:"column:friend_id"` - Remark string `gorm:"column:comment"` - FriendFlag int32 `gorm:"column:friend_flag"` - CreateTime time.Time `gorm:"column:create_time"` + OwnerUserID string `gorm:"column:owner_user_id;primaryKey;"` + FriendUserID string `gorm:"column:friend_user_id;primaryKey;"` + Remark string `gorm:"column:remark"` + CreateTime time.Time `gorm:"column:create_time"` + AddSource int32 `gorm:"column:add_source"` + OperatorUserID string `gorm:"column:operator_user_id"` + Ex string `gorm:"column:ex"` } + type FriendRequest struct { - ReqID string `gorm:"column:req_id"` - UserID string `gorm:"column:user_id"` - Flag int32 `gorm:"column:flag"` - ReqMessage string `gorm:"column:req_message"` - CreateTime time.Time `gorm:"column:create_time"` -} -type BlackList struct { - OwnerUserID string `gorm:"column:owner_id"` - BlockUserID string `gorm:"column:block_id"` - CreateTime time.Time `gorm:"column:create_time"` + FromUserID string `gorm:"column:from_user_id;primaryKey;"` + ToUserID string `gorm:"column:to_user_id;primaryKey;"` + HandleResult int32 `gorm:"column:handle_result"` + ReqMessage string `gorm:"column:req_message"` + CreateTime time.Time `gorm:"column:create_time"` + HandlerUserID string `gorm:"column:handler_user_id"` + HandleMsg string `gorm:"column:handle_msg"` + HandleTime time.Time `gorm:"column:handle_time"` + Ex string `gorm:"column:ex"` } type Group struct { - GroupID string `gorm:"column:group_id"` - GroupName string `gorm:"column:name"` - Introduction string `gorm:"column:introduction"` - Notification string `gorm:"column:notification"` - FaceUrl string `gorm:"column:face_url"` - CreateTime time.Time `gorm:"column:create_time"` - Ext string `gorm:"column:ex"` + GroupID string `gorm:"column:group_id;primaryKey;"` + GroupName string `gorm:"column:name"` + Introduction string `gorm:"column:introduction"` + Notification string `gorm:"column:notification"` + FaceUrl string `gorm:"column:face_url"` + CreateTime time.Time `gorm:"column:create_time"` + Status int32 `gorm:"column:status"` + CreatorUserID string `gorm:"column:creator_user_id"` + GroupType int32 `gorm:"column:group_type"` + Ex string `gorm:"column:ex"` } type GroupMember struct { - GroupID string `gorm:"column:group_id"` - UserID string `gorm:"column:uid"` - NickName string `gorm:"column:nickname"` - AdministratorLevel int32 `gorm:"column:administrator_level"` - JoinTime time.Time `gorm:"column:join_time"` - FaceUrl string `gorm:"user_group_face_url"` + GroupID string `gorm:"column:group_id;primaryKey;"` + UserID string `gorm:"column:user_id;primaryKey;"` + NickName string `gorm:"column:nickname"` + FaceUrl string `gorm:"user_group_face_url"` + RoleLevel int32 `gorm:"column:role_level"` + JoinTime time.Time `gorm:"column:join_time"` + JoinSource int32 `gorm:"column:join_source"` + OperatorUserID string `gorm:"column:operator_user_id"` + Ex string `gorm:"column:ex"` } type GroupRequest struct { - ID string `gorm:"column:id"` - GroupID string `gorm:"column:group_id"` - FromUserID string `gorm:"column:from_user_id"` - ToUserID string `gorm:"column:to_user_id"` - Flag int32 `gorm:"column:flag"` - ReqMsg string `gorm:"column:req_msg"` - HandledMsg string `gorm:"column:handled_msg"` - CreateTime time.Time `gorm:"column:create_time"` - FromUserNickname string `gorm:"from_user_nickname"` - ToUserNickname string `gorm:"to_user_nickname"` - FromUserFaceUrl string `gorm:"from_user_face_url"` - ToUserFaceUrl string `gorm:"to_user_face_url"` - HandledUser string `gorm:"handled_user"` + UserID string `gorm:"column:user_id;primaryKey;"` + GroupID string `gorm:"column:group_id;primaryKey;"` + HandleResult string `gorm:"column:handle_result"` + ReqMsg string `gorm:"column:req_msg"` + HandledMsg string `gorm:"column:handled_msg"` + ReqTime time.Time `gorm:"column:req_time"` + HandleUserID string `gorm:"column:handle_user_id"` + HandledTime time.Time `gorm:"column:handle_time"` + Ex string `gorm:"column:ex"` +} + +type User struct { + UserID string `gorm:"column:user_id;primaryKey;"` + Nickname string `gorm:"column:name"` + FaceUrl string `gorm:"column:icon"` + Gender int32 `gorm:"column:gender"` + PhoneNumber string `gorm:"column:phone_number"` + Birth string `gorm:"column:birth"` + Email string `gorm:"column:email"` + Ex string `gorm:"column:ex"` + CreateTime time.Time `gorm:"column:create_time"` +} + +type BlackList struct { + OwnerUserID string `gorm:"column:owner_user_id;primaryKey;"` + BlockUserID string `gorm:"column:block_user_id;primaryKey;"` + CreateTime time.Time `gorm:"column:create_time"` + AddSource int32 `gorm:"column:add_source"` + OperatorUserID int32 `gorm:"column:operator_user_id"` + Ex string `gorm:"column:ex"` } diff --git a/pkg/proto/base/base.proto b/pkg/proto/base/base.proto new file mode 100644 index 000000000..6d5144f0b --- /dev/null +++ b/pkg/proto/base/base.proto @@ -0,0 +1,5 @@ +syntax = "proto3"; +package base; + + + diff --git a/pkg/proto/friend/friend.pb.go b/pkg/proto/friend/friend.pb.go index a0c0fb25e..67efb3483 100644 --- a/pkg/proto/friend/friend.pb.go +++ b/pkg/proto/friend/friend.pb.go @@ -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_friend_525e368387d696e2, []int{0} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -84,7 +84,7 @@ func (m *CommID) Reset() { *m = CommID{} } func (m *CommID) String() string { return proto.CompactTextString(m) } func (*CommID) ProtoMessage() {} func (*CommID) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{1} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{1} } func (m *CommID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommID.Unmarshal(m, b) @@ -143,7 +143,7 @@ func (m *GetFriendsInfoReq) Reset() { *m = GetFriendsInfoReq{} } func (m *GetFriendsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetFriendsInfoReq) ProtoMessage() {} func (*GetFriendsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{2} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{2} } func (m *GetFriendsInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendsInfoReq.Unmarshal(m, b) @@ -171,19 +171,19 @@ func (m *GetFriendsInfoReq) GetCommID() *CommID { } type GetFriendInfoResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - Data *FriendInfo `protobuf:"bytes,3,opt,name=Data" json:"Data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` + FriendInfoList []*sdk_ws.FriendInfo `protobuf:"bytes,3,rep,name=FriendInfoList" json:"FriendInfoList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetFriendInfoResp) Reset() { *m = GetFriendInfoResp{} } func (m *GetFriendInfoResp) String() string { return proto.CompactTextString(m) } func (*GetFriendInfoResp) ProtoMessage() {} func (*GetFriendInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{3} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{3} } func (m *GetFriendInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendInfoResp.Unmarshal(m, b) @@ -217,86 +217,16 @@ func (m *GetFriendInfoResp) GetErrMsg() string { return "" } -func (m *GetFriendInfoResp) GetData() *FriendInfo { - if m != nil { - return m.Data - } - return nil -} - -type FriendInfo struct { - OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` - Remark string `protobuf:"bytes,2,opt,name=Remark" json:"Remark,omitempty"` - CreateTime uint64 `protobuf:"varint,3,opt,name=CreateTime" json:"CreateTime,omitempty"` - FriendUser *sdk_ws.UserInfo `protobuf:"bytes,4,opt,name=FriendUser" json:"FriendUser,omitempty"` - IsBlack int32 `protobuf:"varint,5,opt,name=IsBlack" json:"IsBlack,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -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_friend_525e368387d696e2, []int{4} -} -func (m *FriendInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FriendInfo.Unmarshal(m, b) -} -func (m *FriendInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FriendInfo.Marshal(b, m, deterministic) -} -func (dst *FriendInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_FriendInfo.Merge(dst, src) -} -func (m *FriendInfo) XXX_Size() int { - return xxx_messageInfo_FriendInfo.Size(m) -} -func (m *FriendInfo) XXX_DiscardUnknown() { - xxx_messageInfo_FriendInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_FriendInfo proto.InternalMessageInfo - -func (m *FriendInfo) GetOwnerUserID() string { - if m != nil { - return m.OwnerUserID - } - return "" -} - -func (m *FriendInfo) GetRemark() string { - if m != nil { - return m.Remark - } - return "" -} - -func (m *FriendInfo) GetCreateTime() uint64 { - if m != nil { - return m.CreateTime - } - return 0 -} - -func (m *FriendInfo) GetFriendUser() *sdk_ws.UserInfo { +func (m *GetFriendInfoResp) GetFriendInfoList() []*sdk_ws.FriendInfo { if m != nil { - return m.FriendUser + return m.FriendInfoList } return nil } -func (m *FriendInfo) GetIsBlack() int32 { - if m != nil { - return m.IsBlack - } - return 0 -} - type AddFriendReq struct { CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` - ReqMessage string `protobuf:"bytes,2,opt,name=ReqMessage" json:"ReqMessage,omitempty"` + ReqMsg string `protobuf:"bytes,2,opt,name=ReqMsg" json:"ReqMsg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -306,7 +236,7 @@ func (m *AddFriendReq) Reset() { *m = AddFriendReq{} } func (m *AddFriendReq) String() string { return proto.CompactTextString(m) } func (*AddFriendReq) ProtoMessage() {} func (*AddFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{5} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{4} } func (m *AddFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendReq.Unmarshal(m, b) @@ -333,13 +263,51 @@ func (m *AddFriendReq) GetCommID() *CommID { return nil } -func (m *AddFriendReq) GetReqMessage() string { +func (m *AddFriendReq) GetReqMsg() string { if m != nil { - return m.ReqMessage + return m.ReqMsg } return "" } +type AddFriendResp 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 *AddFriendResp) Reset() { *m = AddFriendResp{} } +func (m *AddFriendResp) String() string { return proto.CompactTextString(m) } +func (*AddFriendResp) ProtoMessage() {} +func (*AddFriendResp) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{5} +} +func (m *AddFriendResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AddFriendResp.Unmarshal(m, b) +} +func (m *AddFriendResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AddFriendResp.Marshal(b, m, deterministic) +} +func (dst *AddFriendResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddFriendResp.Merge(dst, src) +} +func (m *AddFriendResp) XXX_Size() int { + return xxx_messageInfo_AddFriendResp.Size(m) +} +func (m *AddFriendResp) XXX_DiscardUnknown() { + xxx_messageInfo_AddFriendResp.DiscardUnknown(m) +} + +var xxx_messageInfo_AddFriendResp proto.InternalMessageInfo + +func (m *AddFriendResp) GetCommonResp() *CommonResp { + if m != nil { + return m.CommonResp + } + return nil +} + type ImportFriendReq struct { FriendUserIDList []string `protobuf:"bytes,1,rep,name=FriendUserIDList" json:"FriendUserIDList,omitempty"` OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` @@ -354,7 +322,7 @@ func (m *ImportFriendReq) Reset() { *m = ImportFriendReq{} } func (m *ImportFriendReq) String() string { return proto.CompactTextString(m) } func (*ImportFriendReq) ProtoMessage() {} func (*ImportFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{6} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{6} } func (m *ImportFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportFriendReq.Unmarshal(m, b) @@ -403,18 +371,18 @@ func (m *ImportFriendReq) GetOpUserID() string { } type ImportFriendResp struct { - CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - FailedUidList []string `protobuf:"bytes,2,rep,name=failedUidList" json:"failedUidList,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"` + FailedFriendUserIDList []string `protobuf:"bytes,2,rep,name=FailedFriendUserIDList" json:"FailedFriendUserIDList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ImportFriendResp) Reset() { *m = ImportFriendResp{} } func (m *ImportFriendResp) String() string { return proto.CompactTextString(m) } func (*ImportFriendResp) ProtoMessage() {} func (*ImportFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{7} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{7} } func (m *ImportFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportFriendResp.Unmarshal(m, b) @@ -441,167 +409,105 @@ func (m *ImportFriendResp) GetCommonResp() *CommonResp { return nil } -func (m *ImportFriendResp) GetFailedUidList() []string { +func (m *ImportFriendResp) GetFailedFriendUserIDList() []string { if m != nil { - return m.FailedUidList + return m.FailedFriendUserIDList } return nil } -type GetFriendApplyReq struct { +type GetFriendApplyListReq struct { CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *GetFriendApplyReq) Reset() { *m = GetFriendApplyReq{} } -func (m *GetFriendApplyReq) String() string { return proto.CompactTextString(m) } -func (*GetFriendApplyReq) ProtoMessage() {} -func (*GetFriendApplyReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{8} +func (m *GetFriendApplyListReq) Reset() { *m = GetFriendApplyListReq{} } +func (m *GetFriendApplyListReq) String() string { return proto.CompactTextString(m) } +func (*GetFriendApplyListReq) ProtoMessage() {} +func (*GetFriendApplyListReq) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{8} } -func (m *GetFriendApplyReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetFriendApplyReq.Unmarshal(m, b) +func (m *GetFriendApplyListReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetFriendApplyListReq.Unmarshal(m, b) } -func (m *GetFriendApplyReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetFriendApplyReq.Marshal(b, m, deterministic) +func (m *GetFriendApplyListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetFriendApplyListReq.Marshal(b, m, deterministic) } -func (dst *GetFriendApplyReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetFriendApplyReq.Merge(dst, src) +func (dst *GetFriendApplyListReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetFriendApplyListReq.Merge(dst, src) } -func (m *GetFriendApplyReq) XXX_Size() int { - return xxx_messageInfo_GetFriendApplyReq.Size(m) +func (m *GetFriendApplyListReq) XXX_Size() int { + return xxx_messageInfo_GetFriendApplyListReq.Size(m) } -func (m *GetFriendApplyReq) XXX_DiscardUnknown() { - xxx_messageInfo_GetFriendApplyReq.DiscardUnknown(m) +func (m *GetFriendApplyListReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetFriendApplyListReq.DiscardUnknown(m) } -var xxx_messageInfo_GetFriendApplyReq proto.InternalMessageInfo +var xxx_messageInfo_GetFriendApplyListReq proto.InternalMessageInfo -func (m *GetFriendApplyReq) GetCommID() *CommID { +func (m *GetFriendApplyListReq) GetCommID() *CommID { if m != nil { return m.CommID } return nil } -type GetFriendApplyResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - Data []*ApplyUserInfo `protobuf:"bytes,4,rep,name=data" json:"data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type GetFriendApplyListResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` + FriendRequestList []*sdk_ws.FriendRequest `protobuf:"bytes,3,rep,name=FriendRequestList" json:"FriendRequestList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetFriendApplyResp) Reset() { *m = GetFriendApplyResp{} } -func (m *GetFriendApplyResp) String() string { return proto.CompactTextString(m) } -func (*GetFriendApplyResp) ProtoMessage() {} -func (*GetFriendApplyResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{9} +func (m *GetFriendApplyListResp) Reset() { *m = GetFriendApplyListResp{} } +func (m *GetFriendApplyListResp) String() string { return proto.CompactTextString(m) } +func (*GetFriendApplyListResp) ProtoMessage() {} +func (*GetFriendApplyListResp) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{9} } -func (m *GetFriendApplyResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetFriendApplyResp.Unmarshal(m, b) +func (m *GetFriendApplyListResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetFriendApplyListResp.Unmarshal(m, b) } -func (m *GetFriendApplyResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetFriendApplyResp.Marshal(b, m, deterministic) +func (m *GetFriendApplyListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetFriendApplyListResp.Marshal(b, m, deterministic) } -func (dst *GetFriendApplyResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetFriendApplyResp.Merge(dst, src) +func (dst *GetFriendApplyListResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetFriendApplyListResp.Merge(dst, src) } -func (m *GetFriendApplyResp) XXX_Size() int { - return xxx_messageInfo_GetFriendApplyResp.Size(m) +func (m *GetFriendApplyListResp) XXX_Size() int { + return xxx_messageInfo_GetFriendApplyListResp.Size(m) } -func (m *GetFriendApplyResp) XXX_DiscardUnknown() { - xxx_messageInfo_GetFriendApplyResp.DiscardUnknown(m) +func (m *GetFriendApplyListResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetFriendApplyListResp.DiscardUnknown(m) } -var xxx_messageInfo_GetFriendApplyResp proto.InternalMessageInfo +var xxx_messageInfo_GetFriendApplyListResp proto.InternalMessageInfo -func (m *GetFriendApplyResp) GetErrCode() int32 { +func (m *GetFriendApplyListResp) GetErrCode() int32 { if m != nil { return m.ErrCode } return 0 } -func (m *GetFriendApplyResp) GetErrMsg() string { +func (m *GetFriendApplyListResp) GetErrMsg() string { if m != nil { return m.ErrMsg } return "" } -func (m *GetFriendApplyResp) GetData() []*ApplyUserInfo { - if m != nil { - return m.Data - } - return nil -} - -type ApplyUserInfo struct { - UserInfo *sdk_ws.PublicUserInfo `protobuf:"bytes,1,opt,name=UserInfo" json:"UserInfo,omitempty"` - ApplyTime int64 `protobuf:"varint,2,opt,name=applyTime" json:"applyTime,omitempty"` - ReqMessage string `protobuf:"bytes,3,opt,name=reqMessage" json:"reqMessage,omitempty"` - Flag int32 `protobuf:"varint,4,opt,name=Flag" json:"Flag,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ApplyUserInfo) Reset() { *m = ApplyUserInfo{} } -func (m *ApplyUserInfo) String() string { return proto.CompactTextString(m) } -func (*ApplyUserInfo) ProtoMessage() {} -func (*ApplyUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{10} -} -func (m *ApplyUserInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ApplyUserInfo.Unmarshal(m, b) -} -func (m *ApplyUserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ApplyUserInfo.Marshal(b, m, deterministic) -} -func (dst *ApplyUserInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ApplyUserInfo.Merge(dst, src) -} -func (m *ApplyUserInfo) XXX_Size() int { - return xxx_messageInfo_ApplyUserInfo.Size(m) -} -func (m *ApplyUserInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ApplyUserInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_ApplyUserInfo proto.InternalMessageInfo - -func (m *ApplyUserInfo) GetUserInfo() *sdk_ws.PublicUserInfo { +func (m *GetFriendApplyListResp) GetFriendRequestList() []*sdk_ws.FriendRequest { if m != nil { - return m.UserInfo + return m.FriendRequestList } return nil } -func (m *ApplyUserInfo) GetApplyTime() int64 { - if m != nil { - return m.ApplyTime - } - return 0 -} - -func (m *ApplyUserInfo) GetReqMessage() string { - if m != nil { - return m.ReqMessage - } - return "" -} - -func (m *ApplyUserInfo) GetFlag() int32 { - if m != nil { - return m.Flag - } - return 0 -} - type GetFriendListReq struct { CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -613,7 +519,7 @@ func (m *GetFriendListReq) Reset() { *m = GetFriendListReq{} } func (m *GetFriendListReq) String() string { return proto.CompactTextString(m) } func (*GetFriendListReq) ProtoMessage() {} func (*GetFriendListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{11} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{10} } func (m *GetFriendListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendListReq.Unmarshal(m, b) @@ -641,19 +547,19 @@ func (m *GetFriendListReq) GetCommID() *CommID { } type GetFriendListResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - Data []*FriendInfo `protobuf:"bytes,3,rep,name=Data" json:"Data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` + FriendInfoList []*sdk_ws.FriendInfo `protobuf:"bytes,3,rep,name=FriendInfoList" json:"FriendInfoList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetFriendListResp) Reset() { *m = GetFriendListResp{} } func (m *GetFriendListResp) String() string { return proto.CompactTextString(m) } func (*GetFriendListResp) ProtoMessage() {} func (*GetFriendListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{12} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{11} } func (m *GetFriendListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendListResp.Unmarshal(m, b) @@ -687,9 +593,9 @@ func (m *GetFriendListResp) GetErrMsg() string { return "" } -func (m *GetFriendListResp) GetData() []*FriendInfo { +func (m *GetFriendListResp) GetFriendInfoList() []*sdk_ws.FriendInfo { if m != nil { - return m.Data + return m.FriendInfoList } return nil } @@ -705,7 +611,7 @@ func (m *AddBlacklistReq) Reset() { *m = AddBlacklistReq{} } func (m *AddBlacklistReq) String() string { return proto.CompactTextString(m) } func (*AddBlacklistReq) ProtoMessage() {} func (*AddBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{13} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{12} } func (m *AddBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddBlacklistReq.Unmarshal(m, b) @@ -732,6 +638,44 @@ func (m *AddBlacklistReq) GetCommID() *CommID { return nil } +type AddBlacklistResp 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 *AddBlacklistResp) Reset() { *m = AddBlacklistResp{} } +func (m *AddBlacklistResp) String() string { return proto.CompactTextString(m) } +func (*AddBlacklistResp) ProtoMessage() {} +func (*AddBlacklistResp) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{13} +} +func (m *AddBlacklistResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AddBlacklistResp.Unmarshal(m, b) +} +func (m *AddBlacklistResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AddBlacklistResp.Marshal(b, m, deterministic) +} +func (dst *AddBlacklistResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddBlacklistResp.Merge(dst, src) +} +func (m *AddBlacklistResp) XXX_Size() int { + return xxx_messageInfo_AddBlacklistResp.Size(m) +} +func (m *AddBlacklistResp) XXX_DiscardUnknown() { + xxx_messageInfo_AddBlacklistResp.DiscardUnknown(m) +} + +var xxx_messageInfo_AddBlacklistResp proto.InternalMessageInfo + +func (m *AddBlacklistResp) GetCommonResp() *CommonResp { + if m != nil { + return m.CommonResp + } + return nil +} + type RemoveBlacklistReq struct { CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -743,7 +687,7 @@ func (m *RemoveBlacklistReq) Reset() { *m = RemoveBlacklistReq{} } func (m *RemoveBlacklistReq) String() string { return proto.CompactTextString(m) } func (*RemoveBlacklistReq) ProtoMessage() {} func (*RemoveBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{14} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{14} } func (m *RemoveBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RemoveBlacklistReq.Unmarshal(m, b) @@ -770,6 +714,44 @@ func (m *RemoveBlacklistReq) GetCommID() *CommID { return nil } +type RemoveBlacklistResp 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 *RemoveBlacklistResp) Reset() { *m = RemoveBlacklistResp{} } +func (m *RemoveBlacklistResp) String() string { return proto.CompactTextString(m) } +func (*RemoveBlacklistResp) ProtoMessage() {} +func (*RemoveBlacklistResp) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{15} +} +func (m *RemoveBlacklistResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RemoveBlacklistResp.Unmarshal(m, b) +} +func (m *RemoveBlacklistResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RemoveBlacklistResp.Marshal(b, m, deterministic) +} +func (dst *RemoveBlacklistResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveBlacklistResp.Merge(dst, src) +} +func (m *RemoveBlacklistResp) XXX_Size() int { + return xxx_messageInfo_RemoveBlacklistResp.Size(m) +} +func (m *RemoveBlacklistResp) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveBlacklistResp.DiscardUnknown(m) +} + +var xxx_messageInfo_RemoveBlacklistResp proto.InternalMessageInfo + +func (m *RemoveBlacklistResp) GetCommonResp() *CommonResp { + if m != nil { + return m.CommonResp + } + return nil +} + type GetBlacklistReq struct { CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -781,7 +763,7 @@ func (m *GetBlacklistReq) Reset() { *m = GetBlacklistReq{} } func (m *GetBlacklistReq) String() string { return proto.CompactTextString(m) } func (*GetBlacklistReq) ProtoMessage() {} func (*GetBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{15} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{16} } func (m *GetBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBlacklistReq.Unmarshal(m, b) @@ -811,7 +793,7 @@ func (m *GetBlacklistReq) GetCommID() *CommID { type GetBlacklistResp struct { ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - Data []*sdk_ws.PublicUserInfo `protobuf:"bytes,3,rep,name=data" json:"data,omitempty"` + BlackUserInfoList []*sdk_ws.PublicUserInfo `protobuf:"bytes,3,rep,name=BlackUserInfoList" json:"BlackUserInfoList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -821,7 +803,7 @@ func (m *GetBlacklistResp) Reset() { *m = GetBlacklistResp{} } func (m *GetBlacklistResp) String() string { return proto.CompactTextString(m) } func (*GetBlacklistResp) ProtoMessage() {} func (*GetBlacklistResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{16} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{17} } func (m *GetBlacklistResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBlacklistResp.Unmarshal(m, b) @@ -855,9 +837,9 @@ func (m *GetBlacklistResp) GetErrMsg() string { return "" } -func (m *GetBlacklistResp) GetData() []*sdk_ws.PublicUserInfo { +func (m *GetBlacklistResp) GetBlackUserInfoList() []*sdk_ws.PublicUserInfo { if m != nil { - return m.Data + return m.BlackUserInfoList } return nil } @@ -873,7 +855,7 @@ func (m *IsFriendReq) Reset() { *m = IsFriendReq{} } func (m *IsFriendReq) String() string { return proto.CompactTextString(m) } func (*IsFriendReq) ProtoMessage() {} func (*IsFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{17} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{18} } func (m *IsFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsFriendReq.Unmarshal(m, b) @@ -903,7 +885,7 @@ func (m *IsFriendReq) GetCommID() *CommID { type IsFriendResp struct { ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - ShipType int32 `protobuf:"varint,3,opt,name=ShipType" json:"ShipType,omitempty"` + Response bool `protobuf:"varint,3,opt,name=Response" json:"Response,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -913,7 +895,7 @@ func (m *IsFriendResp) Reset() { *m = IsFriendResp{} } func (m *IsFriendResp) String() string { return proto.CompactTextString(m) } func (*IsFriendResp) ProtoMessage() {} func (*IsFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{18} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{19} } func (m *IsFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsFriendResp.Unmarshal(m, b) @@ -947,11 +929,11 @@ func (m *IsFriendResp) GetErrMsg() string { return "" } -func (m *IsFriendResp) GetShipType() int32 { +func (m *IsFriendResp) GetResponse() bool { if m != nil { - return m.ShipType + return m.Response } - return 0 + return false } type IsInBlackListReq struct { @@ -965,7 +947,7 @@ func (m *IsInBlackListReq) Reset() { *m = IsInBlackListReq{} } func (m *IsInBlackListReq) String() string { return proto.CompactTextString(m) } func (*IsInBlackListReq) ProtoMessage() {} func (*IsInBlackListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{19} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{20} } func (m *IsInBlackListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsInBlackListReq.Unmarshal(m, b) @@ -1005,7 +987,7 @@ func (m *IsInBlackListResp) Reset() { *m = IsInBlackListResp{} } func (m *IsInBlackListResp) String() string { return proto.CompactTextString(m) } func (*IsInBlackListResp) ProtoMessage() {} func (*IsInBlackListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{20} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{21} } func (m *IsInBlackListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsInBlackListResp.Unmarshal(m, b) @@ -1057,7 +1039,7 @@ func (m *DeleteFriendReq) Reset() { *m = DeleteFriendReq{} } func (m *DeleteFriendReq) String() string { return proto.CompactTextString(m) } func (*DeleteFriendReq) ProtoMessage() {} func (*DeleteFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{21} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{22} } func (m *DeleteFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteFriendReq.Unmarshal(m, b) @@ -1084,9 +1066,49 @@ func (m *DeleteFriendReq) GetCommID() *CommID { return nil } +type DeleteFriendResp 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 *DeleteFriendResp) Reset() { *m = DeleteFriendResp{} } +func (m *DeleteFriendResp) String() string { return proto.CompactTextString(m) } +func (*DeleteFriendResp) ProtoMessage() {} +func (*DeleteFriendResp) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{23} +} +func (m *DeleteFriendResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteFriendResp.Unmarshal(m, b) +} +func (m *DeleteFriendResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteFriendResp.Marshal(b, m, deterministic) +} +func (dst *DeleteFriendResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteFriendResp.Merge(dst, src) +} +func (m *DeleteFriendResp) XXX_Size() int { + return xxx_messageInfo_DeleteFriendResp.Size(m) +} +func (m *DeleteFriendResp) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteFriendResp.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteFriendResp proto.InternalMessageInfo + +func (m *DeleteFriendResp) GetCommonResp() *CommonResp { + if m != nil { + return m.CommonResp + } + return nil +} + +// process type AddFriendResponseReq struct { CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` Flag int32 `protobuf:"varint,2,opt,name=flag" json:"flag,omitempty"` + HandleMsg string `protobuf:"bytes,3,opt,name=handleMsg" json:"handleMsg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1096,7 +1118,7 @@ func (m *AddFriendResponseReq) Reset() { *m = AddFriendResponseReq{} } func (m *AddFriendResponseReq) String() string { return proto.CompactTextString(m) } func (*AddFriendResponseReq) ProtoMessage() {} func (*AddFriendResponseReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{22} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{24} } func (m *AddFriendResponseReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendResponseReq.Unmarshal(m, b) @@ -1130,6 +1152,51 @@ func (m *AddFriendResponseReq) GetFlag() int32 { return 0 } +func (m *AddFriendResponseReq) GetHandleMsg() string { + if m != nil { + return m.HandleMsg + } + return "" +} + +type AddFriendResponseResp 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 *AddFriendResponseResp) Reset() { *m = AddFriendResponseResp{} } +func (m *AddFriendResponseResp) String() string { return proto.CompactTextString(m) } +func (*AddFriendResponseResp) ProtoMessage() {} +func (*AddFriendResponseResp) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{25} +} +func (m *AddFriendResponseResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AddFriendResponseResp.Unmarshal(m, b) +} +func (m *AddFriendResponseResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AddFriendResponseResp.Marshal(b, m, deterministic) +} +func (dst *AddFriendResponseResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddFriendResponseResp.Merge(dst, src) +} +func (m *AddFriendResponseResp) XXX_Size() int { + return xxx_messageInfo_AddFriendResponseResp.Size(m) +} +func (m *AddFriendResponseResp) XXX_DiscardUnknown() { + xxx_messageInfo_AddFriendResponseResp.DiscardUnknown(m) +} + +var xxx_messageInfo_AddFriendResponseResp proto.InternalMessageInfo + +func (m *AddFriendResponseResp) GetCommonResp() *CommonResp { + if m != nil { + return m.CommonResp + } + return nil +} + type SetFriendCommentReq struct { CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` Remark string `protobuf:"bytes,2,opt,name=Remark" json:"Remark,omitempty"` @@ -1142,7 +1209,7 @@ func (m *SetFriendCommentReq) Reset() { *m = SetFriendCommentReq{} } func (m *SetFriendCommentReq) String() string { return proto.CompactTextString(m) } func (*SetFriendCommentReq) ProtoMessage() {} func (*SetFriendCommentReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{23} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{26} } func (m *SetFriendCommentReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetFriendCommentReq.Unmarshal(m, b) @@ -1176,22 +1243,153 @@ func (m *SetFriendCommentReq) GetRemark() string { return "" } +type SetFriendCommentResp 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 *SetFriendCommentResp) Reset() { *m = SetFriendCommentResp{} } +func (m *SetFriendCommentResp) String() string { return proto.CompactTextString(m) } +func (*SetFriendCommentResp) ProtoMessage() {} +func (*SetFriendCommentResp) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{27} +} +func (m *SetFriendCommentResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetFriendCommentResp.Unmarshal(m, b) +} +func (m *SetFriendCommentResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetFriendCommentResp.Marshal(b, m, deterministic) +} +func (dst *SetFriendCommentResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetFriendCommentResp.Merge(dst, src) +} +func (m *SetFriendCommentResp) XXX_Size() int { + return xxx_messageInfo_SetFriendCommentResp.Size(m) +} +func (m *SetFriendCommentResp) XXX_DiscardUnknown() { + xxx_messageInfo_SetFriendCommentResp.DiscardUnknown(m) +} + +var xxx_messageInfo_SetFriendCommentResp proto.InternalMessageInfo + +func (m *SetFriendCommentResp) GetCommonResp() *CommonResp { + if m != nil { + return m.CommonResp + } + return nil +} + +type GetSelfApplyListReq struct { + CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetSelfApplyListReq) Reset() { *m = GetSelfApplyListReq{} } +func (m *GetSelfApplyListReq) String() string { return proto.CompactTextString(m) } +func (*GetSelfApplyListReq) ProtoMessage() {} +func (*GetSelfApplyListReq) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{28} +} +func (m *GetSelfApplyListReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetSelfApplyListReq.Unmarshal(m, b) +} +func (m *GetSelfApplyListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetSelfApplyListReq.Marshal(b, m, deterministic) +} +func (dst *GetSelfApplyListReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetSelfApplyListReq.Merge(dst, src) +} +func (m *GetSelfApplyListReq) XXX_Size() int { + return xxx_messageInfo_GetSelfApplyListReq.Size(m) +} +func (m *GetSelfApplyListReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetSelfApplyListReq.DiscardUnknown(m) +} + +var xxx_messageInfo_GetSelfApplyListReq proto.InternalMessageInfo + +func (m *GetSelfApplyListReq) GetCommID() *CommID { + if m != nil { + return m.CommID + } + return nil +} + +type GetSelfApplyListResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` + FriendRequestList []*sdk_ws.FriendRequest `protobuf:"bytes,3,rep,name=FriendRequestList" json:"FriendRequestList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetSelfApplyListResp) Reset() { *m = GetSelfApplyListResp{} } +func (m *GetSelfApplyListResp) String() string { return proto.CompactTextString(m) } +func (*GetSelfApplyListResp) ProtoMessage() {} +func (*GetSelfApplyListResp) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{29} +} +func (m *GetSelfApplyListResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetSelfApplyListResp.Unmarshal(m, b) +} +func (m *GetSelfApplyListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetSelfApplyListResp.Marshal(b, m, deterministic) +} +func (dst *GetSelfApplyListResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetSelfApplyListResp.Merge(dst, src) +} +func (m *GetSelfApplyListResp) XXX_Size() int { + return xxx_messageInfo_GetSelfApplyListResp.Size(m) +} +func (m *GetSelfApplyListResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetSelfApplyListResp.DiscardUnknown(m) +} + +var xxx_messageInfo_GetSelfApplyListResp proto.InternalMessageInfo + +func (m *GetSelfApplyListResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *GetSelfApplyListResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *GetSelfApplyListResp) GetFriendRequestList() []*sdk_ws.FriendRequest { + if m != nil { + return m.FriendRequestList + } + return nil +} + func init() { proto.RegisterType((*CommonResp)(nil), "friend.CommonResp") proto.RegisterType((*CommID)(nil), "friend.CommID") proto.RegisterType((*GetFriendsInfoReq)(nil), "friend.GetFriendsInfoReq") proto.RegisterType((*GetFriendInfoResp)(nil), "friend.GetFriendInfoResp") - proto.RegisterType((*FriendInfo)(nil), "friend.FriendInfo") proto.RegisterType((*AddFriendReq)(nil), "friend.AddFriendReq") + proto.RegisterType((*AddFriendResp)(nil), "friend.AddFriendResp") proto.RegisterType((*ImportFriendReq)(nil), "friend.ImportFriendReq") proto.RegisterType((*ImportFriendResp)(nil), "friend.ImportFriendResp") - proto.RegisterType((*GetFriendApplyReq)(nil), "friend.GetFriendApplyReq") - proto.RegisterType((*GetFriendApplyResp)(nil), "friend.GetFriendApplyResp") - proto.RegisterType((*ApplyUserInfo)(nil), "friend.ApplyUserInfo") - proto.RegisterType((*GetFriendListReq)(nil), "friend.getFriendListReq") - proto.RegisterType((*GetFriendListResp)(nil), "friend.getFriendListResp") + proto.RegisterType((*GetFriendApplyListReq)(nil), "friend.GetFriendApplyListReq") + proto.RegisterType((*GetFriendApplyListResp)(nil), "friend.GetFriendApplyListResp") + proto.RegisterType((*GetFriendListReq)(nil), "friend.GetFriendListReq") + proto.RegisterType((*GetFriendListResp)(nil), "friend.GetFriendListResp") proto.RegisterType((*AddBlacklistReq)(nil), "friend.AddBlacklistReq") + proto.RegisterType((*AddBlacklistResp)(nil), "friend.AddBlacklistResp") proto.RegisterType((*RemoveBlacklistReq)(nil), "friend.RemoveBlacklistReq") + proto.RegisterType((*RemoveBlacklistResp)(nil), "friend.RemoveBlacklistResp") proto.RegisterType((*GetBlacklistReq)(nil), "friend.GetBlacklistReq") proto.RegisterType((*GetBlacklistResp)(nil), "friend.GetBlacklistResp") proto.RegisterType((*IsFriendReq)(nil), "friend.IsFriendReq") @@ -1199,8 +1397,13 @@ func init() { proto.RegisterType((*IsInBlackListReq)(nil), "friend.IsInBlackListReq") proto.RegisterType((*IsInBlackListResp)(nil), "friend.IsInBlackListResp") proto.RegisterType((*DeleteFriendReq)(nil), "friend.DeleteFriendReq") + proto.RegisterType((*DeleteFriendResp)(nil), "friend.DeleteFriendResp") proto.RegisterType((*AddFriendResponseReq)(nil), "friend.AddFriendResponseReq") + proto.RegisterType((*AddFriendResponseResp)(nil), "friend.AddFriendResponseResp") proto.RegisterType((*SetFriendCommentReq)(nil), "friend.SetFriendCommentReq") + proto.RegisterType((*SetFriendCommentResp)(nil), "friend.SetFriendCommentResp") + proto.RegisterType((*GetSelfApplyListReq)(nil), "friend.GetSelfApplyListReq") + proto.RegisterType((*GetSelfApplyListResp)(nil), "friend.GetSelfApplyListResp") } // Reference imports to suppress errors if they are not otherwise used. @@ -1214,19 +1417,19 @@ const _ = grpc.SupportPackageIsVersion4 // Client API for Friend service type FriendClient interface { - GetFriendsInfo(ctx context.Context, in *GetFriendsInfoReq, opts ...grpc.CallOption) (*GetFriendInfoResp, error) - AddFriend(ctx context.Context, in *AddFriendReq, opts ...grpc.CallOption) (*CommonResp, error) - GetFriendApplyList(ctx context.Context, in *GetFriendApplyReq, opts ...grpc.CallOption) (*GetFriendApplyResp, error) - GetSelfApplyList(ctx context.Context, in *GetFriendApplyReq, opts ...grpc.CallOption) (*GetFriendApplyResp, error) + // rpc getFriendsInfo(GetFriendsInfoReq) returns(GetFriendInfoResp); + AddFriend(ctx context.Context, in *AddFriendReq, opts ...grpc.CallOption) (*AddFriendResp, error) + GetFriendApplyList(ctx context.Context, in *GetFriendApplyListReq, opts ...grpc.CallOption) (*GetFriendApplyListResp, error) + GetSelfApplyList(ctx context.Context, in *GetSelfApplyListReq, opts ...grpc.CallOption) (*GetSelfApplyListResp, error) GetFriendList(ctx context.Context, in *GetFriendListReq, opts ...grpc.CallOption) (*GetFriendListResp, error) - AddBlacklist(ctx context.Context, in *AddBlacklistReq, opts ...grpc.CallOption) (*CommonResp, error) - RemoveBlacklist(ctx context.Context, in *RemoveBlacklistReq, opts ...grpc.CallOption) (*CommonResp, error) + AddBlacklist(ctx context.Context, in *AddBlacklistReq, opts ...grpc.CallOption) (*AddBlacklistResp, error) + RemoveBlacklist(ctx context.Context, in *RemoveBlacklistReq, opts ...grpc.CallOption) (*RemoveBlacklistResp, error) IsFriend(ctx context.Context, in *IsFriendReq, opts ...grpc.CallOption) (*IsFriendResp, error) IsInBlackList(ctx context.Context, in *IsInBlackListReq, opts ...grpc.CallOption) (*IsInBlackListResp, error) GetBlacklist(ctx context.Context, in *GetBlacklistReq, opts ...grpc.CallOption) (*GetBlacklistResp, error) - DeleteFriend(ctx context.Context, in *DeleteFriendReq, opts ...grpc.CallOption) (*CommonResp, error) - AddFriendResponse(ctx context.Context, in *AddFriendResponseReq, opts ...grpc.CallOption) (*CommonResp, error) - SetFriendComment(ctx context.Context, in *SetFriendCommentReq, opts ...grpc.CallOption) (*CommonResp, error) + DeleteFriend(ctx context.Context, in *DeleteFriendReq, opts ...grpc.CallOption) (*DeleteFriendResp, error) + AddFriendResponse(ctx context.Context, in *AddFriendResponseReq, opts ...grpc.CallOption) (*AddFriendResponseResp, error) + SetFriendComment(ctx context.Context, in *SetFriendCommentReq, opts ...grpc.CallOption) (*SetFriendCommentResp, error) ImportFriend(ctx context.Context, in *ImportFriendReq, opts ...grpc.CallOption) (*ImportFriendResp, error) } @@ -1238,17 +1441,8 @@ func NewFriendClient(cc *grpc.ClientConn) FriendClient { return &friendClient{cc} } -func (c *friendClient) GetFriendsInfo(ctx context.Context, in *GetFriendsInfoReq, opts ...grpc.CallOption) (*GetFriendInfoResp, error) { - out := new(GetFriendInfoResp) - err := grpc.Invoke(ctx, "/friend.friend/getFriendsInfo", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *friendClient) AddFriend(ctx context.Context, in *AddFriendReq, opts ...grpc.CallOption) (*CommonResp, error) { - out := new(CommonResp) +func (c *friendClient) AddFriend(ctx context.Context, in *AddFriendReq, opts ...grpc.CallOption) (*AddFriendResp, error) { + out := new(AddFriendResp) err := grpc.Invoke(ctx, "/friend.friend/addFriend", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1256,8 +1450,8 @@ func (c *friendClient) AddFriend(ctx context.Context, in *AddFriendReq, opts ... return out, nil } -func (c *friendClient) GetFriendApplyList(ctx context.Context, in *GetFriendApplyReq, opts ...grpc.CallOption) (*GetFriendApplyResp, error) { - out := new(GetFriendApplyResp) +func (c *friendClient) GetFriendApplyList(ctx context.Context, in *GetFriendApplyListReq, opts ...grpc.CallOption) (*GetFriendApplyListResp, error) { + out := new(GetFriendApplyListResp) err := grpc.Invoke(ctx, "/friend.friend/getFriendApplyList", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1265,8 +1459,8 @@ func (c *friendClient) GetFriendApplyList(ctx context.Context, in *GetFriendAppl return out, nil } -func (c *friendClient) GetSelfApplyList(ctx context.Context, in *GetFriendApplyReq, opts ...grpc.CallOption) (*GetFriendApplyResp, error) { - out := new(GetFriendApplyResp) +func (c *friendClient) GetSelfApplyList(ctx context.Context, in *GetSelfApplyListReq, opts ...grpc.CallOption) (*GetSelfApplyListResp, error) { + out := new(GetSelfApplyListResp) err := grpc.Invoke(ctx, "/friend.friend/getSelfApplyList", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1283,8 +1477,8 @@ func (c *friendClient) GetFriendList(ctx context.Context, in *GetFriendListReq, return out, nil } -func (c *friendClient) AddBlacklist(ctx context.Context, in *AddBlacklistReq, opts ...grpc.CallOption) (*CommonResp, error) { - out := new(CommonResp) +func (c *friendClient) AddBlacklist(ctx context.Context, in *AddBlacklistReq, opts ...grpc.CallOption) (*AddBlacklistResp, error) { + out := new(AddBlacklistResp) err := grpc.Invoke(ctx, "/friend.friend/addBlacklist", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1292,8 +1486,8 @@ func (c *friendClient) AddBlacklist(ctx context.Context, in *AddBlacklistReq, op return out, nil } -func (c *friendClient) RemoveBlacklist(ctx context.Context, in *RemoveBlacklistReq, opts ...grpc.CallOption) (*CommonResp, error) { - out := new(CommonResp) +func (c *friendClient) RemoveBlacklist(ctx context.Context, in *RemoveBlacklistReq, opts ...grpc.CallOption) (*RemoveBlacklistResp, error) { + out := new(RemoveBlacklistResp) err := grpc.Invoke(ctx, "/friend.friend/removeBlacklist", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1328,8 +1522,8 @@ func (c *friendClient) GetBlacklist(ctx context.Context, in *GetBlacklistReq, op return out, nil } -func (c *friendClient) DeleteFriend(ctx context.Context, in *DeleteFriendReq, opts ...grpc.CallOption) (*CommonResp, error) { - out := new(CommonResp) +func (c *friendClient) DeleteFriend(ctx context.Context, in *DeleteFriendReq, opts ...grpc.CallOption) (*DeleteFriendResp, error) { + out := new(DeleteFriendResp) err := grpc.Invoke(ctx, "/friend.friend/deleteFriend", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1337,8 +1531,8 @@ func (c *friendClient) DeleteFriend(ctx context.Context, in *DeleteFriendReq, op return out, nil } -func (c *friendClient) AddFriendResponse(ctx context.Context, in *AddFriendResponseReq, opts ...grpc.CallOption) (*CommonResp, error) { - out := new(CommonResp) +func (c *friendClient) AddFriendResponse(ctx context.Context, in *AddFriendResponseReq, opts ...grpc.CallOption) (*AddFriendResponseResp, error) { + out := new(AddFriendResponseResp) err := grpc.Invoke(ctx, "/friend.friend/addFriendResponse", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1346,8 +1540,8 @@ func (c *friendClient) AddFriendResponse(ctx context.Context, in *AddFriendRespo return out, nil } -func (c *friendClient) SetFriendComment(ctx context.Context, in *SetFriendCommentReq, opts ...grpc.CallOption) (*CommonResp, error) { - out := new(CommonResp) +func (c *friendClient) SetFriendComment(ctx context.Context, in *SetFriendCommentReq, opts ...grpc.CallOption) (*SetFriendCommentResp, error) { + out := new(SetFriendCommentResp) err := grpc.Invoke(ctx, "/friend.friend/setFriendComment", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1357,7 +1551,7 @@ func (c *friendClient) SetFriendComment(ctx context.Context, in *SetFriendCommen func (c *friendClient) ImportFriend(ctx context.Context, in *ImportFriendReq, opts ...grpc.CallOption) (*ImportFriendResp, error) { out := new(ImportFriendResp) - err := grpc.Invoke(ctx, "/friend.friend/ImportFriend", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/friend.friend/importFriend", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1367,19 +1561,19 @@ func (c *friendClient) ImportFriend(ctx context.Context, in *ImportFriendReq, op // Server API for Friend service type FriendServer interface { - GetFriendsInfo(context.Context, *GetFriendsInfoReq) (*GetFriendInfoResp, error) - AddFriend(context.Context, *AddFriendReq) (*CommonResp, error) - GetFriendApplyList(context.Context, *GetFriendApplyReq) (*GetFriendApplyResp, error) - GetSelfApplyList(context.Context, *GetFriendApplyReq) (*GetFriendApplyResp, error) + // rpc getFriendsInfo(GetFriendsInfoReq) returns(GetFriendInfoResp); + AddFriend(context.Context, *AddFriendReq) (*AddFriendResp, error) + GetFriendApplyList(context.Context, *GetFriendApplyListReq) (*GetFriendApplyListResp, error) + GetSelfApplyList(context.Context, *GetSelfApplyListReq) (*GetSelfApplyListResp, error) GetFriendList(context.Context, *GetFriendListReq) (*GetFriendListResp, error) - AddBlacklist(context.Context, *AddBlacklistReq) (*CommonResp, error) - RemoveBlacklist(context.Context, *RemoveBlacklistReq) (*CommonResp, error) + AddBlacklist(context.Context, *AddBlacklistReq) (*AddBlacklistResp, error) + RemoveBlacklist(context.Context, *RemoveBlacklistReq) (*RemoveBlacklistResp, error) IsFriend(context.Context, *IsFriendReq) (*IsFriendResp, error) IsInBlackList(context.Context, *IsInBlackListReq) (*IsInBlackListResp, error) GetBlacklist(context.Context, *GetBlacklistReq) (*GetBlacklistResp, error) - DeleteFriend(context.Context, *DeleteFriendReq) (*CommonResp, error) - AddFriendResponse(context.Context, *AddFriendResponseReq) (*CommonResp, error) - SetFriendComment(context.Context, *SetFriendCommentReq) (*CommonResp, error) + DeleteFriend(context.Context, *DeleteFriendReq) (*DeleteFriendResp, error) + AddFriendResponse(context.Context, *AddFriendResponseReq) (*AddFriendResponseResp, error) + SetFriendComment(context.Context, *SetFriendCommentReq) (*SetFriendCommentResp, error) ImportFriend(context.Context, *ImportFriendReq) (*ImportFriendResp, error) } @@ -1387,24 +1581,6 @@ func RegisterFriendServer(s *grpc.Server, srv FriendServer) { s.RegisterService(&_Friend_serviceDesc, srv) } -func _Friend_GetFriendsInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetFriendsInfoReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FriendServer).GetFriendsInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/friend.friend/GetFriendsInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).GetFriendsInfo(ctx, req.(*GetFriendsInfoReq)) - } - return interceptor(ctx, in, info, handler) -} - func _Friend_AddFriend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AddFriendReq) if err := dec(in); err != nil { @@ -1424,7 +1600,7 @@ func _Friend_AddFriend_Handler(srv interface{}, ctx context.Context, dec func(in } func _Friend_GetFriendApplyList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetFriendApplyReq) + in := new(GetFriendApplyListReq) if err := dec(in); err != nil { return nil, err } @@ -1436,13 +1612,13 @@ func _Friend_GetFriendApplyList_Handler(srv interface{}, ctx context.Context, de FullMethod: "/friend.friend/GetFriendApplyList", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).GetFriendApplyList(ctx, req.(*GetFriendApplyReq)) + return srv.(FriendServer).GetFriendApplyList(ctx, req.(*GetFriendApplyListReq)) } return interceptor(ctx, in, info, handler) } func _Friend_GetSelfApplyList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetFriendApplyReq) + in := new(GetSelfApplyListReq) if err := dec(in); err != nil { return nil, err } @@ -1454,7 +1630,7 @@ func _Friend_GetSelfApplyList_Handler(srv interface{}, ctx context.Context, dec FullMethod: "/friend.friend/GetSelfApplyList", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).GetSelfApplyList(ctx, req.(*GetFriendApplyReq)) + return srv.(FriendServer).GetSelfApplyList(ctx, req.(*GetSelfApplyListReq)) } return interceptor(ctx, in, info, handler) } @@ -1643,10 +1819,6 @@ var _Friend_serviceDesc = grpc.ServiceDesc{ ServiceName: "friend.friend", HandlerType: (*FriendServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "getFriendsInfo", - Handler: _Friend_GetFriendsInfo_Handler, - }, { MethodName: "addFriend", Handler: _Friend_AddFriend_Handler, @@ -1696,7 +1868,7 @@ var _Friend_serviceDesc = grpc.ServiceDesc{ Handler: _Friend_SetFriendComment_Handler, }, { - MethodName: "ImportFriend", + MethodName: "importFriend", Handler: _Friend_ImportFriend_Handler, }, }, @@ -1704,68 +1876,66 @@ var _Friend_serviceDesc = grpc.ServiceDesc{ Metadata: "friend/friend.proto", } -func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_525e368387d696e2) } - -var fileDescriptor_friend_525e368387d696e2 = []byte{ - // 950 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0x5f, 0x6f, 0xe3, 0x44, - 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x5e, 0x4e, - 0xe4, 0xcf, 0x9b, 0x6d, 0xf1, 0xcf, 0xe4, 0xdb, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x3e, 0x04, - 0x07, 0x68, 0xdb, 0x0c, 0x00, 0x00, +func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_a4d5a06cd0a3d99f) } + +var fileDescriptor_friend_a4d5a06cd0a3d99f = []byte{ + // 919 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcb, 0x4f, 0xf3, 0x46, + 0x10, 0x97, 0x09, 0x84, 0x64, 0x12, 0x48, 0xb2, 0x09, 0x90, 0x9a, 0x87, 0x52, 0x1f, 0xaa, 0xa8, + 0x87, 0x44, 0x4a, 0x45, 0x55, 0x4a, 0x5b, 0x14, 0x08, 0xa1, 0xa6, 0xa5, 0x20, 0x53, 0x2e, 0x55, + 0x25, 0x64, 0xf0, 0x26, 0xb5, 0xe2, 0xd8, 0x8b, 0xd7, 0x14, 0xf5, 0xd2, 0x43, 0x0f, 0xbd, 0x56, + 0xaa, 0x7a, 0xeb, 0xad, 0x7f, 0x69, 0x65, 0xaf, 0x1d, 0xaf, 0x1f, 0x41, 0x9f, 0xcd, 0x27, 0x7d, + 0x27, 0x98, 0x99, 0x9d, 0xf1, 0x6f, 0x1e, 0xfb, 0x9b, 0x0d, 0x34, 0x27, 0xb6, 0x8e, 0x4d, 0xad, + 0xcf, 0xfe, 0xf4, 0x88, 0x6d, 0x39, 0x16, 0x2a, 0x32, 0x49, 0xfc, 0xf8, 0x9a, 0x60, 0xf3, 0x5e, + 0xbe, 0xea, 0x93, 0xd9, 0xb4, 0xef, 0x99, 0xfa, 0x54, 0x9b, 0xdd, 0xbf, 0xd0, 0xfe, 0x0b, 0x65, + 0x47, 0xa5, 0x6f, 0x00, 0xce, 0xac, 0xf9, 0xdc, 0x32, 0x15, 0x4c, 0x09,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, 0xce, 0xa2, 0x2f, 0xa0, + 0xac, 0x06, 0xed, 0x44, 0xad, 0x20, 0x09, 0xfe, 0xcd, 0x24, 0x6e, 0xa5, 0x68, 0x29, 0x41, 0xb7, + 0x80, 0xa6, 0x89, 0x2d, 0x8b, 0xf6, 0x83, 0xc3, 0xa9, 0x3b, 0x5c, 0x3c, 0x78, 0xcd, 0x4c, 0x09, + 0xba, 0x82, 0xfa, 0x34, 0x56, 0x2d, 0xb4, 0xcb, 0xf9, 0xc4, 0xfb, 0x20, 0xee, 0x2d, 0x37, 0x52, + 0x82, 0x46, 0xb0, 0x31, 0xe5, 0xd7, 0x26, 0x6a, 0x27, 0xbe, 0x1f, 0x04, 0xfa, 0x68, 0x89, 0x85, + 0x12, 0x34, 0x84, 0xaa, 0xca, 0x6d, 0x2e, 0xb4, 0xc3, 0x15, 0x84, 0xa7, 0x7f, 0xb1, 0x9d, 0x6e, + 0xa0, 0x04, 0x5d, 0x42, 0xcd, 0x8e, 0xae, 0x1d, 0x24, 0x06, 0x87, 0x93, 0xdb, 0x4c, 0xdc, 0x5d, + 0x6a, 0xa3, 0x04, 0x1d, 0x42, 0x49, 0xf7, 0x39, 0x17, 0x35, 0x83, 0x83, 0x1c, 0x79, 0x8b, 0xad, + 0xa4, 0x92, 0xd5, 0x42, 0xe7, 0x09, 0x31, 0xac, 0x45, 0x9c, 0x63, 0xc3, 0x5a, 0x24, 0x19, 0x74, + 0x08, 0xd5, 0x29, 0xb7, 0xb8, 0xc2, 0x5a, 0xc4, 0x56, 0xa1, 0xd8, 0x4e, 0x37, 0xb0, 0x10, 0x1a, + 0xc7, 0x7d, 0x61, 0x88, 0x18, 0x99, 0x86, 0x21, 0x12, 0x54, 0x79, 0x03, 0x0d, 0x35, 0x4e, 0x42, + 0x68, 0x2f, 0x75, 0x4e, 0x7d, 0x46, 0x14, 0xf7, 0x5f, 0xb1, 0xb2, 0xc1, 0xa3, 0x31, 0xca, 0x08, + 0x07, 0x2f, 0x85, 0xa3, 0xc2, 0xc1, 0x4b, 0x65, 0x9a, 0x21, 0x54, 0x75, 0xee, 0x11, 0x1d, 0xe6, + 0x18, 0x7b, 0xf7, 0x87, 0x39, 0xc6, 0xdf, 0xdc, 0xa7, 0x8d, 0x9f, 0x6a, 0x3d, 0xff, 0x27, 0xe8, + 0x31, 0xfb, 0xf3, 0x50, 0xf4, 0x7e, 0x5f, 0x7e, 0xf6, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcc, + 0xd1, 0x9d, 0x13, 0xa1, 0x0e, 0x00, 0x00, } diff --git a/pkg/proto/friend/friend.proto b/pkg/proto/friend/friend.proto index 4591e9704..052eb1d9d 100644 --- a/pkg/proto/friend/friend.proto +++ b/pkg/proto/friend/friend.proto @@ -15,138 +15,151 @@ message CommID{ string FromUserID = 5; } + message GetFriendsInfoReq{ CommID CommID = 1; } - message GetFriendInfoResp{ int32 ErrCode = 1; string ErrMsg = 2; - FriendInfo Data = 3; -} - -message FriendInfo{ - string OwnerUserID = 1; - string Remark = 2; - uint64 CreateTime = 3; - open_im_sdk.UserInfo FriendUser = 4; - int32 IsBlack = 5; + repeated open_im_sdk.FriendInfo FriendInfoList = 3; +// int32 IsBlack = 4; } message AddFriendReq{ CommID CommID = 1; - string ReqMessage = 2; + string ReqMsg = 2; +} +message AddFriendResp{ + CommonResp CommonResp = 1; } + message ImportFriendReq{ repeated string FriendUserIDList = 1; string OperationID = 2; string FromUserID = 3; string OpUserID = 4; } - message ImportFriendResp{ - CommonResp commonResp = 1; - repeated string failedUidList = 2; + CommonResp CommonResp = 1; + repeated string FailedFriendUserIDList = 2; } -message GetFriendApplyReq{ + +message GetFriendApplyListReq{ CommID CommID = 1; } -message GetFriendApplyResp{ +message GetFriendApplyListResp{ int32 ErrCode = 1; string ErrMsg = 2; - repeated ApplyUserInfo data = 4; -} - -message ApplyUserInfo{ - open_im_sdk.PublicUserInfo UserInfo = 1; - int64 applyTime = 2; - string reqMessage = 3; - int32 Flag = 4; + repeated open_im_sdk.FriendRequest FriendRequestList = 3; } -message getFriendListReq{ +message GetFriendListReq{ CommID CommID = 1; } - -message getFriendListResp{ +message GetFriendListResp{ int32 ErrCode = 1; string ErrMsg = 2; - repeated FriendInfo Data = 3; + repeated open_im_sdk.FriendInfo FriendInfoList = 3; } message AddBlacklistReq{ CommID CommID = 1; } +message AddBlacklistResp{ + CommonResp CommonResp = 1; +} message RemoveBlacklistReq{ CommID CommID = 1; } - +message RemoveBlacklistResp{ + CommonResp CommonResp = 1; +} message GetBlacklistReq{ CommID CommID = 1; } - message GetBlacklistResp{ int32 ErrCode = 1; string ErrMsg = 2; - repeated open_im_sdk.PublicUserInfo data = 3; + repeated open_im_sdk.PublicUserInfo BlackUserInfoList = 3; } + message IsFriendReq{ CommID CommID = 1; } - message IsFriendResp{ int32 ErrCode = 1; string ErrMsg = 2; - int32 ShipType = 3; + bool Response = 3; } + message IsInBlackListReq{ CommID CommID = 1; } - message IsInBlackListResp{ int32 ErrCode = 1; string ErrMsg = 2; bool Response = 3; } + message DeleteFriendReq{ CommID CommID = 1; } +message DeleteFriendResp{ + CommonResp CommonResp = 1; +} - +//process message AddFriendResponseReq{ CommID CommID = 1; int32 flag = 2; + string handleMsg = 3; +} +message AddFriendResponseResp{ + CommonResp CommonResp = 1; } message SetFriendCommentReq{ CommID CommID = 1; string Remark = 2; } +message SetFriendCommentResp{ + CommonResp CommonResp = 1; +} + +message GetSelfApplyListReq{ + CommID CommID = 1; +} +message GetSelfApplyListResp{ + int32 ErrCode = 1; + string ErrMsg = 2; + repeated open_im_sdk.FriendRequest FriendRequestList = 3; +} service friend{ - rpc getFriendsInfo(GetFriendsInfoReq) returns(GetFriendInfoResp); - rpc addFriend(AddFriendReq) returns(CommonResp); - rpc getFriendApplyList(GetFriendApplyReq) returns(GetFriendApplyResp); - rpc getSelfApplyList(GetFriendApplyReq) returns(GetFriendApplyResp); - rpc getFriendList(getFriendListReq) returns(getFriendListResp); - rpc addBlacklist(AddBlacklistReq) returns(CommonResp); - rpc removeBlacklist(RemoveBlacklistReq) returns(CommonResp); + // rpc getFriendsInfo(GetFriendsInfoReq) returns(GetFriendInfoResp); + rpc addFriend(AddFriendReq) returns(AddFriendResp); + rpc getFriendApplyList(GetFriendApplyListReq) returns(GetFriendApplyListResp); + rpc getSelfApplyList(GetSelfApplyListReq) returns(GetSelfApplyListResp); + rpc getFriendList(GetFriendListReq) returns(GetFriendListResp); + rpc addBlacklist(AddBlacklistReq) returns(AddBlacklistResp); + rpc removeBlacklist(RemoveBlacklistReq) returns(RemoveBlacklistResp); rpc isFriend(IsFriendReq) returns(IsFriendResp); rpc isInBlackList(IsInBlackListReq) returns(IsInBlackListResp); rpc getBlacklist(GetBlacklistReq) returns(GetBlacklistResp); - rpc deleteFriend(DeleteFriendReq) returns(CommonResp); - rpc addFriendResponse(AddFriendResponseReq) returns(CommonResp); - rpc setFriendComment(SetFriendCommentReq) returns(CommonResp); - rpc ImportFriend(ImportFriendReq) returns(ImportFriendResp); + rpc deleteFriend(DeleteFriendReq) returns(DeleteFriendResp); + rpc addFriendResponse(AddFriendResponseReq) returns(AddFriendResponseResp); + rpc setFriendComment(SetFriendCommentReq) returns(SetFriendCommentResp); + rpc importFriend(ImportFriendReq) returns(ImportFriendResp); } \ No newline at end of file diff --git a/pkg/proto/group/group.pb.go b/pkg/proto/group/group.pb.go index cbd93fb5e..ea305a14b 100644 --- a/pkg/proto/group/group.pb.go +++ b/pkg/proto/group/group.pb.go @@ -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_group_95297d6a59bab850, []int{0} + return fileDescriptor_group_5b7911b898fdd5c5, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -72,7 +72,7 @@ func (m *CommonResp) GetErrMsg() string { type GroupAddMemberInfo struct { UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` - Role int32 `protobuf:"varint,2,opt,name=Role" json:"Role,omitempty"` + RoleLevel int32 `protobuf:"varint,2,opt,name=RoleLevel" json:"RoleLevel,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -82,7 +82,7 @@ func (m *GroupAddMemberInfo) Reset() { *m = GroupAddMemberInfo{} } func (m *GroupAddMemberInfo) String() string { return proto.CompactTextString(m) } func (*GroupAddMemberInfo) ProtoMessage() {} func (*GroupAddMemberInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{1} + return fileDescriptor_group_5b7911b898fdd5c5, []int{1} } func (m *GroupAddMemberInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupAddMemberInfo.Unmarshal(m, b) @@ -109,23 +109,19 @@ func (m *GroupAddMemberInfo) GetUserID() string { return "" } -func (m *GroupAddMemberInfo) GetRole() int32 { +func (m *GroupAddMemberInfo) GetRoleLevel() int32 { if m != nil { - return m.Role + return m.RoleLevel } return 0 } type CreateGroupReq struct { InitMemberList []*GroupAddMemberInfo `protobuf:"bytes,1,rep,name=InitMemberList" json:"InitMemberList,omitempty"` - GroupName string `protobuf:"bytes,2,opt,name=GroupName" json:"GroupName,omitempty"` - Introduction string `protobuf:"bytes,3,opt,name=Introduction" json:"Introduction,omitempty"` - Notification string `protobuf:"bytes,4,opt,name=Notification" json:"Notification,omitempty"` - FaceUrl string `protobuf:"bytes,5,opt,name=FaceUrl" json:"FaceUrl,omitempty"` - Ext string `protobuf:"bytes,6,opt,name=Ext" json:"Ext,omitempty"` - OperationID string `protobuf:"bytes,7,opt,name=OperationID" json:"OperationID,omitempty"` - OpUserID string `protobuf:"bytes,8,opt,name=OpUserID" json:"OpUserID,omitempty"` - FromUserID string `protobuf:"bytes,9,opt,name=FromUserID" json:"FromUserID,omitempty"` + GroupInfo *sdk_ws.GroupInfo `protobuf:"bytes,2,opt,name=GroupInfo" json:"GroupInfo,omitempty"` + OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"` + OpUserID string `protobuf:"bytes,4,opt,name=OpUserID" json:"OpUserID,omitempty"` + OwnerUserID string `protobuf:"bytes,5,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -135,7 +131,7 @@ func (m *CreateGroupReq) Reset() { *m = CreateGroupReq{} } func (m *CreateGroupReq) String() string { return proto.CompactTextString(m) } func (*CreateGroupReq) ProtoMessage() {} func (*CreateGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{2} + return fileDescriptor_group_5b7911b898fdd5c5, []int{2} } func (m *CreateGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateGroupReq.Unmarshal(m, b) @@ -162,39 +158,11 @@ func (m *CreateGroupReq) GetInitMemberList() []*GroupAddMemberInfo { return nil } -func (m *CreateGroupReq) GetGroupName() string { +func (m *CreateGroupReq) GetGroupInfo() *sdk_ws.GroupInfo { if m != nil { - return m.GroupName - } - return "" -} - -func (m *CreateGroupReq) GetIntroduction() string { - if m != nil { - return m.Introduction - } - return "" -} - -func (m *CreateGroupReq) GetNotification() string { - if m != nil { - return m.Notification - } - return "" -} - -func (m *CreateGroupReq) GetFaceUrl() string { - if m != nil { - return m.FaceUrl - } - return "" -} - -func (m *CreateGroupReq) GetExt() string { - if m != nil { - return m.Ext + return m.GroupInfo } - return "" + return nil } func (m *CreateGroupReq) GetOperationID() string { @@ -211,9 +179,9 @@ func (m *CreateGroupReq) GetOpUserID() string { return "" } -func (m *CreateGroupReq) GetFromUserID() string { +func (m *CreateGroupReq) GetOwnerUserID() string { if m != nil { - return m.FromUserID + return m.OwnerUserID } return "" } @@ -231,7 +199,7 @@ func (m *CreateGroupResp) Reset() { *m = CreateGroupResp{} } func (m *CreateGroupResp) String() string { return proto.CompactTextString(m) } func (*CreateGroupResp) ProtoMessage() {} func (*CreateGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{3} + return fileDescriptor_group_5b7911b898fdd5c5, []int{3} } func (m *CreateGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateGroupResp.Unmarshal(m, b) @@ -285,7 +253,7 @@ func (m *GetGroupsInfoReq) Reset() { *m = GetGroupsInfoReq{} } func (m *GetGroupsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupsInfoReq) ProtoMessage() {} func (*GetGroupsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{4} + return fileDescriptor_group_5b7911b898fdd5c5, []int{4} } func (m *GetGroupsInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsInfoReq.Unmarshal(m, b) @@ -339,7 +307,7 @@ func (m *GetGroupsInfoResp) Reset() { *m = GetGroupsInfoResp{} } func (m *GetGroupsInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupsInfoResp) ProtoMessage() {} func (*GetGroupsInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{5} + return fileDescriptor_group_5b7911b898fdd5c5, []int{5} } func (m *GetGroupsInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsInfoResp.Unmarshal(m, b) @@ -393,7 +361,7 @@ func (m *SetGroupInfoReq) Reset() { *m = SetGroupInfoReq{} } func (m *SetGroupInfoReq) String() string { return proto.CompactTextString(m) } func (*SetGroupInfoReq) ProtoMessage() {} func (*SetGroupInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{6} + return fileDescriptor_group_5b7911b898fdd5c5, []int{6} } func (m *SetGroupInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupInfoReq.Unmarshal(m, b) @@ -434,6 +402,44 @@ func (m *SetGroupInfoReq) GetOperationID() string { return "" } +type SetGroupInfoResp 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 *SetGroupInfoResp) Reset() { *m = SetGroupInfoResp{} } +func (m *SetGroupInfoResp) String() string { return proto.CompactTextString(m) } +func (*SetGroupInfoResp) ProtoMessage() {} +func (*SetGroupInfoResp) Descriptor() ([]byte, []int) { + return fileDescriptor_group_5b7911b898fdd5c5, []int{7} +} +func (m *SetGroupInfoResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetGroupInfoResp.Unmarshal(m, b) +} +func (m *SetGroupInfoResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetGroupInfoResp.Marshal(b, m, deterministic) +} +func (dst *SetGroupInfoResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetGroupInfoResp.Merge(dst, src) +} +func (m *SetGroupInfoResp) XXX_Size() int { + return xxx_messageInfo_SetGroupInfoResp.Size(m) +} +func (m *SetGroupInfoResp) XXX_DiscardUnknown() { + xxx_messageInfo_SetGroupInfoResp.DiscardUnknown(m) +} + +var xxx_messageInfo_SetGroupInfoResp proto.InternalMessageInfo + +func (m *SetGroupInfoResp) GetCommonResp() *CommonResp { + if m != nil { + return m.CommonResp + } + return nil +} + type GetGroupApplicationListReq struct { OpUserID string `protobuf:"bytes,1,opt,name=OpUserID" json:"OpUserID,omitempty"` OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` @@ -447,7 +453,7 @@ func (m *GetGroupApplicationListReq) Reset() { *m = GetGroupApplicationL func (m *GetGroupApplicationListReq) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListReq) ProtoMessage() {} func (*GetGroupApplicationListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{7} + return fileDescriptor_group_5b7911b898fdd5c5, []int{8} } func (m *GetGroupApplicationListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationListReq.Unmarshal(m, b) @@ -488,224 +494,20 @@ func (m *GetGroupApplicationListReq) GetFromUserID() string { return "" } -type GetGroupApplicationList_Data_User struct { - ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"` - GroupID string `protobuf:"bytes,2,opt,name=GroupID" json:"GroupID,omitempty"` - FromUserID string `protobuf:"bytes,3,opt,name=FromUserID" json:"FromUserID,omitempty"` - ToUserID string `protobuf:"bytes,4,opt,name=ToUserID" json:"ToUserID,omitempty"` - Flag int32 `protobuf:"varint,5,opt,name=Flag" json:"Flag,omitempty"` - RequestMsg string `protobuf:"bytes,6,opt,name=RequestMsg" json:"RequestMsg,omitempty"` - HandledMsg string `protobuf:"bytes,7,opt,name=HandledMsg" json:"HandledMsg,omitempty"` - AddTime int64 `protobuf:"varint,8,opt,name=AddTime" json:"AddTime,omitempty"` - FromUserNickname string `protobuf:"bytes,9,opt,name=FromUserNickname" json:"FromUserNickname,omitempty"` - ToUserNickname string `protobuf:"bytes,10,opt,name=ToUserNickname" json:"ToUserNickname,omitempty"` - FromUserFaceUrl string `protobuf:"bytes,11,opt,name=FromUserFaceUrl" json:"FromUserFaceUrl,omitempty"` - ToUserFaceUrl string `protobuf:"bytes,12,opt,name=ToUserFaceUrl" json:"ToUserFaceUrl,omitempty"` - HandledUser string `protobuf:"bytes,13,opt,name=HandledUser" json:"HandledUser,omitempty"` - Type int32 `protobuf:"varint,14,opt,name=Type" json:"Type,omitempty"` - HandleStatus int32 `protobuf:"varint,15,opt,name=HandleStatus" json:"HandleStatus,omitempty"` - HandleResult int32 `protobuf:"varint,16,opt,name=HandleResult" json:"HandleResult,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetGroupApplicationList_Data_User) Reset() { *m = GetGroupApplicationList_Data_User{} } -func (m *GetGroupApplicationList_Data_User) String() string { return proto.CompactTextString(m) } -func (*GetGroupApplicationList_Data_User) ProtoMessage() {} -func (*GetGroupApplicationList_Data_User) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{8} -} -func (m *GetGroupApplicationList_Data_User) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupApplicationList_Data_User.Unmarshal(m, b) -} -func (m *GetGroupApplicationList_Data_User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupApplicationList_Data_User.Marshal(b, m, deterministic) -} -func (dst *GetGroupApplicationList_Data_User) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupApplicationList_Data_User.Merge(dst, src) -} -func (m *GetGroupApplicationList_Data_User) XXX_Size() int { - return xxx_messageInfo_GetGroupApplicationList_Data_User.Size(m) -} -func (m *GetGroupApplicationList_Data_User) XXX_DiscardUnknown() { - xxx_messageInfo_GetGroupApplicationList_Data_User.DiscardUnknown(m) -} - -var xxx_messageInfo_GetGroupApplicationList_Data_User proto.InternalMessageInfo - -func (m *GetGroupApplicationList_Data_User) GetID() string { - if m != nil { - return m.ID - } - return "" -} - -func (m *GetGroupApplicationList_Data_User) GetGroupID() string { - if m != nil { - return m.GroupID - } - return "" -} - -func (m *GetGroupApplicationList_Data_User) GetFromUserID() string { - if m != nil { - return m.FromUserID - } - return "" -} - -func (m *GetGroupApplicationList_Data_User) GetToUserID() string { - if m != nil { - return m.ToUserID - } - return "" -} - -func (m *GetGroupApplicationList_Data_User) GetFlag() int32 { - if m != nil { - return m.Flag - } - return 0 -} - -func (m *GetGroupApplicationList_Data_User) GetRequestMsg() string { - if m != nil { - return m.RequestMsg - } - return "" -} - -func (m *GetGroupApplicationList_Data_User) GetHandledMsg() string { - if m != nil { - return m.HandledMsg - } - return "" -} - -func (m *GetGroupApplicationList_Data_User) GetAddTime() int64 { - if m != nil { - return m.AddTime - } - return 0 -} - -func (m *GetGroupApplicationList_Data_User) GetFromUserNickname() string { - if m != nil { - return m.FromUserNickname - } - return "" -} - -func (m *GetGroupApplicationList_Data_User) GetToUserNickname() string { - if m != nil { - return m.ToUserNickname - } - return "" -} - -func (m *GetGroupApplicationList_Data_User) GetFromUserFaceUrl() string { - if m != nil { - return m.FromUserFaceUrl - } - return "" -} - -func (m *GetGroupApplicationList_Data_User) GetToUserFaceUrl() string { - if m != nil { - return m.ToUserFaceUrl - } - return "" -} - -func (m *GetGroupApplicationList_Data_User) GetHandledUser() string { - if m != nil { - return m.HandledUser - } - return "" -} - -func (m *GetGroupApplicationList_Data_User) GetType() int32 { - if m != nil { - return m.Type - } - return 0 -} - -func (m *GetGroupApplicationList_Data_User) GetHandleStatus() int32 { - if m != nil { - return m.HandleStatus - } - return 0 -} - -func (m *GetGroupApplicationList_Data_User) GetHandleResult() int32 { - if m != nil { - return m.HandleResult - } - return 0 -} - -type GetGroupApplicationListData struct { - Count int32 `protobuf:"varint,1,opt,name=Count" json:"Count,omitempty"` - User []*GetGroupApplicationList_Data_User `protobuf:"bytes,2,rep,name=User" json:"User,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetGroupApplicationListData) Reset() { *m = GetGroupApplicationListData{} } -func (m *GetGroupApplicationListData) String() string { return proto.CompactTextString(m) } -func (*GetGroupApplicationListData) ProtoMessage() {} -func (*GetGroupApplicationListData) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{9} -} -func (m *GetGroupApplicationListData) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupApplicationListData.Unmarshal(m, b) -} -func (m *GetGroupApplicationListData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupApplicationListData.Marshal(b, m, deterministic) -} -func (dst *GetGroupApplicationListData) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupApplicationListData.Merge(dst, src) -} -func (m *GetGroupApplicationListData) XXX_Size() int { - return xxx_messageInfo_GetGroupApplicationListData.Size(m) -} -func (m *GetGroupApplicationListData) XXX_DiscardUnknown() { - xxx_messageInfo_GetGroupApplicationListData.DiscardUnknown(m) -} - -var xxx_messageInfo_GetGroupApplicationListData proto.InternalMessageInfo - -func (m *GetGroupApplicationListData) GetCount() int32 { - if m != nil { - return m.Count - } - return 0 -} - -func (m *GetGroupApplicationListData) GetUser() []*GetGroupApplicationList_Data_User { - if m != nil { - return m.User - } - return nil -} - type GetGroupApplicationListResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - Data *GetGroupApplicationListData `protobuf:"bytes,3,opt,name=Data" json:"Data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` + GroupRequestList []*sdk_ws.GroupRequest `protobuf:"bytes,3,rep,name=GroupRequestList" json:"GroupRequestList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetGroupApplicationListResp) Reset() { *m = GetGroupApplicationListResp{} } func (m *GetGroupApplicationListResp) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListResp) ProtoMessage() {} func (*GetGroupApplicationListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{10} + return fileDescriptor_group_5b7911b898fdd5c5, []int{9} } func (m *GetGroupApplicationListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationListResp.Unmarshal(m, b) @@ -739,9 +541,9 @@ func (m *GetGroupApplicationListResp) GetErrMsg() string { return "" } -func (m *GetGroupApplicationListResp) GetData() *GetGroupApplicationListData { +func (m *GetGroupApplicationListResp) GetGroupRequestList() []*sdk_ws.GroupRequest { if m != nil { - return m.Data + return m.GroupRequestList } return nil } @@ -761,7 +563,7 @@ func (m *TransferGroupOwnerReq) Reset() { *m = TransferGroupOwnerReq{} } func (m *TransferGroupOwnerReq) String() string { return proto.CompactTextString(m) } func (*TransferGroupOwnerReq) ProtoMessage() {} func (*TransferGroupOwnerReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{11} + return fileDescriptor_group_5b7911b898fdd5c5, []int{10} } func (m *TransferGroupOwnerReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TransferGroupOwnerReq.Unmarshal(m, b) @@ -816,6 +618,44 @@ func (m *TransferGroupOwnerReq) GetOpUserID() string { return "" } +type TransferGroupOwnerResp 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 *TransferGroupOwnerResp) Reset() { *m = TransferGroupOwnerResp{} } +func (m *TransferGroupOwnerResp) String() string { return proto.CompactTextString(m) } +func (*TransferGroupOwnerResp) ProtoMessage() {} +func (*TransferGroupOwnerResp) Descriptor() ([]byte, []int) { + return fileDescriptor_group_5b7911b898fdd5c5, []int{11} +} +func (m *TransferGroupOwnerResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TransferGroupOwnerResp.Unmarshal(m, b) +} +func (m *TransferGroupOwnerResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TransferGroupOwnerResp.Marshal(b, m, deterministic) +} +func (dst *TransferGroupOwnerResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_TransferGroupOwnerResp.Merge(dst, src) +} +func (m *TransferGroupOwnerResp) XXX_Size() int { + return xxx_messageInfo_TransferGroupOwnerResp.Size(m) +} +func (m *TransferGroupOwnerResp) XXX_DiscardUnknown() { + xxx_messageInfo_TransferGroupOwnerResp.DiscardUnknown(m) +} + +var xxx_messageInfo_TransferGroupOwnerResp proto.InternalMessageInfo + +func (m *TransferGroupOwnerResp) GetCommonResp() *CommonResp { + if m != nil { + return m.CommonResp + } + return nil +} + type JoinGroupReq struct { GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` ReqMessage string `protobuf:"bytes,2,opt,name=ReqMessage" json:"ReqMessage,omitempty"` @@ -830,7 +670,7 @@ func (m *JoinGroupReq) Reset() { *m = JoinGroupReq{} } func (m *JoinGroupReq) String() string { return proto.CompactTextString(m) } func (*JoinGroupReq) ProtoMessage() {} func (*JoinGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{12} + return fileDescriptor_group_5b7911b898fdd5c5, []int{12} } func (m *JoinGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupReq.Unmarshal(m, b) @@ -878,15 +718,51 @@ func (m *JoinGroupReq) GetOperationID() string { return "" } +type JoinGroupResp 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 *JoinGroupResp) Reset() { *m = JoinGroupResp{} } +func (m *JoinGroupResp) String() string { return proto.CompactTextString(m) } +func (*JoinGroupResp) ProtoMessage() {} +func (*JoinGroupResp) Descriptor() ([]byte, []int) { + return fileDescriptor_group_5b7911b898fdd5c5, []int{13} +} +func (m *JoinGroupResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_JoinGroupResp.Unmarshal(m, b) +} +func (m *JoinGroupResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_JoinGroupResp.Marshal(b, m, deterministic) +} +func (dst *JoinGroupResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_JoinGroupResp.Merge(dst, src) +} +func (m *JoinGroupResp) XXX_Size() int { + return xxx_messageInfo_JoinGroupResp.Size(m) +} +func (m *JoinGroupResp) XXX_DiscardUnknown() { + xxx_messageInfo_JoinGroupResp.DiscardUnknown(m) +} + +var xxx_messageInfo_JoinGroupResp proto.InternalMessageInfo + +func (m *JoinGroupResp) GetCommonResp() *CommonResp { + if m != nil { + return m.CommonResp + } + return nil +} + type GroupApplicationResponseReq struct { OperationID string `protobuf:"bytes,1,opt,name=OperationID" json:"OperationID,omitempty"` OpUserID string `protobuf:"bytes,2,opt,name=OpUserID" json:"OpUserID,omitempty"` GroupID string `protobuf:"bytes,3,opt,name=GroupID" json:"GroupID,omitempty"` FromUserID string `protobuf:"bytes,4,opt,name=FromUserID" json:"FromUserID,omitempty"` - ToUserID string `protobuf:"bytes,5,opt,name=ToUserID" json:"ToUserID,omitempty"` - AddTime int64 `protobuf:"varint,6,opt,name=AddTime" json:"AddTime,omitempty"` - HandledMsg string `protobuf:"bytes,7,opt,name=HandledMsg" json:"HandledMsg,omitempty"` - HandleResult int32 `protobuf:"varint,8,opt,name=HandleResult" json:"HandleResult,omitempty"` + HandledMsg string `protobuf:"bytes,5,opt,name=HandledMsg" json:"HandledMsg,omitempty"` + HandleResult int32 `protobuf:"varint,6,opt,name=HandleResult" json:"HandleResult,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -896,7 +772,7 @@ func (m *GroupApplicationResponseReq) Reset() { *m = GroupApplicationRes func (m *GroupApplicationResponseReq) String() string { return proto.CompactTextString(m) } func (*GroupApplicationResponseReq) ProtoMessage() {} func (*GroupApplicationResponseReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{13} + return fileDescriptor_group_5b7911b898fdd5c5, []int{14} } func (m *GroupApplicationResponseReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationResponseReq.Unmarshal(m, b) @@ -944,20 +820,6 @@ func (m *GroupApplicationResponseReq) GetFromUserID() string { return "" } -func (m *GroupApplicationResponseReq) GetToUserID() string { - if m != nil { - return m.ToUserID - } - return "" -} - -func (m *GroupApplicationResponseReq) GetAddTime() int64 { - if m != nil { - return m.AddTime - } - return 0 -} - func (m *GroupApplicationResponseReq) GetHandledMsg() string { if m != nil { return m.HandledMsg @@ -972,74 +834,42 @@ func (m *GroupApplicationResponseReq) GetHandleResult() int32 { return 0 } -type SetOwnerGroupNickNameReq struct { - GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` - Nickname string `protobuf:"bytes,2,opt,name=Nickname" json:"Nickname,omitempty"` - OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"` - FromUserID string `protobuf:"bytes,4,opt,name=FromUserID" json:"FromUserID,omitempty"` - OpUserID string `protobuf:"bytes,5,opt,name=OpUserID" json:"OpUserID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type GroupApplicationResponseResp 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 *SetOwnerGroupNickNameReq) Reset() { *m = SetOwnerGroupNickNameReq{} } -func (m *SetOwnerGroupNickNameReq) String() string { return proto.CompactTextString(m) } -func (*SetOwnerGroupNickNameReq) ProtoMessage() {} -func (*SetOwnerGroupNickNameReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{14} +func (m *GroupApplicationResponseResp) Reset() { *m = GroupApplicationResponseResp{} } +func (m *GroupApplicationResponseResp) String() string { return proto.CompactTextString(m) } +func (*GroupApplicationResponseResp) ProtoMessage() {} +func (*GroupApplicationResponseResp) Descriptor() ([]byte, []int) { + return fileDescriptor_group_5b7911b898fdd5c5, []int{15} } -func (m *SetOwnerGroupNickNameReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetOwnerGroupNickNameReq.Unmarshal(m, b) +func (m *GroupApplicationResponseResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupApplicationResponseResp.Unmarshal(m, b) } -func (m *SetOwnerGroupNickNameReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetOwnerGroupNickNameReq.Marshal(b, m, deterministic) +func (m *GroupApplicationResponseResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupApplicationResponseResp.Marshal(b, m, deterministic) } -func (dst *SetOwnerGroupNickNameReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetOwnerGroupNickNameReq.Merge(dst, src) +func (dst *GroupApplicationResponseResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupApplicationResponseResp.Merge(dst, src) } -func (m *SetOwnerGroupNickNameReq) XXX_Size() int { - return xxx_messageInfo_SetOwnerGroupNickNameReq.Size(m) +func (m *GroupApplicationResponseResp) XXX_Size() int { + return xxx_messageInfo_GroupApplicationResponseResp.Size(m) } -func (m *SetOwnerGroupNickNameReq) XXX_DiscardUnknown() { - xxx_messageInfo_SetOwnerGroupNickNameReq.DiscardUnknown(m) +func (m *GroupApplicationResponseResp) XXX_DiscardUnknown() { + xxx_messageInfo_GroupApplicationResponseResp.DiscardUnknown(m) } -var xxx_messageInfo_SetOwnerGroupNickNameReq proto.InternalMessageInfo +var xxx_messageInfo_GroupApplicationResponseResp proto.InternalMessageInfo -func (m *SetOwnerGroupNickNameReq) GetGroupID() string { +func (m *GroupApplicationResponseResp) GetCommonResp() *CommonResp { if m != nil { - return m.GroupID + return m.CommonResp } - return "" -} - -func (m *SetOwnerGroupNickNameReq) GetNickname() string { - if m != nil { - return m.Nickname - } - return "" -} - -func (m *SetOwnerGroupNickNameReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -func (m *SetOwnerGroupNickNameReq) GetFromUserID() string { - if m != nil { - return m.FromUserID - } - return "" -} - -func (m *SetOwnerGroupNickNameReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" + return nil } type QuitGroupReq struct { @@ -1055,7 +885,7 @@ func (m *QuitGroupReq) Reset() { *m = QuitGroupReq{} } func (m *QuitGroupReq) String() string { return proto.CompactTextString(m) } func (*QuitGroupReq) ProtoMessage() {} func (*QuitGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{15} + return fileDescriptor_group_5b7911b898fdd5c5, []int{16} } func (m *QuitGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QuitGroupReq.Unmarshal(m, b) @@ -1096,6 +926,44 @@ func (m *QuitGroupReq) GetOpUserID() string { return "" } +type QuitGroupResp 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 *QuitGroupResp) Reset() { *m = QuitGroupResp{} } +func (m *QuitGroupResp) String() string { return proto.CompactTextString(m) } +func (*QuitGroupResp) ProtoMessage() {} +func (*QuitGroupResp) Descriptor() ([]byte, []int) { + return fileDescriptor_group_5b7911b898fdd5c5, []int{17} +} +func (m *QuitGroupResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_QuitGroupResp.Unmarshal(m, b) +} +func (m *QuitGroupResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_QuitGroupResp.Marshal(b, m, deterministic) +} +func (dst *QuitGroupResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuitGroupResp.Merge(dst, src) +} +func (m *QuitGroupResp) XXX_Size() int { + return xxx_messageInfo_QuitGroupResp.Size(m) +} +func (m *QuitGroupResp) XXX_DiscardUnknown() { + xxx_messageInfo_QuitGroupResp.DiscardUnknown(m) +} + +var xxx_messageInfo_QuitGroupResp proto.InternalMessageInfo + +func (m *QuitGroupResp) GetCommonResp() *CommonResp { + if m != nil { + return m.CommonResp + } + return nil +} + type GetGroupMemberListReq struct { GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` OpUserID string `protobuf:"bytes,2,opt,name=OpUserID" json:"OpUserID,omitempty"` @@ -1111,7 +979,7 @@ func (m *GetGroupMemberListReq) Reset() { *m = GetGroupMemberListReq{} } func (m *GetGroupMemberListReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberListReq) ProtoMessage() {} func (*GetGroupMemberListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{16} + return fileDescriptor_group_5b7911b898fdd5c5, []int{18} } func (m *GetGroupMemberListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMemberListReq.Unmarshal(m, b) @@ -1180,7 +1048,7 @@ func (m *GetGroupMemberListResp) Reset() { *m = GetGroupMemberListResp{} func (m *GetGroupMemberListResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberListResp) ProtoMessage() {} func (*GetGroupMemberListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{17} + return fileDescriptor_group_5b7911b898fdd5c5, []int{19} } func (m *GetGroupMemberListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMemberListResp.Unmarshal(m, b) @@ -1242,7 +1110,7 @@ func (m *GetGroupMembersInfoReq) Reset() { *m = GetGroupMembersInfoReq{} func (m *GetGroupMembersInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersInfoReq) ProtoMessage() {} func (*GetGroupMembersInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{18} + return fileDescriptor_group_5b7911b898fdd5c5, []int{20} } func (m *GetGroupMembersInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersInfoReq.Unmarshal(m, b) @@ -1303,7 +1171,7 @@ func (m *GetGroupMembersInfoResp) Reset() { *m = GetGroupMembersInfoResp func (m *GetGroupMembersInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersInfoResp) ProtoMessage() {} func (*GetGroupMembersInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{19} + return fileDescriptor_group_5b7911b898fdd5c5, []int{21} } func (m *GetGroupMembersInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersInfoResp.Unmarshal(m, b) @@ -1359,7 +1227,7 @@ func (m *KickGroupMemberReq) Reset() { *m = KickGroupMemberReq{} } func (m *KickGroupMemberReq) String() string { return proto.CompactTextString(m) } func (*KickGroupMemberReq) ProtoMessage() {} func (*KickGroupMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{20} + return fileDescriptor_group_5b7911b898fdd5c5, []int{22} } func (m *KickGroupMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KickGroupMemberReq.Unmarshal(m, b) @@ -1426,7 +1294,7 @@ func (m *Id2Result) Reset() { *m = Id2Result{} } func (m *Id2Result) String() string { return proto.CompactTextString(m) } func (*Id2Result) ProtoMessage() {} func (*Id2Result) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{21} + return fileDescriptor_group_5b7911b898fdd5c5, []int{23} } func (m *Id2Result) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Id2Result.Unmarshal(m, b) @@ -1473,7 +1341,7 @@ func (m *KickGroupMemberResp) Reset() { *m = KickGroupMemberResp{} } func (m *KickGroupMemberResp) String() string { return proto.CompactTextString(m) } func (*KickGroupMemberResp) ProtoMessage() {} func (*KickGroupMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{22} + return fileDescriptor_group_5b7911b898fdd5c5, []int{24} } func (m *KickGroupMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KickGroupMemberResp.Unmarshal(m, b) @@ -1527,7 +1395,7 @@ func (m *GetJoinedGroupListReq) Reset() { *m = GetJoinedGroupListReq{} } func (m *GetJoinedGroupListReq) String() string { return proto.CompactTextString(m) } func (*GetJoinedGroupListReq) ProtoMessage() {} func (*GetJoinedGroupListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{23} + return fileDescriptor_group_5b7911b898fdd5c5, []int{25} } func (m *GetJoinedGroupListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedGroupListReq.Unmarshal(m, b) @@ -1581,7 +1449,7 @@ func (m *GetJoinedGroupListResp) Reset() { *m = GetJoinedGroupListResp{} func (m *GetJoinedGroupListResp) String() string { return proto.CompactTextString(m) } func (*GetJoinedGroupListResp) ProtoMessage() {} func (*GetJoinedGroupListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{24} + return fileDescriptor_group_5b7911b898fdd5c5, []int{26} } func (m *GetJoinedGroupListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedGroupListResp.Unmarshal(m, b) @@ -1637,7 +1505,7 @@ func (m *InviteUserToGroupReq) Reset() { *m = InviteUserToGroupReq{} } func (m *InviteUserToGroupReq) String() string { return proto.CompactTextString(m) } func (*InviteUserToGroupReq) ProtoMessage() {} func (*InviteUserToGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{25} + return fileDescriptor_group_5b7911b898fdd5c5, []int{27} } func (m *InviteUserToGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InviteUserToGroupReq.Unmarshal(m, b) @@ -1705,7 +1573,7 @@ func (m *InviteUserToGroupResp) Reset() { *m = InviteUserToGroupResp{} } func (m *InviteUserToGroupResp) String() string { return proto.CompactTextString(m) } func (*InviteUserToGroupResp) ProtoMessage() {} func (*InviteUserToGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{26} + return fileDescriptor_group_5b7911b898fdd5c5, []int{28} } func (m *InviteUserToGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InviteUserToGroupResp.Unmarshal(m, b) @@ -1759,7 +1627,7 @@ func (m *GetGroupAllMemberReq) Reset() { *m = GetGroupAllMemberReq{} } func (m *GetGroupAllMemberReq) String() string { return proto.CompactTextString(m) } func (*GetGroupAllMemberReq) ProtoMessage() {} func (*GetGroupAllMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{27} + return fileDescriptor_group_5b7911b898fdd5c5, []int{29} } func (m *GetGroupAllMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAllMemberReq.Unmarshal(m, b) @@ -1813,7 +1681,7 @@ func (m *GetGroupAllMemberResp) Reset() { *m = GetGroupAllMemberResp{} } func (m *GetGroupAllMemberResp) String() string { return proto.CompactTextString(m) } func (*GetGroupAllMemberResp) ProtoMessage() {} func (*GetGroupAllMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{28} + return fileDescriptor_group_5b7911b898fdd5c5, []int{30} } func (m *GetGroupAllMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAllMemberResp.Unmarshal(m, b) @@ -1862,15 +1730,17 @@ func init() { proto.RegisterType((*GetGroupsInfoReq)(nil), "group.GetGroupsInfoReq") proto.RegisterType((*GetGroupsInfoResp)(nil), "group.GetGroupsInfoResp") proto.RegisterType((*SetGroupInfoReq)(nil), "group.SetGroupInfoReq") + proto.RegisterType((*SetGroupInfoResp)(nil), "group.SetGroupInfoResp") proto.RegisterType((*GetGroupApplicationListReq)(nil), "group.GetGroupApplicationListReq") - proto.RegisterType((*GetGroupApplicationList_Data_User)(nil), "group.GetGroupApplicationList_Data_User") - proto.RegisterType((*GetGroupApplicationListData)(nil), "group.GetGroupApplicationListData") proto.RegisterType((*GetGroupApplicationListResp)(nil), "group.GetGroupApplicationListResp") proto.RegisterType((*TransferGroupOwnerReq)(nil), "group.TransferGroupOwnerReq") + proto.RegisterType((*TransferGroupOwnerResp)(nil), "group.TransferGroupOwnerResp") proto.RegisterType((*JoinGroupReq)(nil), "group.JoinGroupReq") + proto.RegisterType((*JoinGroupResp)(nil), "group.JoinGroupResp") proto.RegisterType((*GroupApplicationResponseReq)(nil), "group.GroupApplicationResponseReq") - proto.RegisterType((*SetOwnerGroupNickNameReq)(nil), "group.SetOwnerGroupNickNameReq") + proto.RegisterType((*GroupApplicationResponseResp)(nil), "group.GroupApplicationResponseResp") proto.RegisterType((*QuitGroupReq)(nil), "group.QuitGroupReq") + proto.RegisterType((*QuitGroupResp)(nil), "group.QuitGroupResp") proto.RegisterType((*GetGroupMemberListReq)(nil), "group.GetGroupMemberListReq") proto.RegisterType((*GetGroupMemberListResp)(nil), "group.GetGroupMemberListResp") proto.RegisterType((*GetGroupMembersInfoReq)(nil), "group.GetGroupMembersInfoReq") @@ -1898,14 +1768,13 @@ const _ = grpc.SupportPackageIsVersion4 type GroupClient interface { CreateGroup(ctx context.Context, in *CreateGroupReq, opts ...grpc.CallOption) (*CreateGroupResp, error) - JoinGroup(ctx context.Context, in *JoinGroupReq, opts ...grpc.CallOption) (*CommonResp, error) - QuitGroup(ctx context.Context, in *QuitGroupReq, opts ...grpc.CallOption) (*CommonResp, error) + JoinGroup(ctx context.Context, in *JoinGroupReq, opts ...grpc.CallOption) (*JoinGroupResp, error) + QuitGroup(ctx context.Context, in *QuitGroupReq, opts ...grpc.CallOption) (*QuitGroupResp, error) GetGroupsInfo(ctx context.Context, in *GetGroupsInfoReq, opts ...grpc.CallOption) (*GetGroupsInfoResp, error) - SetGroupInfo(ctx context.Context, in *SetGroupInfoReq, opts ...grpc.CallOption) (*CommonResp, error) + SetGroupInfo(ctx context.Context, in *SetGroupInfoReq, opts ...grpc.CallOption) (*SetGroupInfoResp, error) GetGroupApplicationList(ctx context.Context, in *GetGroupApplicationListReq, opts ...grpc.CallOption) (*GetGroupApplicationListResp, error) - TransferGroupOwner(ctx context.Context, in *TransferGroupOwnerReq, opts ...grpc.CallOption) (*CommonResp, error) - GroupApplicationResponse(ctx context.Context, in *GroupApplicationResponseReq, opts ...grpc.CallOption) (*CommonResp, error) - // rpc setOwnerGroupNickName(SetOwnerGroupNickNameReq) returns(CommonResp); + TransferGroupOwner(ctx context.Context, in *TransferGroupOwnerReq, opts ...grpc.CallOption) (*TransferGroupOwnerResp, error) + GroupApplicationResponse(ctx context.Context, in *GroupApplicationResponseReq, opts ...grpc.CallOption) (*GroupApplicationResponseResp, error) GetGroupMemberList(ctx context.Context, in *GetGroupMemberListReq, opts ...grpc.CallOption) (*GetGroupMemberListResp, error) GetGroupMembersInfo(ctx context.Context, in *GetGroupMembersInfoReq, opts ...grpc.CallOption) (*GetGroupMembersInfoResp, error) KickGroupMember(ctx context.Context, in *KickGroupMemberReq, opts ...grpc.CallOption) (*KickGroupMemberResp, error) @@ -1931,8 +1800,8 @@ func (c *groupClient) CreateGroup(ctx context.Context, in *CreateGroupReq, opts return out, nil } -func (c *groupClient) JoinGroup(ctx context.Context, in *JoinGroupReq, opts ...grpc.CallOption) (*CommonResp, error) { - out := new(CommonResp) +func (c *groupClient) JoinGroup(ctx context.Context, in *JoinGroupReq, opts ...grpc.CallOption) (*JoinGroupResp, error) { + out := new(JoinGroupResp) err := grpc.Invoke(ctx, "/group.group/joinGroup", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1940,8 +1809,8 @@ func (c *groupClient) JoinGroup(ctx context.Context, in *JoinGroupReq, opts ...g return out, nil } -func (c *groupClient) QuitGroup(ctx context.Context, in *QuitGroupReq, opts ...grpc.CallOption) (*CommonResp, error) { - out := new(CommonResp) +func (c *groupClient) QuitGroup(ctx context.Context, in *QuitGroupReq, opts ...grpc.CallOption) (*QuitGroupResp, error) { + out := new(QuitGroupResp) err := grpc.Invoke(ctx, "/group.group/quitGroup", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1958,8 +1827,8 @@ func (c *groupClient) GetGroupsInfo(ctx context.Context, in *GetGroupsInfoReq, o return out, nil } -func (c *groupClient) SetGroupInfo(ctx context.Context, in *SetGroupInfoReq, opts ...grpc.CallOption) (*CommonResp, error) { - out := new(CommonResp) +func (c *groupClient) SetGroupInfo(ctx context.Context, in *SetGroupInfoReq, opts ...grpc.CallOption) (*SetGroupInfoResp, error) { + out := new(SetGroupInfoResp) err := grpc.Invoke(ctx, "/group.group/setGroupInfo", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1976,8 +1845,8 @@ func (c *groupClient) GetGroupApplicationList(ctx context.Context, in *GetGroupA return out, nil } -func (c *groupClient) TransferGroupOwner(ctx context.Context, in *TransferGroupOwnerReq, opts ...grpc.CallOption) (*CommonResp, error) { - out := new(CommonResp) +func (c *groupClient) TransferGroupOwner(ctx context.Context, in *TransferGroupOwnerReq, opts ...grpc.CallOption) (*TransferGroupOwnerResp, error) { + out := new(TransferGroupOwnerResp) err := grpc.Invoke(ctx, "/group.group/transferGroupOwner", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1985,8 +1854,8 @@ func (c *groupClient) TransferGroupOwner(ctx context.Context, in *TransferGroupO return out, nil } -func (c *groupClient) GroupApplicationResponse(ctx context.Context, in *GroupApplicationResponseReq, opts ...grpc.CallOption) (*CommonResp, error) { - out := new(CommonResp) +func (c *groupClient) GroupApplicationResponse(ctx context.Context, in *GroupApplicationResponseReq, opts ...grpc.CallOption) (*GroupApplicationResponseResp, error) { + out := new(GroupApplicationResponseResp) err := grpc.Invoke(ctx, "/group.group/groupApplicationResponse", in, out, c.cc, opts...) if err != nil { return nil, err @@ -2052,14 +1921,13 @@ func (c *groupClient) GetGroupAllMember(ctx context.Context, in *GetGroupAllMemb type GroupServer interface { CreateGroup(context.Context, *CreateGroupReq) (*CreateGroupResp, error) - JoinGroup(context.Context, *JoinGroupReq) (*CommonResp, error) - QuitGroup(context.Context, *QuitGroupReq) (*CommonResp, error) + JoinGroup(context.Context, *JoinGroupReq) (*JoinGroupResp, error) + QuitGroup(context.Context, *QuitGroupReq) (*QuitGroupResp, error) GetGroupsInfo(context.Context, *GetGroupsInfoReq) (*GetGroupsInfoResp, error) - SetGroupInfo(context.Context, *SetGroupInfoReq) (*CommonResp, error) + SetGroupInfo(context.Context, *SetGroupInfoReq) (*SetGroupInfoResp, error) GetGroupApplicationList(context.Context, *GetGroupApplicationListReq) (*GetGroupApplicationListResp, error) - TransferGroupOwner(context.Context, *TransferGroupOwnerReq) (*CommonResp, error) - GroupApplicationResponse(context.Context, *GroupApplicationResponseReq) (*CommonResp, error) - // rpc setOwnerGroupNickName(SetOwnerGroupNickNameReq) returns(CommonResp); + TransferGroupOwner(context.Context, *TransferGroupOwnerReq) (*TransferGroupOwnerResp, error) + GroupApplicationResponse(context.Context, *GroupApplicationResponseReq) (*GroupApplicationResponseResp, error) GetGroupMemberList(context.Context, *GetGroupMemberListReq) (*GetGroupMemberListResp, error) GetGroupMembersInfo(context.Context, *GetGroupMembersInfoReq) (*GetGroupMembersInfoResp, error) KickGroupMember(context.Context, *KickGroupMemberReq) (*KickGroupMemberResp, error) @@ -2389,100 +2257,86 @@ var _Group_serviceDesc = grpc.ServiceDesc{ Metadata: "group/group.proto", } -func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_95297d6a59bab850) } - -var fileDescriptor_group_95297d6a59bab850 = []byte{ - // 1464 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xd7, 0xfa, 0x23, 0x8d, 0x5f, 0xbe, 0x9c, 0x69, 0x93, 0x2e, 0xdb, 0x50, 0xb9, 0x2b, 0x54, - 0x45, 0x15, 0x4a, 0xa4, 0x14, 0x21, 0xa1, 0x46, 0xa8, 0x69, 0x3e, 0x5a, 0x03, 0x71, 0xd4, 0x8d, - 0x7b, 0xe1, 0x12, 0xb6, 0xde, 0x89, 0xb5, 0x78, 0xbd, 0xbb, 0xde, 0x59, 0x93, 0x96, 0x0b, 0x20, - 0x04, 0x1c, 0x10, 0xa2, 0x57, 0x8e, 0x5c, 0x38, 0x22, 0x0e, 0xdc, 0x39, 0xf0, 0x8f, 0xa1, 0xf9, - 0xd8, 0xf5, 0xec, 0xa7, 0x2d, 0x47, 0xa2, 0x17, 0xcb, 0xf3, 0xde, 0x9b, 0x79, 0x1f, 0xf3, 0xde, - 0xef, 0xbd, 0x59, 0x58, 0xef, 0x07, 0xde, 0xd8, 0xdf, 0x65, 0xbf, 0x3b, 0x7e, 0xe0, 0x85, 0x1e, - 0xaa, 0xb3, 0x85, 0x76, 0xef, 0xcc, 0xc7, 0xee, 0x45, 0xfb, 0x74, 0xd7, 0x1f, 0xf4, 0x77, 0x19, - 0x67, 0x97, 0x58, 0x83, 0x8b, 0x2b, 0xb2, 0x7b, 0x45, 0xb8, 0xa4, 0xfe, 0x31, 0xc0, 0xa1, 0x37, - 0x1c, 0x7a, 0xae, 0x81, 0x89, 0x8f, 0x54, 0xb8, 0x71, 0x1c, 0x04, 0x87, 0x9e, 0x85, 0x55, 0xa5, - 0xa5, 0x6c, 0xd7, 0x8d, 0x68, 0x89, 0x36, 0x61, 0xe1, 0x38, 0x08, 0x4e, 0x49, 0x5f, 0xad, 0xb4, - 0x94, 0xed, 0x86, 0x21, 0x56, 0xfa, 0x63, 0x40, 0x4f, 0xa9, 0xae, 0x03, 0xcb, 0x3a, 0xc5, 0xc3, - 0x97, 0x38, 0x68, 0xbb, 0x97, 0x1e, 0x95, 0x7e, 0x41, 0x70, 0xd0, 0x3e, 0x62, 0xc7, 0x34, 0x0c, - 0xb1, 0x42, 0x08, 0x6a, 0x86, 0xe7, 0x60, 0x76, 0x46, 0xdd, 0x60, 0xff, 0xf5, 0x7f, 0x2b, 0xb0, - 0x7a, 0x18, 0x60, 0x33, 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47, 0xf1, 0xf5, 0x35, 0x0c, 0x99, - 0x94, 0x0e, 0x47, 0xa5, 0x3c, 0x1c, 0xd5, 0x64, 0x38, 0xf4, 0xef, 0x15, 0x58, 0x4f, 0x29, 0x9d, - 0xcb, 0xe3, 0x7d, 0x58, 0x89, 0x1d, 0x61, 0x96, 0x56, 0x59, 0xa2, 0x15, 0x79, 0x9d, 0x14, 0xd6, - 0x7f, 0x50, 0x60, 0xed, 0x5c, 0x58, 0x11, 0x79, 0x9e, 0x88, 0xa1, 0x32, 0x63, 0x0c, 0x13, 0xbe, - 0x56, 0x52, 0x57, 0x9f, 0x8a, 0x54, 0x35, 0x13, 0x29, 0xfd, 0x6b, 0xd0, 0xa2, 0x60, 0x1c, 0xf8, - 0xbe, 0x23, 0xb2, 0x93, 0x9a, 0x48, 0x2d, 0x92, 0xcf, 0x56, 0xca, 0xcf, 0xce, 0xb9, 0x85, 0x64, - 0xe2, 0x55, 0x33, 0x89, 0xf7, 0x5b, 0x0d, 0xee, 0x15, 0x28, 0xbf, 0x38, 0x32, 0x43, 0xf3, 0x82, - 0xca, 0xa1, 0x55, 0xa8, 0xc4, 0xda, 0x2b, 0xed, 0x23, 0x7a, 0x53, 0x22, 0x19, 0x84, 0xce, 0x68, - 0x39, 0x4d, 0x1f, 0xf5, 0xa6, 0xeb, 0x09, 0x2e, 0x2f, 0xc9, 0x78, 0x4d, 0xe1, 0xe5, 0xc4, 0x31, - 0xfb, 0xac, 0x16, 0xeb, 0x06, 0xfb, 0x4f, 0xcf, 0x33, 0xf0, 0x68, 0x8c, 0x49, 0x48, 0x6f, 0x9f, - 0xd7, 0xa3, 0x44, 0xa1, 0xfc, 0x67, 0xa6, 0x6b, 0x39, 0xd8, 0xa2, 0x7c, 0x5e, 0x95, 0x12, 0x85, - 0x5a, 0x7a, 0x60, 0x59, 0x5d, 0x7b, 0x88, 0x59, 0x4d, 0x56, 0x8d, 0x68, 0x89, 0x1e, 0x40, 0x33, - 0xb2, 0xab, 0x63, 0xf7, 0x06, 0x2e, 0x45, 0x1a, 0x5e, 0x98, 0x19, 0x3a, 0xba, 0x0f, 0xab, 0xdc, - 0xca, 0x58, 0x12, 0x98, 0x64, 0x8a, 0x8a, 0xb6, 0x61, 0x2d, 0xda, 0x1b, 0x01, 0xcb, 0x12, 0x13, - 0x4c, 0x93, 0xd1, 0x7b, 0xb0, 0xc2, 0xf7, 0x46, 0x72, 0xcb, 0x4c, 0x2e, 0x49, 0xa4, 0xf7, 0x2b, - 0x7c, 0xa1, 0x54, 0x75, 0x85, 0xdf, 0xaf, 0x44, 0xa2, 0x31, 0xeb, 0xbe, 0xf6, 0xb1, 0xba, 0xca, - 0x63, 0x46, 0xff, 0x53, 0xe8, 0xe3, 0x22, 0xe7, 0xa1, 0x19, 0x8e, 0x89, 0xba, 0xc6, 0x78, 0x09, - 0xda, 0x44, 0xc6, 0xc0, 0x64, 0xec, 0x84, 0x6a, 0x53, 0x96, 0xe1, 0x34, 0x7d, 0x04, 0x77, 0x0a, - 0x52, 0x83, 0x66, 0x06, 0xba, 0x05, 0xf5, 0x43, 0x6f, 0xec, 0x86, 0xa2, 0x58, 0xf9, 0x02, 0xed, - 0x43, 0x8d, 0xd9, 0x5a, 0x61, 0x95, 0xb8, 0x1d, 0x41, 0xfe, 0xb4, 0x14, 0x33, 0xd8, 0x2e, 0xfd, - 0x27, 0xa5, 0x50, 0xe7, 0x9c, 0x10, 0xf1, 0x21, 0xd4, 0xa8, 0x12, 0x81, 0x87, 0x7a, 0xb9, 0x3d, - 0x54, 0xd2, 0x60, 0xf2, 0xfa, 0x3f, 0x0a, 0x6c, 0x74, 0x03, 0xd3, 0x25, 0x97, 0x38, 0x60, 0xa2, - 0x67, 0x57, 0x2e, 0x0e, 0x68, 0x41, 0x4a, 0xc9, 0xaf, 0x24, 0x93, 0xff, 0x3e, 0xac, 0x9e, 0x39, - 0x16, 0x13, 0x4c, 0x80, 0x41, 0x8a, 0x4a, 0xe5, 0x3a, 0xf8, 0x4a, 0x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b1, 0x33, 0xf7, 0xd9, 0x90, 0x67, 0xe8, - 0x73, 0x50, 0xfb, 0x05, 0x73, 0x31, 0xd2, 0x13, 0x1f, 0xcb, 0x72, 0x07, 0xe7, 0xfc, 0x23, 0x51, - 0x3f, 0x33, 0x9b, 0xc4, 0x96, 0xe5, 0x8e, 0x56, 0xda, 0xbb, 0x25, 0x5c, 0xe2, 0xa3, 0x2e, 0xdc, - 0xec, 0x67, 0x5b, 0x36, 0xca, 0xdf, 0x15, 0xdf, 0xec, 0xdd, 0x32, 0x36, 0xf1, 0xd1, 0x33, 0x58, - 0x1b, 0x24, 0x3b, 0x11, 0x8a, 0xbe, 0x0f, 0x66, 0x1b, 0xb2, 0xa6, 0x15, 0xb1, 0x62, 0x97, 0x53, - 0xd0, 0x2e, 0xbb, 0x9c, 0xed, 0x36, 0xb2, 0xcb, 0x79, 0x3d, 0xa1, 0x03, 0xeb, 0x76, 0x1a, 0xf3, - 0xd0, 0x9d, 0x08, 0xa6, 0x72, 0x40, 0x5c, 0xdb, 0x2a, 0x66, 0xf2, 0xf3, 0xfa, 0x69, 0x3c, 0x89, - 0xcf, 0xcb, 0x83, 0x36, 0x6d, 0xab, 0x98, 0x49, 0xfc, 0x27, 0x6b, 0x9f, 0xaf, 0xec, 0xf0, 0x2f, - 0xc6, 0x8f, 0xd8, 0xef, 0xcb, 0x05, 0xf6, 0x39, 0xf8, 0xe1, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, - 0x22, 0xaf, 0xfb, 0xc7, 0x4d, 0x16, 0x00, 0x00, +func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_5b7911b898fdd5c5) } + +var fileDescriptor_group_5b7911b898fdd5c5 = []byte{ + // 1235 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x49, 0x6f, 0x1c, 0x45, + 0x14, 0x56, 0x79, 0x3c, 0x4e, 0xe6, 0x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 0x3e, 0xd3, 0x30, 0x15, + 0x85, 0xd7, 0xa0, 0x61, 0xfa, 0x2e, 0x7d, 0x41, 0x5f, 0x53, 0x57, 0x7c, 0xa8, 0x6e, 0x0e, 0x18, + 0xe4, 0x5f, 0x04, 0xb3, 0x7b, 0x21, 0xed, 0x46, 0x54, 0x7c, 0xd2, 0xa4, 0xd7, 0x78, 0x07, 0x66, + 0x3b, 0x9e, 0x13, 0xc9, 0x4f, 0xbf, 0x70, 0x58, 0xd4, 0x42, 0xed, 0xda, 0xc6, 0xf4, 0xf6, 0xbd, + 0x4d, 0x19, 0x6e, 0xde, 0xb6, 0x99, 0x39, 0x80, 0x3f, 0x84, 0x86, 0xd0, 0xe2, 0x42, 0x61, 0x73, + 0x7a, 0x7b, 0x65, 0xd3, 0xe7, 0xc0, 0x38, 0xbd, 0x73, 0x66, 0x5d, 0x6d, 0x26, 0x52, 0x73, 0xa0, + 0x88, 0xdb, 0x30, 0x7d, 0x12, 0xd0, 0xb0, 0x1b, 0x39, 0xbe, 0xd7, 0xd9, 0x6f, 0xd5, 0x44, 0x18, + 0x3a, 0x0b, 0x1b, 0x70, 0xf7, 0x24, 0x50, 0x51, 0x4e, 0x0a, 0x71, 0x42, 0x8b, 0xd3, 0x37, 0x1e, + 0x0d, 0x95, 0xb8, 0xae, 0x4e, 0x0f, 0x58, 0xe4, 0x2b, 0x98, 0x4b, 0x85, 0x3a, 0x0a, 0xf8, 0xe9, + 0xd0, 0x6a, 0x43, 0x86, 0x46, 0x42, 0x98, 0x7f, 0x42, 0x23, 0x41, 0x33, 0x21, 0xa3, 0xd7, 0xdc, + 0x61, 0xa9, 0xb0, 0x9f, 0x80, 0xdc, 0x30, 0x75, 0x56, 0x16, 0x90, 0x89, 0x6a, 0x40, 0x6a, 0x69, + 0x40, 0xc8, 0xf7, 0x08, 0x16, 0x32, 0x46, 0x47, 0x8a, 0xf8, 0x31, 0x34, 0x93, 0x40, 0x84, 0xa7, + 0x35, 0x91, 0x0e, 0x65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x8e, 0xf4, 0xdb, 0xce, 0x6d, 0x31, 0x89, 0xdf, + 0x85, 0x4b, 0x58, 0xe2, 0x77, 0xc9, 0xfa, 0x73, 0x06, 0x8b, 0x76, 0x7e, 0xb8, 0xe3, 0xe2, 0x53, + 0xc9, 0xed, 0xaf, 0x57, 0x89, 0x59, 0x80, 0x9f, 0xc2, 0xdc, 0x55, 0x7a, 0x66, 0xe1, 0xf8, 0x7f, + 0x9f, 0xfc, 0xe8, 0x36, 0x8c, 0x32, 0x51, 0x12, 0x72, 0x66, 0x08, 0xe8, 0x21, 0xe7, 0xe7, 0x92, + 0x1e, 0x72, 0xd1, 0xf4, 0x38, 0x86, 0x05, 0x27, 0xdb, 0x1d, 0xf1, 0xfd, 0xb8, 0xa1, 0x15, 0xb4, + 0x7b, 0x63, 0xad, 0x5c, 0x28, 0xbf, 0x67, 0x67, 0x3b, 0x4f, 0xf2, 0xbd, 0xa2, 0x26, 0x68, 0xac, + 0x95, 0x0b, 0x59, 0xb0, 0x3b, 0xf7, 0x59, 0x73, 0x53, 0xfe, 0x27, 0xf8, 0x48, 0xfc, 0xbe, 0x9a, + 0x12, 0x7f, 0xf8, 0x7d, 0xf0, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xac, 0x58, 0xf3, 0xe0, 0x2f, + 0x14, 0x00, 0x00, } diff --git a/pkg/proto/group/group.proto b/pkg/proto/group/group.proto index cf207d69a..c10ae01f9 100644 --- a/pkg/proto/group/group.proto +++ b/pkg/proto/group/group.proto @@ -10,33 +10,29 @@ message CommonResp{ message GroupAddMemberInfo{ string UserID = 1; - int32 Role = 2; + int32 RoleLevel = 2; } + message CreateGroupReq{ - repeated GroupAddMemberInfo InitMemberList = 1; // - string GroupName = 2; - string Introduction = 3; - string Notification = 4; - string FaceUrl = 5; - string Ext = 6; - string OperationID = 7; - string OpUserID = 8; //app manager or group owner - string FromUserID = 9; + repeated GroupAddMemberInfo InitMemberList = 1; + open_im_sdk.GroupInfo GroupInfo = 2; + string OperationID = 3; + string OpUserID = 4; //app manager or group owner + string OwnerUserID = 5; //owner } - message CreateGroupResp{ int32 ErrCode = 1; string ErrMsg = 2; open_im_sdk.GroupInfo GroupInfo = 3; } + message GetGroupsInfoReq{ repeated string GroupIDList = 1; string OperationID = 2; string OpUserID = 3; //No verification permission } - message GetGroupsInfoResp{ int32 ErrCode = 1; string ErrMsg = 2; @@ -49,44 +45,23 @@ message SetGroupInfoReq{ string OpUserID = 2; //app manager or group owner string OperationID = 3; } +message SetGroupInfoResp{ + CommonResp CommonResp = 1; +} message GetGroupApplicationListReq { string OpUserID = 1; //app manager or group owner(manager) string OperationID = 2; - string FromUserID = 3; //owner or manager (Received) -} - -message GetGroupApplicationList_Data_User { - string ID = 1; - string GroupID = 2; - string FromUserID = 3; - string ToUserID = 4; - int32 Flag = 5; - string RequestMsg = 6; - string HandledMsg = 7; - int64 AddTime = 8; - string FromUserNickname = 9; - string ToUserNickname = 10; - string FromUserFaceUrl = 11; - string ToUserFaceUrl = 12; - string HandledUser = 13; - int32 Type = 14; - int32 HandleStatus = 15; - int32 HandleResult = 16; + string FromUserID = 3; //owner or manager } - -message GetGroupApplicationListData { - int32 Count = 1; - repeated GetGroupApplicationList_Data_User User = 2; -} - message GetGroupApplicationListResp { int32 ErrCode = 1; string ErrMsg = 2; - GetGroupApplicationListData Data = 3; + repeated open_im_sdk.GroupRequest GroupRequestList = 3; } + message TransferGroupOwnerReq { string GroupID = 1; string OldOwnerUserID = 2; @@ -94,7 +69,9 @@ message TransferGroupOwnerReq { string OperationID = 4; string OpUserID = 5; //app manager or group owner } - +message TransferGroupOwnerResp{ + CommonResp CommonResp = 1; +} message JoinGroupReq{ string GroupID = 1; @@ -102,35 +79,33 @@ message JoinGroupReq{ string OpUserID = 3; string OperationID = 4; } +message JoinGroupResp{ + CommonResp CommonResp = 1; +} + message GroupApplicationResponseReq{ string OperationID = 1; string OpUserID = 2; string GroupID = 3; - string FromUserID = 4; //请求加群:请求者,邀请加群:邀请人 - string ToUserID = 5; //请求加群:0,邀请加群:被邀请人 - int64 AddTime = 6; - string HandledMsg = 7; - int32 HandleResult = 8; + string FromUserID = 4; // + string HandledMsg = 5; + int32 HandleResult = 6; } - - - - -message SetOwnerGroupNickNameReq{ - string GroupID = 1; - string Nickname = 2; - string OperationID = 3; - string FromUserID = 4; - string OpUserID = 5; //app manger or FromUserID +message GroupApplicationResponseResp{ + CommonResp CommonResp = 1; } + message QuitGroupReq{ string GroupID = 1; string OperationID = 2; string OpUserID = 3; } +message QuitGroupResp{ + CommonResp CommonResp = 1; +} @@ -150,7 +125,6 @@ message GetGroupMemberListResp { } - message GetGroupMembersInfoReq { string GroupID = 1; repeated string memberList = 2; @@ -189,8 +163,6 @@ message GetJoinedGroupListReq { string operationID = 2; string OpUserID = 3; //app manager or FromUserID } - - message GetJoinedGroupListResp{ int32 ErrCode = 1; string ErrMsg = 2; @@ -205,7 +177,6 @@ message InviteUserToGroupReq { repeated string InvitedUserIDList = 5; string OpUserID = 6; //group member or app manager } - message InviteUserToGroupResp { int32 ErrCode = 1; string ErrMsg = 2; @@ -218,7 +189,6 @@ message GetGroupAllMemberReq { string OpUserID = 2; //No verification permission string OperationID = 3; } - message GetGroupAllMemberResp { int32 ErrCode = 1; string ErrMsg = 2; @@ -229,20 +199,18 @@ message GetGroupAllMemberResp { service group{ rpc createGroup(CreateGroupReq) returns(CreateGroupResp); - rpc joinGroup(JoinGroupReq) returns(CommonResp); - rpc quitGroup(QuitGroupReq) returns(CommonResp); + rpc joinGroup(JoinGroupReq) returns(JoinGroupResp); + rpc quitGroup(QuitGroupReq) returns(QuitGroupResp); rpc getGroupsInfo(GetGroupsInfoReq) returns(GetGroupsInfoResp); - rpc setGroupInfo(SetGroupInfoReq) returns(CommonResp); + rpc setGroupInfo(SetGroupInfoReq) returns(SetGroupInfoResp); rpc getGroupApplicationList(GetGroupApplicationListReq) returns(GetGroupApplicationListResp); - rpc transferGroupOwner(TransferGroupOwnerReq) returns(CommonResp); - rpc groupApplicationResponse(GroupApplicationResponseReq) returns(CommonResp); - // rpc setOwnerGroupNickName(SetOwnerGroupNickNameReq) returns(CommonResp); + rpc transferGroupOwner(TransferGroupOwnerReq) returns(TransferGroupOwnerResp); + rpc groupApplicationResponse(GroupApplicationResponseReq) returns(GroupApplicationResponseResp); rpc getGroupMemberList(GetGroupMemberListReq) returns(GetGroupMemberListResp); rpc getGroupMembersInfo(GetGroupMembersInfoReq) returns(GetGroupMembersInfoResp); rpc kickGroupMember(KickGroupMemberReq) returns (KickGroupMemberResp); rpc getJoinedGroupList(GetJoinedGroupListReq) returns (GetJoinedGroupListResp); rpc inviteUserToGroup(InviteUserToGroupReq) returns (InviteUserToGroupResp); - rpc getGroupAllMember(GetGroupAllMemberReq) returns(GetGroupAllMemberResp); } diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index 979e03888..e4fa4ca6a 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -18,1054 +18,1474 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package -type PullMessageBySeqListResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` - MaxSeq int64 `protobuf:"varint,3,opt,name=maxSeq" json:"maxSeq,omitempty"` - MinSeq int64 `protobuf:"varint,4,opt,name=minSeq" json:"minSeq,omitempty"` - SingleUserMsg []*GatherFormat `protobuf:"bytes,5,rep,name=singleUserMsg" json:"singleUserMsg,omitempty"` - GroupUserMsg []*GatherFormat `protobuf:"bytes,6,rep,name=groupUserMsg" json:"groupUserMsg,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type GroupInfo struct { + GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` + GroupName string `protobuf:"bytes,2,opt,name=GroupName" json:"GroupName,omitempty"` + Notification string `protobuf:"bytes,3,opt,name=Notification" json:"Notification,omitempty"` + Introduction string `protobuf:"bytes,4,opt,name=Introduction" json:"Introduction,omitempty"` + FaceUrl string `protobuf:"bytes,5,opt,name=FaceUrl" json:"FaceUrl,omitempty"` + OwnerUserID string `protobuf:"bytes,6,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` + CreateTime int64 `protobuf:"varint,7,opt,name=CreateTime" json:"CreateTime,omitempty"` + MemberCount uint32 `protobuf:"varint,8,opt,name=MemberCount" json:"MemberCount,omitempty"` + Ex string `protobuf:"bytes,9,opt,name=Ex" json:"Ex,omitempty"` + Status int32 `protobuf:"varint,10,opt,name=Status" json:"Status,omitempty"` + CreatorUserID string `protobuf:"bytes,11,opt,name=CreatorUserID" json:"CreatorUserID,omitempty"` + GroupType int32 `protobuf:"varint,12,opt,name=GroupType" json:"GroupType,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListResp{} } -func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } -func (*PullMessageBySeqListResp) ProtoMessage() {} -func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{0} +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_a1fbf2797043d7f3, []int{0} } -func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) +func (m *GroupInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupInfo.Unmarshal(m, b) } -func (m *PullMessageBySeqListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PullMessageBySeqListResp.Marshal(b, m, deterministic) +func (m *GroupInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupInfo.Marshal(b, m, deterministic) } -func (dst *PullMessageBySeqListResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_PullMessageBySeqListResp.Merge(dst, src) +func (dst *GroupInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupInfo.Merge(dst, src) } -func (m *PullMessageBySeqListResp) XXX_Size() int { - return xxx_messageInfo_PullMessageBySeqListResp.Size(m) +func (m *GroupInfo) XXX_Size() int { + return xxx_messageInfo_GroupInfo.Size(m) } -func (m *PullMessageBySeqListResp) XXX_DiscardUnknown() { - xxx_messageInfo_PullMessageBySeqListResp.DiscardUnknown(m) +func (m *GroupInfo) XXX_DiscardUnknown() { + xxx_messageInfo_GroupInfo.DiscardUnknown(m) } -var xxx_messageInfo_PullMessageBySeqListResp proto.InternalMessageInfo +var xxx_messageInfo_GroupInfo proto.InternalMessageInfo -func (m *PullMessageBySeqListResp) GetErrCode() int32 { +func (m *GroupInfo) GetGroupID() string { if m != nil { - return m.ErrCode + return m.GroupID } - return 0 + return "" } -func (m *PullMessageBySeqListResp) GetErrMsg() string { +func (m *GroupInfo) GetGroupName() string { if m != nil { - return m.ErrMsg + return m.GroupName } return "" } -func (m *PullMessageBySeqListResp) GetMaxSeq() int64 { +func (m *GroupInfo) GetNotification() string { if m != nil { - return m.MaxSeq + return m.Notification } - return 0 + return "" } -func (m *PullMessageBySeqListResp) GetMinSeq() int64 { +func (m *GroupInfo) GetIntroduction() string { if m != nil { - return m.MinSeq + return m.Introduction } - return 0 + return "" } -func (m *PullMessageBySeqListResp) GetSingleUserMsg() []*GatherFormat { +func (m *GroupInfo) GetFaceUrl() string { if m != nil { - return m.SingleUserMsg + return m.FaceUrl } - return nil + return "" } -func (m *PullMessageBySeqListResp) GetGroupUserMsg() []*GatherFormat { +func (m *GroupInfo) GetOwnerUserID() string { if m != nil { - return m.GroupUserMsg + return m.OwnerUserID } - return nil + return "" } -type PullMessageBySeqListReq struct { - UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` - SeqList []int64 `protobuf:"varint,3,rep,packed,name=seqList" json:"seqList,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (m *GroupInfo) GetCreateTime() int64 { + if m != nil { + return m.CreateTime + } + return 0 } -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_1ed69884ac12b8b9, []int{1} -} -func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) -} -func (m *PullMessageBySeqListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PullMessageBySeqListReq.Marshal(b, m, deterministic) -} -func (dst *PullMessageBySeqListReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_PullMessageBySeqListReq.Merge(dst, src) -} -func (m *PullMessageBySeqListReq) XXX_Size() int { - return xxx_messageInfo_PullMessageBySeqListReq.Size(m) -} -func (m *PullMessageBySeqListReq) XXX_DiscardUnknown() { - xxx_messageInfo_PullMessageBySeqListReq.DiscardUnknown(m) +func (m *GroupInfo) GetMemberCount() uint32 { + if m != nil { + return m.MemberCount + } + return 0 } -var xxx_messageInfo_PullMessageBySeqListReq proto.InternalMessageInfo - -func (m *PullMessageBySeqListReq) GetUserID() string { +func (m *GroupInfo) GetEx() string { if m != nil { - return m.UserID + return m.Ex } return "" } -func (m *PullMessageBySeqListReq) GetOperationID() string { +func (m *GroupInfo) GetStatus() int32 { if m != nil { - return m.OperationID + return m.Status + } + return 0 +} + +func (m *GroupInfo) GetCreatorUserID() string { + if m != nil { + return m.CreatorUserID } return "" } -func (m *PullMessageBySeqListReq) GetSeqList() []int64 { +func (m *GroupInfo) GetGroupType() int32 { if m != nil { - return m.SeqList + return m.GroupType } - return nil + return 0 } -type PullMessageReq struct { - UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` - SeqBegin int64 `protobuf:"varint,2,opt,name=seqBegin" json:"seqBegin,omitempty"` - SeqEnd int64 `protobuf:"varint,3,opt,name=seqEnd" json:"seqEnd,omitempty"` - OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"` +type GroupMemberFullInfo struct { + GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` + UserID string `protobuf:"bytes,2,opt,name=UserID" json:"UserID,omitempty"` + RoleLevel int32 `protobuf:"varint,3,opt,name=roleLevel" json:"roleLevel,omitempty"` + JoinTime int64 `protobuf:"varint,4,opt,name=JoinTime" json:"JoinTime,omitempty"` + NickName string `protobuf:"bytes,5,opt,name=NickName" json:"NickName,omitempty"` + FaceUrl string `protobuf:"bytes,6,opt,name=FaceUrl" json:"FaceUrl,omitempty"` + FriendRemark string `protobuf:"bytes,7,opt,name=FriendRemark" json:"FriendRemark,omitempty"` + AppMangerLevel int32 `protobuf:"varint,8,opt,name=AppMangerLevel" json:"AppMangerLevel,omitempty"` + JoinSource int32 `protobuf:"varint,9,opt,name=JoinSource" json:"JoinSource,omitempty"` + OperatorUserID string `protobuf:"bytes,10,opt,name=OperatorUserID" json:"OperatorUserID,omitempty"` + Ex string `protobuf:"bytes,11,opt,name=Ex" json:"Ex,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } -func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } -func (*PullMessageReq) ProtoMessage() {} -func (*PullMessageReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{2} +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_a1fbf2797043d7f3, []int{1} } -func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) +func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) } -func (m *PullMessageReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PullMessageReq.Marshal(b, m, deterministic) +func (m *GroupMemberFullInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupMemberFullInfo.Marshal(b, m, deterministic) } -func (dst *PullMessageReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_PullMessageReq.Merge(dst, src) +func (dst *GroupMemberFullInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupMemberFullInfo.Merge(dst, src) } -func (m *PullMessageReq) XXX_Size() int { - return xxx_messageInfo_PullMessageReq.Size(m) +func (m *GroupMemberFullInfo) XXX_Size() int { + return xxx_messageInfo_GroupMemberFullInfo.Size(m) } -func (m *PullMessageReq) XXX_DiscardUnknown() { - xxx_messageInfo_PullMessageReq.DiscardUnknown(m) +func (m *GroupMemberFullInfo) XXX_DiscardUnknown() { + xxx_messageInfo_GroupMemberFullInfo.DiscardUnknown(m) } -var xxx_messageInfo_PullMessageReq proto.InternalMessageInfo +var xxx_messageInfo_GroupMemberFullInfo proto.InternalMessageInfo -func (m *PullMessageReq) GetUserID() string { +func (m *GroupMemberFullInfo) GetGroupID() string { + if m != nil { + return m.GroupID + } + return "" +} + +func (m *GroupMemberFullInfo) GetUserID() string { if m != nil { return m.UserID } return "" } -func (m *PullMessageReq) GetSeqBegin() int64 { +func (m *GroupMemberFullInfo) GetRoleLevel() int32 { if m != nil { - return m.SeqBegin + return m.RoleLevel } return 0 } -func (m *PullMessageReq) GetSeqEnd() int64 { +func (m *GroupMemberFullInfo) GetJoinTime() int64 { if m != nil { - return m.SeqEnd + return m.JoinTime } return 0 } -func (m *PullMessageReq) GetOperationID() string { +func (m *GroupMemberFullInfo) GetNickName() string { if m != nil { - return m.OperationID + return m.NickName } return "" } -type PullMessageResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` - MaxSeq int64 `protobuf:"varint,3,opt,name=maxSeq" json:"maxSeq,omitempty"` - MinSeq int64 `protobuf:"varint,4,opt,name=minSeq" json:"minSeq,omitempty"` - SingleUserMsg []*GatherFormat `protobuf:"bytes,5,rep,name=singleUserMsg" json:"singleUserMsg,omitempty"` - GroupUserMsg []*GatherFormat `protobuf:"bytes,6,rep,name=groupUserMsg" json:"groupUserMsg,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } -func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } -func (*PullMessageResp) ProtoMessage() {} -func (*PullMessageResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{3} -} -func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) -} -func (m *PullMessageResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PullMessageResp.Marshal(b, m, deterministic) -} -func (dst *PullMessageResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_PullMessageResp.Merge(dst, src) -} -func (m *PullMessageResp) XXX_Size() int { - return xxx_messageInfo_PullMessageResp.Size(m) -} -func (m *PullMessageResp) XXX_DiscardUnknown() { - xxx_messageInfo_PullMessageResp.DiscardUnknown(m) -} - -var xxx_messageInfo_PullMessageResp proto.InternalMessageInfo - -func (m *PullMessageResp) GetErrCode() int32 { +func (m *GroupMemberFullInfo) GetFaceUrl() string { if m != nil { - return m.ErrCode + return m.FaceUrl } - return 0 + return "" } -func (m *PullMessageResp) GetErrMsg() string { +func (m *GroupMemberFullInfo) GetFriendRemark() string { if m != nil { - return m.ErrMsg + return m.FriendRemark } return "" } -func (m *PullMessageResp) GetMaxSeq() int64 { +func (m *GroupMemberFullInfo) GetAppMangerLevel() int32 { if m != nil { - return m.MaxSeq + return m.AppMangerLevel } return 0 } -func (m *PullMessageResp) GetMinSeq() int64 { +func (m *GroupMemberFullInfo) GetJoinSource() int32 { if m != nil { - return m.MinSeq + return m.JoinSource } return 0 } -func (m *PullMessageResp) GetSingleUserMsg() []*GatherFormat { +func (m *GroupMemberFullInfo) GetOperatorUserID() string { if m != nil { - return m.SingleUserMsg + return m.OperatorUserID } - return nil + return "" } -func (m *PullMessageResp) GetGroupUserMsg() []*GatherFormat { +func (m *GroupMemberFullInfo) GetEx() string { if m != nil { - return m.GroupUserMsg + return m.Ex } - return nil + return "" } -type GetMaxAndMinSeqReq struct { +type PublicUserInfo struct { + UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` + Nickname string `protobuf:"bytes,2,opt,name=Nickname" json:"Nickname,omitempty"` + FaceUrl string `protobuf:"bytes,3,opt,name=FaceUrl" json:"FaceUrl,omitempty"` + Gender int32 `protobuf:"varint,4,opt,name=Gender" json:"Gender,omitempty"` + AppMangerLevel int32 `protobuf:"varint,5,opt,name=AppMangerLevel" json:"AppMangerLevel,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -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_1ed69884ac12b8b9, []int{4} +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_a1fbf2797043d7f3, []int{2} } -func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) +func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) } -func (m *GetMaxAndMinSeqReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetMaxAndMinSeqReq.Marshal(b, m, deterministic) +func (m *PublicUserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PublicUserInfo.Marshal(b, m, deterministic) } -func (dst *GetMaxAndMinSeqReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetMaxAndMinSeqReq.Merge(dst, src) +func (dst *PublicUserInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_PublicUserInfo.Merge(dst, src) } -func (m *GetMaxAndMinSeqReq) XXX_Size() int { - return xxx_messageInfo_GetMaxAndMinSeqReq.Size(m) +func (m *PublicUserInfo) XXX_Size() int { + return xxx_messageInfo_PublicUserInfo.Size(m) } -func (m *GetMaxAndMinSeqReq) XXX_DiscardUnknown() { - xxx_messageInfo_GetMaxAndMinSeqReq.DiscardUnknown(m) +func (m *PublicUserInfo) XXX_DiscardUnknown() { + xxx_messageInfo_PublicUserInfo.DiscardUnknown(m) } -var xxx_messageInfo_GetMaxAndMinSeqReq proto.InternalMessageInfo +var xxx_messageInfo_PublicUserInfo proto.InternalMessageInfo -type GetMaxAndMinSeqResp struct { - MaxSeq int64 `protobuf:"varint,1,opt,name=maxSeq" json:"maxSeq,omitempty"` - MinSeq int64 `protobuf:"varint,2,opt,name=minSeq" json:"minSeq,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (m *PublicUserInfo) GetUserID() string { + if m != nil { + return m.UserID + } + return "" } -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_1ed69884ac12b8b9, []int{5} -} -func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) -} -func (m *GetMaxAndMinSeqResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetMaxAndMinSeqResp.Marshal(b, m, deterministic) -} -func (dst *GetMaxAndMinSeqResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetMaxAndMinSeqResp.Merge(dst, src) -} -func (m *GetMaxAndMinSeqResp) XXX_Size() int { - return xxx_messageInfo_GetMaxAndMinSeqResp.Size(m) -} -func (m *GetMaxAndMinSeqResp) XXX_DiscardUnknown() { - xxx_messageInfo_GetMaxAndMinSeqResp.DiscardUnknown(m) +func (m *PublicUserInfo) GetNickname() string { + if m != nil { + return m.Nickname + } + return "" } -var xxx_messageInfo_GetMaxAndMinSeqResp proto.InternalMessageInfo +func (m *PublicUserInfo) GetFaceUrl() string { + if m != nil { + return m.FaceUrl + } + return "" +} -func (m *GetMaxAndMinSeqResp) GetMaxSeq() int64 { +func (m *PublicUserInfo) GetGender() int32 { if m != nil { - return m.MaxSeq + return m.Gender } return 0 } -func (m *GetMaxAndMinSeqResp) GetMinSeq() int64 { +func (m *PublicUserInfo) GetAppMangerLevel() int32 { if m != nil { - return m.MinSeq + return m.AppMangerLevel } return 0 } -type GatherFormat struct { - // @inject_tag: json:"id" - Id string `protobuf:"bytes,1,opt,name=id" json:"id"` - // @inject_tag: json:"list" - List []*MsgData `protobuf:"bytes,2,rep,name=list" json:"list"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type UserInfo struct { + UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` + Nickname string `protobuf:"bytes,2,opt,name=Nickname" json:"Nickname,omitempty"` + FaceUrl string `protobuf:"bytes,3,opt,name=FaceUrl" json:"FaceUrl,omitempty"` + Gender int32 `protobuf:"varint,4,opt,name=Gender" json:"Gender,omitempty"` + PhoneNumber string `protobuf:"bytes,5,opt,name=PhoneNumber" json:"PhoneNumber,omitempty"` + Birth string `protobuf:"bytes,6,opt,name=Birth" json:"Birth,omitempty"` + Email string `protobuf:"bytes,7,opt,name=Email" json:"Email,omitempty"` + Ex string `protobuf:"bytes,8,opt,name=Ex" json:"Ex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GatherFormat) Reset() { *m = GatherFormat{} } -func (m *GatherFormat) String() string { return proto.CompactTextString(m) } -func (*GatherFormat) ProtoMessage() {} -func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{6} +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_a1fbf2797043d7f3, []int{3} } -func (m *GatherFormat) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GatherFormat.Unmarshal(m, b) +func (m *UserInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserInfo.Unmarshal(m, b) } -func (m *GatherFormat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GatherFormat.Marshal(b, m, deterministic) +func (m *UserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserInfo.Marshal(b, m, deterministic) } -func (dst *GatherFormat) XXX_Merge(src proto.Message) { - xxx_messageInfo_GatherFormat.Merge(dst, src) +func (dst *UserInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserInfo.Merge(dst, src) } -func (m *GatherFormat) XXX_Size() int { - return xxx_messageInfo_GatherFormat.Size(m) +func (m *UserInfo) XXX_Size() int { + return xxx_messageInfo_UserInfo.Size(m) } -func (m *GatherFormat) XXX_DiscardUnknown() { - xxx_messageInfo_GatherFormat.DiscardUnknown(m) +func (m *UserInfo) XXX_DiscardUnknown() { + xxx_messageInfo_UserInfo.DiscardUnknown(m) } -var xxx_messageInfo_GatherFormat proto.InternalMessageInfo +var xxx_messageInfo_UserInfo proto.InternalMessageInfo -func (m *GatherFormat) GetId() string { +func (m *UserInfo) GetUserID() string { if m != nil { - return m.Id + return m.UserID } return "" } -func (m *GatherFormat) GetList() []*MsgData { +func (m *UserInfo) GetNickname() string { if m != nil { - return m.List + return m.Nickname } - return nil + return "" } -type UserSendMsgResp struct { - ServerMsgID string `protobuf:"bytes,1,opt,name=ServerMsgID" json:"ServerMsgID,omitempty"` - ClientMsgID string `protobuf:"bytes,2,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` - SendTime int64 `protobuf:"varint,3,opt,name=sendTime" json:"sendTime,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (m *UserInfo) GetFaceUrl() string { + if m != nil { + return m.FaceUrl + } + return "" } -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_1ed69884ac12b8b9, []int{7} -} -func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) -} -func (m *UserSendMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UserSendMsgResp.Marshal(b, m, deterministic) -} -func (dst *UserSendMsgResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserSendMsgResp.Merge(dst, src) -} -func (m *UserSendMsgResp) XXX_Size() int { - return xxx_messageInfo_UserSendMsgResp.Size(m) -} -func (m *UserSendMsgResp) XXX_DiscardUnknown() { - xxx_messageInfo_UserSendMsgResp.DiscardUnknown(m) +func (m *UserInfo) GetGender() int32 { + if m != nil { + return m.Gender + } + return 0 } -var xxx_messageInfo_UserSendMsgResp proto.InternalMessageInfo +func (m *UserInfo) GetPhoneNumber() string { + if m != nil { + return m.PhoneNumber + } + return "" +} -func (m *UserSendMsgResp) GetServerMsgID() string { +func (m *UserInfo) GetBirth() string { if m != nil { - return m.ServerMsgID + return m.Birth } return "" } -func (m *UserSendMsgResp) GetClientMsgID() string { +func (m *UserInfo) GetEmail() string { if m != nil { - return m.ClientMsgID + return m.Email } return "" } -func (m *UserSendMsgResp) GetSendTime() int64 { +func (m *UserInfo) GetEx() string { if m != nil { - return m.SendTime + return m.Ex } - return 0 + return "" } -type MsgData struct { - SendID string `protobuf:"bytes,1,opt,name=sendID" json:"sendID,omitempty"` - RecvID string `protobuf:"bytes,2,opt,name=recvID" json:"recvID,omitempty"` - GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` - ClientMsgID string `protobuf:"bytes,4,opt,name=clientMsgID" json:"clientMsgID,omitempty"` - ServerMsgID string `protobuf:"bytes,5,opt,name=serverMsgID" json:"serverMsgID,omitempty"` - SenderPlatformID int32 `protobuf:"varint,6,opt,name=senderPlatformID" json:"senderPlatformID,omitempty"` - SenderNickName string `protobuf:"bytes,7,opt,name=senderNickName" json:"senderNickName,omitempty"` - SenderFaceURL string `protobuf:"bytes,8,opt,name=senderFaceURL" json:"senderFaceURL,omitempty"` - SessionType int32 `protobuf:"varint,9,opt,name=sessionType" json:"sessionType,omitempty"` - MsgFrom int32 `protobuf:"varint,10,opt,name=msgFrom" json:"msgFrom,omitempty"` - ContentType int32 `protobuf:"varint,11,opt,name=contentType" json:"contentType,omitempty"` - Content []byte `protobuf:"bytes,12,opt,name=content,proto3" json:"content,omitempty"` - ForceList []string `protobuf:"bytes,13,rep,name=forceList" json:"forceList,omitempty"` - Seq int64 `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"` - Options map[string]bool `protobuf:"bytes,17,rep,name=Options" json:"Options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - OfflinePushInfo *OfflinePushInfo `protobuf:"bytes,18,opt,name=offlinePushInfo" json:"offlinePushInfo,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type FriendInfo struct { + OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` + Remark string `protobuf:"bytes,2,opt,name=Remark" json:"Remark,omitempty"` + CreateTime int64 `protobuf:"varint,3,opt,name=CreateTime" json:"CreateTime,omitempty"` + FriendUser *UserInfo `protobuf:"bytes,4,opt,name=FriendUser" json:"FriendUser,omitempty"` + AddSource int32 `protobuf:"varint,5,opt,name=AddSource" json:"AddSource,omitempty"` + OperatorUserID string `protobuf:"bytes,6,opt,name=OperatorUserID" json:"OperatorUserID,omitempty"` + Ex string `protobuf:"bytes,7,opt,name=Ex" json:"Ex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -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_1ed69884ac12b8b9, []int{8} +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_a1fbf2797043d7f3, []int{4} } -func (m *MsgData) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MsgData.Unmarshal(m, b) +func (m *FriendInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendInfo.Unmarshal(m, b) } -func (m *MsgData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MsgData.Marshal(b, m, deterministic) +func (m *FriendInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendInfo.Marshal(b, m, deterministic) } -func (dst *MsgData) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgData.Merge(dst, src) +func (dst *FriendInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendInfo.Merge(dst, src) } -func (m *MsgData) XXX_Size() int { - return xxx_messageInfo_MsgData.Size(m) +func (m *FriendInfo) XXX_Size() int { + return xxx_messageInfo_FriendInfo.Size(m) } -func (m *MsgData) XXX_DiscardUnknown() { - xxx_messageInfo_MsgData.DiscardUnknown(m) +func (m *FriendInfo) XXX_DiscardUnknown() { + xxx_messageInfo_FriendInfo.DiscardUnknown(m) } -var xxx_messageInfo_MsgData proto.InternalMessageInfo +var xxx_messageInfo_FriendInfo proto.InternalMessageInfo -func (m *MsgData) GetSendID() string { +func (m *FriendInfo) GetOwnerUserID() string { if m != nil { - return m.SendID + return m.OwnerUserID } return "" } -func (m *MsgData) GetRecvID() string { +func (m *FriendInfo) GetRemark() string { if m != nil { - return m.RecvID + return m.Remark } return "" } -func (m *MsgData) GetGroupID() string { +func (m *FriendInfo) GetCreateTime() int64 { if m != nil { - return m.GroupID + return m.CreateTime } - return "" + return 0 } -func (m *MsgData) GetClientMsgID() string { +func (m *FriendInfo) GetFriendUser() *UserInfo { if m != nil { - return m.ClientMsgID + return m.FriendUser } - return "" + return nil } -func (m *MsgData) GetServerMsgID() string { +func (m *FriendInfo) GetAddSource() int32 { if m != nil { - return m.ServerMsgID + return m.AddSource } - return "" + return 0 } -func (m *MsgData) GetSenderPlatformID() int32 { +func (m *FriendInfo) GetOperatorUserID() string { if m != nil { - return m.SenderPlatformID + return m.OperatorUserID } - return 0 + return "" } -func (m *MsgData) GetSenderNickName() string { +func (m *FriendInfo) GetEx() string { if m != nil { - return m.SenderNickName + return m.Ex } return "" } -func (m *MsgData) GetSenderFaceURL() string { +type BlackInfo struct { + OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` + CreateTime int64 `protobuf:"varint,2,opt,name=CreateTime" json:"CreateTime,omitempty"` + BlackUserInfo *PublicUserInfo `protobuf:"bytes,4,opt,name=BlackUserInfo" json:"BlackUserInfo,omitempty"` + AddSource int32 `protobuf:"varint,5,opt,name=AddSource" json:"AddSource,omitempty"` + OperatorUserID string `protobuf:"bytes,6,opt,name=OperatorUserID" json:"OperatorUserID,omitempty"` + Ex string `protobuf:"bytes,7,opt,name=Ex" json:"Ex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_a1fbf2797043d7f3, []int{5} +} +func (m *BlackInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BlackInfo.Unmarshal(m, b) +} +func (m *BlackInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BlackInfo.Marshal(b, m, deterministic) +} +func (dst *BlackInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlackInfo.Merge(dst, src) +} +func (m *BlackInfo) XXX_Size() int { + return xxx_messageInfo_BlackInfo.Size(m) +} +func (m *BlackInfo) XXX_DiscardUnknown() { + xxx_messageInfo_BlackInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_BlackInfo proto.InternalMessageInfo + +func (m *BlackInfo) GetOwnerUserID() string { if m != nil { - return m.SenderFaceURL + return m.OwnerUserID } return "" } -func (m *MsgData) GetSessionType() int32 { +func (m *BlackInfo) GetCreateTime() int64 { if m != nil { - return m.SessionType + return m.CreateTime } return 0 } -func (m *MsgData) GetMsgFrom() int32 { +func (m *BlackInfo) GetBlackUserInfo() *PublicUserInfo { if m != nil { - return m.MsgFrom + return m.BlackUserInfo } - return 0 + return nil } -func (m *MsgData) GetContentType() int32 { +func (m *BlackInfo) GetAddSource() int32 { if m != nil { - return m.ContentType + return m.AddSource } return 0 } -func (m *MsgData) GetContent() []byte { +func (m *BlackInfo) GetOperatorUserID() string { if m != nil { - return m.Content + return m.OperatorUserID } - return nil + return "" } -func (m *MsgData) GetForceList() []string { +func (m *BlackInfo) GetEx() string { if m != nil { - return m.ForceList + return m.Ex } - return nil + return "" } -func (m *MsgData) GetSeq() int64 { +type GroupRequest struct { + UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` + GroupID string `protobuf:"bytes,2,opt,name=GroupID" json:"GroupID,omitempty"` + HandleResult string `protobuf:"bytes,3,opt,name=HandleResult" json:"HandleResult,omitempty"` + ReqMsg string `protobuf:"bytes,4,opt,name=ReqMsg" json:"ReqMsg,omitempty"` + HandleMsg string `protobuf:"bytes,5,opt,name=HandleMsg" json:"HandleMsg,omitempty"` + ReqTime int64 `protobuf:"varint,6,opt,name=ReqTime" json:"ReqTime,omitempty"` + HandleUserID string `protobuf:"bytes,7,opt,name=HandleUserID" json:"HandleUserID,omitempty"` + HandleTime int64 `protobuf:"varint,8,opt,name=HandleTime" json:"HandleTime,omitempty"` + Ex string `protobuf:"bytes,9,opt,name=Ex" json:"Ex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_a1fbf2797043d7f3, []int{6} +} +func (m *GroupRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupRequest.Unmarshal(m, b) +} +func (m *GroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupRequest.Marshal(b, m, deterministic) +} +func (dst *GroupRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupRequest.Merge(dst, src) +} +func (m *GroupRequest) XXX_Size() int { + return xxx_messageInfo_GroupRequest.Size(m) +} +func (m *GroupRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GroupRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupRequest proto.InternalMessageInfo + +func (m *GroupRequest) GetUserID() string { if m != nil { - return m.Seq + return m.UserID } - return 0 + return "" } -func (m *MsgData) GetSendTime() int64 { +func (m *GroupRequest) GetGroupID() string { if m != nil { - return m.SendTime + return m.GroupID } - return 0 + return "" } -func (m *MsgData) GetCreateTime() int64 { +func (m *GroupRequest) GetHandleResult() string { if m != nil { - return m.CreateTime + return m.HandleResult + } + return "" +} + +func (m *GroupRequest) GetReqMsg() string { + if m != nil { + return m.ReqMsg + } + return "" +} + +func (m *GroupRequest) GetHandleMsg() string { + if m != nil { + return m.HandleMsg + } + return "" +} + +func (m *GroupRequest) GetReqTime() int64 { + if m != nil { + return m.ReqTime } return 0 } -func (m *MsgData) GetOptions() map[string]bool { +func (m *GroupRequest) GetHandleUserID() string { if m != nil { - return m.Options + return m.HandleUserID } - return nil + return "" } -func (m *MsgData) GetOfflinePushInfo() *OfflinePushInfo { +func (m *GroupRequest) GetHandleTime() int64 { if m != nil { - return m.OfflinePushInfo + return m.HandleTime } - return nil + return 0 } -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"` - Ext string `protobuf:"bytes,3,opt,name=Ext" json:"Ext,omitempty"` - IOSPushSound string `protobuf:"bytes,4,opt,name=iOSPushSound" json:"iOSPushSound,omitempty"` - IOSBadgeCount bool `protobuf:"varint,5,opt,name=iOSBadgeCount" json:"iOSBadgeCount,omitempty"` +func (m *GroupRequest) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +type FriendRequest struct { + FromUserID string `protobuf:"bytes,1,opt,name=FromUserID" json:"FromUserID,omitempty"` + ToUserID string `protobuf:"bytes,2,opt,name=ToUserID" json:"ToUserID,omitempty"` + HandleResult int32 `protobuf:"varint,3,opt,name=HandleResult" json:"HandleResult,omitempty"` + ReqMsg string `protobuf:"bytes,4,opt,name=ReqMsg" json:"ReqMsg,omitempty"` + CreateTime int64 `protobuf:"varint,5,opt,name=CreateTime" json:"CreateTime,omitempty"` + HandlerUserID string `protobuf:"bytes,6,opt,name=HandlerUserID" json:"HandlerUserID,omitempty"` + HandleMsg string `protobuf:"bytes,7,opt,name=HandleMsg" json:"HandleMsg,omitempty"` + HandleTime int64 `protobuf:"varint,8,opt,name=HandleTime" json:"HandleTime,omitempty"` + Ex string `protobuf:"bytes,9,opt,name=Ex" json:"Ex,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -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_1ed69884ac12b8b9, []int{9} +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_a1fbf2797043d7f3, []int{7} } -func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) +func (m *FriendRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendRequest.Unmarshal(m, b) } -func (m *OfflinePushInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_OfflinePushInfo.Marshal(b, m, deterministic) +func (m *FriendRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendRequest.Marshal(b, m, deterministic) } -func (dst *OfflinePushInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_OfflinePushInfo.Merge(dst, src) +func (dst *FriendRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendRequest.Merge(dst, src) } -func (m *OfflinePushInfo) XXX_Size() int { - return xxx_messageInfo_OfflinePushInfo.Size(m) +func (m *FriendRequest) XXX_Size() int { + return xxx_messageInfo_FriendRequest.Size(m) } -func (m *OfflinePushInfo) XXX_DiscardUnknown() { - xxx_messageInfo_OfflinePushInfo.DiscardUnknown(m) +func (m *FriendRequest) XXX_DiscardUnknown() { + xxx_messageInfo_FriendRequest.DiscardUnknown(m) } -var xxx_messageInfo_OfflinePushInfo proto.InternalMessageInfo +var xxx_messageInfo_FriendRequest proto.InternalMessageInfo -func (m *OfflinePushInfo) GetTitle() string { +func (m *FriendRequest) GetFromUserID() string { if m != nil { - return m.Title + return m.FromUserID } return "" } -func (m *OfflinePushInfo) GetDesc() string { +func (m *FriendRequest) GetToUserID() string { if m != nil { - return m.Desc + return m.ToUserID } return "" } -func (m *OfflinePushInfo) GetExt() string { +func (m *FriendRequest) GetHandleResult() int32 { if m != nil { - return m.Ext + return m.HandleResult } - return "" + return 0 } -func (m *OfflinePushInfo) GetIOSPushSound() string { +func (m *FriendRequest) GetReqMsg() string { if m != nil { - return m.IOSPushSound + return m.ReqMsg } return "" } -func (m *OfflinePushInfo) GetIOSBadgeCount() bool { +func (m *FriendRequest) GetCreateTime() int64 { if m != nil { - return m.IOSBadgeCount + return m.CreateTime } - return false -} - -// public -type GroupInfo struct { - GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` - GroupName string `protobuf:"bytes,2,opt,name=GroupName" json:"GroupName,omitempty"` - Notification string `protobuf:"bytes,3,opt,name=Notification" json:"Notification,omitempty"` - Introduction string `protobuf:"bytes,4,opt,name=Introduction" json:"Introduction,omitempty"` - FaceUrl string `protobuf:"bytes,5,opt,name=FaceUrl" json:"FaceUrl,omitempty"` - Owner *PublicUserInfo `protobuf:"bytes,6,opt,name=Owner" json:"Owner,omitempty"` - CreateTime uint64 `protobuf:"varint,7,opt,name=CreateTime" json:"CreateTime,omitempty"` - MemberCount uint32 `protobuf:"varint,8,opt,name=MemberCount" json:"MemberCount,omitempty"` - Ext string `protobuf:"bytes,9,opt,name=Ext" json:"Ext,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + return 0 } -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_1ed69884ac12b8b9, []int{10} -} -func (m *GroupInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GroupInfo.Unmarshal(m, b) -} -func (m *GroupInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GroupInfo.Marshal(b, m, deterministic) -} -func (dst *GroupInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupInfo.Merge(dst, src) -} -func (m *GroupInfo) XXX_Size() int { - return xxx_messageInfo_GroupInfo.Size(m) -} -func (m *GroupInfo) XXX_DiscardUnknown() { - xxx_messageInfo_GroupInfo.DiscardUnknown(m) +func (m *FriendRequest) GetHandlerUserID() string { + if m != nil { + return m.HandlerUserID + } + return "" } -var xxx_messageInfo_GroupInfo proto.InternalMessageInfo - -func (m *GroupInfo) GetGroupID() string { +func (m *FriendRequest) GetHandleMsg() string { if m != nil { - return m.GroupID + return m.HandleMsg } return "" } -func (m *GroupInfo) GetGroupName() string { +func (m *FriendRequest) GetHandleTime() int64 { if m != nil { - return m.GroupName + return m.HandleTime } - return "" + return 0 } -func (m *GroupInfo) GetNotification() string { +func (m *FriendRequest) GetEx() string { if m != nil { - return m.Notification + return m.Ex } return "" } -func (m *GroupInfo) GetIntroduction() string { +type PullMessageBySeqListResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + MaxSeq int64 `protobuf:"varint,3,opt,name=maxSeq" json:"maxSeq,omitempty"` + MinSeq int64 `protobuf:"varint,4,opt,name=minSeq" json:"minSeq,omitempty"` + SingleUserMsg []*GatherFormat `protobuf:"bytes,5,rep,name=singleUserMsg" json:"singleUserMsg,omitempty"` + GroupUserMsg []*GatherFormat `protobuf:"bytes,6,rep,name=groupUserMsg" json:"groupUserMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListResp{} } +func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } +func (*PullMessageBySeqListResp) ProtoMessage() {} +func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_a1fbf2797043d7f3, []int{8} +} +func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) +} +func (m *PullMessageBySeqListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PullMessageBySeqListResp.Marshal(b, m, deterministic) +} +func (dst *PullMessageBySeqListResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_PullMessageBySeqListResp.Merge(dst, src) +} +func (m *PullMessageBySeqListResp) XXX_Size() int { + return xxx_messageInfo_PullMessageBySeqListResp.Size(m) +} +func (m *PullMessageBySeqListResp) XXX_DiscardUnknown() { + xxx_messageInfo_PullMessageBySeqListResp.DiscardUnknown(m) +} + +var xxx_messageInfo_PullMessageBySeqListResp proto.InternalMessageInfo + +func (m *PullMessageBySeqListResp) GetErrCode() int32 { if m != nil { - return m.Introduction + return m.ErrCode } - return "" + return 0 } -func (m *GroupInfo) GetFaceUrl() string { +func (m *PullMessageBySeqListResp) GetErrMsg() string { if m != nil { - return m.FaceUrl + return m.ErrMsg } return "" } -func (m *GroupInfo) GetOwner() *PublicUserInfo { +func (m *PullMessageBySeqListResp) GetMaxSeq() int64 { if m != nil { - return m.Owner + return m.MaxSeq } - return nil + return 0 } -func (m *GroupInfo) GetCreateTime() uint64 { +func (m *PullMessageBySeqListResp) GetMinSeq() int64 { if m != nil { - return m.CreateTime + return m.MinSeq } return 0 } -func (m *GroupInfo) GetMemberCount() uint32 { +func (m *PullMessageBySeqListResp) GetSingleUserMsg() []*GatherFormat { if m != nil { - return m.MemberCount + return m.SingleUserMsg } - return 0 + return nil } -func (m *GroupInfo) GetExt() string { +func (m *PullMessageBySeqListResp) GetGroupUserMsg() []*GatherFormat { if m != nil { - return m.Ext + return m.GroupUserMsg } - return "" + return nil } -// private, Group members have permission to view -type GroupMemberFullInfo struct { - GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` - UserID string `protobuf:"bytes,2,opt,name=UserID" json:"UserID,omitempty"` - AdministratorLevel int32 `protobuf:"varint,3,opt,name=AdministratorLevel" json:"AdministratorLevel,omitempty"` - JoinTime uint64 `protobuf:"varint,4,opt,name=JoinTime" json:"JoinTime,omitempty"` - NickName string `protobuf:"bytes,5,opt,name=NickName" json:"NickName,omitempty"` - FaceUrl string `protobuf:"bytes,6,opt,name=FaceUrl" json:"FaceUrl,omitempty"` - FriendRemark string `protobuf:"bytes,7,opt,name=FriendRemark" json:"FriendRemark,omitempty"` - AppMangerLevel int32 `protobuf:"varint,8,opt,name=AppMangerLevel" json:"AppMangerLevel,omitempty"` +type PullMessageBySeqListReq struct { + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` + SeqList []int64 `protobuf:"varint,3,rep,packed,name=seqList" json:"seqList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -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_1ed69884ac12b8b9, []int{11} +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_a1fbf2797043d7f3, []int{9} } -func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) +func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) } -func (m *GroupMemberFullInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GroupMemberFullInfo.Marshal(b, m, deterministic) +func (m *PullMessageBySeqListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PullMessageBySeqListReq.Marshal(b, m, deterministic) } -func (dst *GroupMemberFullInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupMemberFullInfo.Merge(dst, src) +func (dst *PullMessageBySeqListReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_PullMessageBySeqListReq.Merge(dst, src) } -func (m *GroupMemberFullInfo) XXX_Size() int { - return xxx_messageInfo_GroupMemberFullInfo.Size(m) +func (m *PullMessageBySeqListReq) XXX_Size() int { + return xxx_messageInfo_PullMessageBySeqListReq.Size(m) +} +func (m *PullMessageBySeqListReq) XXX_DiscardUnknown() { + xxx_messageInfo_PullMessageBySeqListReq.DiscardUnknown(m) +} + +var xxx_messageInfo_PullMessageBySeqListReq proto.InternalMessageInfo + +func (m *PullMessageBySeqListReq) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *PullMessageBySeqListReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *PullMessageBySeqListReq) GetSeqList() []int64 { + if m != nil { + return m.SeqList + } + return nil +} + +type PullMessageReq struct { + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + SeqBegin int64 `protobuf:"varint,2,opt,name=seqBegin" json:"seqBegin,omitempty"` + SeqEnd int64 `protobuf:"varint,3,opt,name=seqEnd" json:"seqEnd,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 *PullMessageReq) Reset() { *m = PullMessageReq{} } +func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } +func (*PullMessageReq) ProtoMessage() {} +func (*PullMessageReq) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_a1fbf2797043d7f3, []int{10} +} +func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) +} +func (m *PullMessageReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PullMessageReq.Marshal(b, m, deterministic) +} +func (dst *PullMessageReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_PullMessageReq.Merge(dst, src) +} +func (m *PullMessageReq) XXX_Size() int { + return xxx_messageInfo_PullMessageReq.Size(m) +} +func (m *PullMessageReq) XXX_DiscardUnknown() { + xxx_messageInfo_PullMessageReq.DiscardUnknown(m) +} + +var xxx_messageInfo_PullMessageReq proto.InternalMessageInfo + +func (m *PullMessageReq) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *PullMessageReq) GetSeqBegin() int64 { + if m != nil { + return m.SeqBegin + } + return 0 +} + +func (m *PullMessageReq) GetSeqEnd() int64 { + if m != nil { + return m.SeqEnd + } + return 0 +} + +func (m *PullMessageReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +type PullMessageResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + MaxSeq int64 `protobuf:"varint,3,opt,name=maxSeq" json:"maxSeq,omitempty"` + MinSeq int64 `protobuf:"varint,4,opt,name=minSeq" json:"minSeq,omitempty"` + SingleUserMsg []*GatherFormat `protobuf:"bytes,5,rep,name=singleUserMsg" json:"singleUserMsg,omitempty"` + GroupUserMsg []*GatherFormat `protobuf:"bytes,6,rep,name=groupUserMsg" json:"groupUserMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } +func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } +func (*PullMessageResp) ProtoMessage() {} +func (*PullMessageResp) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_a1fbf2797043d7f3, []int{11} +} +func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) +} +func (m *PullMessageResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PullMessageResp.Marshal(b, m, deterministic) +} +func (dst *PullMessageResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_PullMessageResp.Merge(dst, src) +} +func (m *PullMessageResp) XXX_Size() int { + return xxx_messageInfo_PullMessageResp.Size(m) +} +func (m *PullMessageResp) XXX_DiscardUnknown() { + xxx_messageInfo_PullMessageResp.DiscardUnknown(m) +} + +var xxx_messageInfo_PullMessageResp proto.InternalMessageInfo + +func (m *PullMessageResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *PullMessageResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *PullMessageResp) GetMaxSeq() int64 { + if m != nil { + return m.MaxSeq + } + return 0 +} + +func (m *PullMessageResp) GetMinSeq() int64 { + if m != nil { + return m.MinSeq + } + return 0 +} + +func (m *PullMessageResp) GetSingleUserMsg() []*GatherFormat { + if m != nil { + return m.SingleUserMsg + } + return nil +} + +func (m *PullMessageResp) GetGroupUserMsg() []*GatherFormat { + if m != nil { + return m.GroupUserMsg + } + return nil +} + +type GetMaxAndMinSeqReq struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_a1fbf2797043d7f3, []int{12} +} +func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) +} +func (m *GetMaxAndMinSeqReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetMaxAndMinSeqReq.Marshal(b, m, deterministic) +} +func (dst *GetMaxAndMinSeqReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetMaxAndMinSeqReq.Merge(dst, src) +} +func (m *GetMaxAndMinSeqReq) XXX_Size() int { + return xxx_messageInfo_GetMaxAndMinSeqReq.Size(m) +} +func (m *GetMaxAndMinSeqReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetMaxAndMinSeqReq.DiscardUnknown(m) +} + +var xxx_messageInfo_GetMaxAndMinSeqReq proto.InternalMessageInfo + +type GetMaxAndMinSeqResp struct { + MaxSeq int64 `protobuf:"varint,1,opt,name=maxSeq" json:"maxSeq,omitempty"` + MinSeq int64 `protobuf:"varint,2,opt,name=minSeq" json:"minSeq,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_a1fbf2797043d7f3, []int{13} +} +func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) +} +func (m *GetMaxAndMinSeqResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetMaxAndMinSeqResp.Marshal(b, m, deterministic) +} +func (dst *GetMaxAndMinSeqResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetMaxAndMinSeqResp.Merge(dst, src) +} +func (m *GetMaxAndMinSeqResp) XXX_Size() int { + return xxx_messageInfo_GetMaxAndMinSeqResp.Size(m) +} +func (m *GetMaxAndMinSeqResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetMaxAndMinSeqResp.DiscardUnknown(m) +} + +var xxx_messageInfo_GetMaxAndMinSeqResp proto.InternalMessageInfo + +func (m *GetMaxAndMinSeqResp) GetMaxSeq() int64 { + if m != nil { + return m.MaxSeq + } + return 0 +} + +func (m *GetMaxAndMinSeqResp) GetMinSeq() int64 { + if m != nil { + return m.MinSeq + } + return 0 +} + +type GatherFormat struct { + // @inject_tag: json:"id" + Id string `protobuf:"bytes,1,opt,name=id" json:"id"` + // @inject_tag: json:"list" + List []*MsgData `protobuf:"bytes,2,rep,name=list" json:"list"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GatherFormat) Reset() { *m = GatherFormat{} } +func (m *GatherFormat) String() string { return proto.CompactTextString(m) } +func (*GatherFormat) ProtoMessage() {} +func (*GatherFormat) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_a1fbf2797043d7f3, []int{14} +} +func (m *GatherFormat) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GatherFormat.Unmarshal(m, b) +} +func (m *GatherFormat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GatherFormat.Marshal(b, m, deterministic) +} +func (dst *GatherFormat) XXX_Merge(src proto.Message) { + xxx_messageInfo_GatherFormat.Merge(dst, src) +} +func (m *GatherFormat) XXX_Size() int { + return xxx_messageInfo_GatherFormat.Size(m) +} +func (m *GatherFormat) XXX_DiscardUnknown() { + xxx_messageInfo_GatherFormat.DiscardUnknown(m) +} + +var xxx_messageInfo_GatherFormat proto.InternalMessageInfo + +func (m *GatherFormat) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *GatherFormat) GetList() []*MsgData { + if m != nil { + return m.List + } + return nil +} + +type UserSendMsgResp struct { + ServerMsgID string `protobuf:"bytes,1,opt,name=ServerMsgID" json:"ServerMsgID,omitempty"` + ClientMsgID string `protobuf:"bytes,2,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` + SendTime int64 `protobuf:"varint,3,opt,name=sendTime" json:"sendTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_a1fbf2797043d7f3, []int{15} +} +func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) +} +func (m *UserSendMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserSendMsgResp.Marshal(b, m, deterministic) +} +func (dst *UserSendMsgResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserSendMsgResp.Merge(dst, src) +} +func (m *UserSendMsgResp) XXX_Size() int { + return xxx_messageInfo_UserSendMsgResp.Size(m) +} +func (m *UserSendMsgResp) XXX_DiscardUnknown() { + xxx_messageInfo_UserSendMsgResp.DiscardUnknown(m) +} + +var xxx_messageInfo_UserSendMsgResp proto.InternalMessageInfo + +func (m *UserSendMsgResp) GetServerMsgID() string { + if m != nil { + return m.ServerMsgID + } + return "" +} + +func (m *UserSendMsgResp) GetClientMsgID() string { + if m != nil { + return m.ClientMsgID + } + return "" +} + +func (m *UserSendMsgResp) GetSendTime() int64 { + if m != nil { + return m.SendTime + } + return 0 +} + +type MsgData struct { + SendID string `protobuf:"bytes,1,opt,name=sendID" json:"sendID,omitempty"` + RecvID string `protobuf:"bytes,2,opt,name=recvID" json:"recvID,omitempty"` + GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` + ClientMsgID string `protobuf:"bytes,4,opt,name=clientMsgID" json:"clientMsgID,omitempty"` + ServerMsgID string `protobuf:"bytes,5,opt,name=serverMsgID" json:"serverMsgID,omitempty"` + SenderPlatformID int32 `protobuf:"varint,6,opt,name=senderPlatformID" json:"senderPlatformID,omitempty"` + SenderNickname string `protobuf:"bytes,7,opt,name=senderNickname" json:"senderNickname,omitempty"` + SenderFaceURL string `protobuf:"bytes,8,opt,name=senderFaceURL" json:"senderFaceURL,omitempty"` + SessionType int32 `protobuf:"varint,9,opt,name=sessionType" json:"sessionType,omitempty"` + MsgFrom int32 `protobuf:"varint,10,opt,name=msgFrom" json:"msgFrom,omitempty"` + ContentType int32 `protobuf:"varint,11,opt,name=contentType" json:"contentType,omitempty"` + Content []byte `protobuf:"bytes,12,opt,name=content,proto3" json:"content,omitempty"` + ForceList []string `protobuf:"bytes,13,rep,name=forceList" json:"forceList,omitempty"` + Seq int64 `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"` + Options map[string]bool `protobuf:"bytes,17,rep,name=Options" json:"Options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + OfflinePushInfo *OfflinePushInfo `protobuf:"bytes,18,opt,name=offlinePushInfo" json:"offlinePushInfo,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_a1fbf2797043d7f3, []int{16} +} +func (m *MsgData) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgData.Unmarshal(m, b) +} +func (m *MsgData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgData.Marshal(b, m, deterministic) +} +func (dst *MsgData) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgData.Merge(dst, src) } -func (m *GroupMemberFullInfo) XXX_DiscardUnknown() { - xxx_messageInfo_GroupMemberFullInfo.DiscardUnknown(m) +func (m *MsgData) XXX_Size() int { + return xxx_messageInfo_MsgData.Size(m) +} +func (m *MsgData) XXX_DiscardUnknown() { + xxx_messageInfo_MsgData.DiscardUnknown(m) } -var xxx_messageInfo_GroupMemberFullInfo proto.InternalMessageInfo +var xxx_messageInfo_MsgData proto.InternalMessageInfo -func (m *GroupMemberFullInfo) GetGroupID() string { +func (m *MsgData) GetSendID() string { if m != nil { - return m.GroupID + return m.SendID } return "" } -func (m *GroupMemberFullInfo) GetUserID() string { +func (m *MsgData) GetRecvID() string { if m != nil { - return m.UserID + return m.RecvID } return "" } -func (m *GroupMemberFullInfo) GetAdministratorLevel() int32 { +func (m *MsgData) GetGroupID() string { if m != nil { - return m.AdministratorLevel + return m.GroupID } - return 0 + return "" } -func (m *GroupMemberFullInfo) GetJoinTime() uint64 { +func (m *MsgData) GetClientMsgID() string { if m != nil { - return m.JoinTime + return m.ClientMsgID } - return 0 + return "" } -func (m *GroupMemberFullInfo) GetNickName() string { +func (m *MsgData) GetServerMsgID() string { if m != nil { - return m.NickName + return m.ServerMsgID } return "" } -func (m *GroupMemberFullInfo) GetFaceUrl() string { +func (m *MsgData) GetSenderPlatformID() int32 { if m != nil { - return m.FaceUrl + return m.SenderPlatformID } - return "" + return 0 } -func (m *GroupMemberFullInfo) GetFriendRemark() string { +func (m *MsgData) GetSenderNickname() string { if m != nil { - return m.FriendRemark + return m.SenderNickname } return "" } -func (m *GroupMemberFullInfo) GetAppMangerLevel() int32 { +func (m *MsgData) GetSenderFaceURL() string { if m != nil { - return m.AppMangerLevel + return m.SenderFaceURL } - return 0 + return "" } -// private, Friends have permission to view -type UserInfo struct { - UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` - Nickname string `protobuf:"bytes,2,opt,name=Nickname" json:"Nickname,omitempty"` - FaceUrl string `protobuf:"bytes,3,opt,name=FaceUrl" json:"FaceUrl,omitempty"` - Gender int32 `protobuf:"varint,4,opt,name=Gender" json:"Gender,omitempty"` - Mobile string `protobuf:"bytes,5,opt,name=Mobile" json:"Mobile,omitempty"` - Birth string `protobuf:"bytes,6,opt,name=Birth" json:"Birth,omitempty"` - Email string `protobuf:"bytes,7,opt,name=Email" json:"Email,omitempty"` - Ext string `protobuf:"bytes,8,opt,name=Ext" json:"Ext,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (m *MsgData) GetSessionType() int32 { + if m != nil { + return m.SessionType + } + return 0 } -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_1ed69884ac12b8b9, []int{12} -} -func (m *UserInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UserInfo.Unmarshal(m, b) -} -func (m *UserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UserInfo.Marshal(b, m, deterministic) -} -func (dst *UserInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserInfo.Merge(dst, src) -} -func (m *UserInfo) XXX_Size() int { - return xxx_messageInfo_UserInfo.Size(m) -} -func (m *UserInfo) XXX_DiscardUnknown() { - xxx_messageInfo_UserInfo.DiscardUnknown(m) +func (m *MsgData) GetMsgFrom() int32 { + if m != nil { + return m.MsgFrom + } + return 0 } -var xxx_messageInfo_UserInfo proto.InternalMessageInfo - -func (m *UserInfo) GetUserID() string { +func (m *MsgData) GetContentType() int32 { if m != nil { - return m.UserID + return m.ContentType } - return "" + return 0 } -func (m *UserInfo) GetNickname() string { +func (m *MsgData) GetContent() []byte { if m != nil { - return m.Nickname + return m.Content } - return "" + return nil } -func (m *UserInfo) GetFaceUrl() string { +func (m *MsgData) GetForceList() []string { if m != nil { - return m.FaceUrl + return m.ForceList } - return "" + return nil } -func (m *UserInfo) GetGender() int32 { +func (m *MsgData) GetSeq() int64 { if m != nil { - return m.Gender + return m.Seq } return 0 } -func (m *UserInfo) GetMobile() string { +func (m *MsgData) GetSendTime() int64 { if m != nil { - return m.Mobile + return m.SendTime } - return "" + return 0 } -func (m *UserInfo) GetBirth() string { +func (m *MsgData) GetCreateTime() int64 { if m != nil { - return m.Birth + return m.CreateTime } - return "" + return 0 } -func (m *UserInfo) GetEmail() string { +func (m *MsgData) GetOptions() map[string]bool { if m != nil { - return m.Email + return m.Options } - return "" + return nil } -func (m *UserInfo) GetExt() string { +func (m *MsgData) GetOfflinePushInfo() *OfflinePushInfo { if m != nil { - return m.Ext + return m.OfflinePushInfo } - return "" + return nil } -// No permissions required -type PublicUserInfo struct { - UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` - Nickname string `protobuf:"bytes,2,opt,name=Nickname" json:"Nickname,omitempty"` - FaceUrl string `protobuf:"bytes,3,opt,name=FaceUrl" json:"FaceUrl,omitempty"` - Gender int32 `protobuf:"varint,4,opt,name=Gender" json:"Gender,omitempty"` +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"` + Ex string `protobuf:"bytes,3,opt,name=Ex" json:"Ex,omitempty"` + IOSPushSound string `protobuf:"bytes,4,opt,name=iOSPushSound" json:"iOSPushSound,omitempty"` + IOSBadgeCount bool `protobuf:"varint,5,opt,name=iOSBadgeCount" json:"iOSBadgeCount,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -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_1ed69884ac12b8b9, []int{13} +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_a1fbf2797043d7f3, []int{17} } -func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) +func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) } -func (m *PublicUserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PublicUserInfo.Marshal(b, m, deterministic) +func (m *OfflinePushInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OfflinePushInfo.Marshal(b, m, deterministic) } -func (dst *PublicUserInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_PublicUserInfo.Merge(dst, src) +func (dst *OfflinePushInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_OfflinePushInfo.Merge(dst, src) } -func (m *PublicUserInfo) XXX_Size() int { - return xxx_messageInfo_PublicUserInfo.Size(m) +func (m *OfflinePushInfo) XXX_Size() int { + return xxx_messageInfo_OfflinePushInfo.Size(m) } -func (m *PublicUserInfo) XXX_DiscardUnknown() { - xxx_messageInfo_PublicUserInfo.DiscardUnknown(m) +func (m *OfflinePushInfo) XXX_DiscardUnknown() { + xxx_messageInfo_OfflinePushInfo.DiscardUnknown(m) } -var xxx_messageInfo_PublicUserInfo proto.InternalMessageInfo +var xxx_messageInfo_OfflinePushInfo proto.InternalMessageInfo -func (m *PublicUserInfo) GetUserID() string { +func (m *OfflinePushInfo) GetTitle() string { if m != nil { - return m.UserID + return m.Title } return "" } -func (m *PublicUserInfo) GetNickname() string { +func (m *OfflinePushInfo) GetDesc() string { if m != nil { - return m.Nickname + return m.Desc } return "" } -func (m *PublicUserInfo) GetFaceUrl() string { +func (m *OfflinePushInfo) GetEx() string { if m != nil { - return m.FaceUrl + return m.Ex } return "" } -func (m *PublicUserInfo) GetGender() int32 { +func (m *OfflinePushInfo) GetIOSPushSound() string { if m != nil { - return m.Gender + return m.IOSPushSound } - return 0 + return "" +} + +func (m *OfflinePushInfo) GetIOSBadgeCount() bool { + if m != nil { + return m.IOSBadgeCount + } + return false } type TipsComm struct { @@ -1080,7 +1500,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_1ed69884ac12b8b9, []int{14} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{18} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -1119,7 +1539,7 @@ func (m *TipsComm) GetDefaultTips() string { type MemberEnterTips struct { Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` EntrantUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=EntrantUser" json:"EntrantUser,omitempty"` - OperationTime uint64 `protobuf:"varint,3,opt,name=OperationTime" json:"OperationTime,omitempty"` + OperationTime int64 `protobuf:"varint,3,opt,name=OperationTime" json:"OperationTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1129,7 +1549,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_1ed69884ac12b8b9, []int{15} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{19} } func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) @@ -1163,7 +1583,7 @@ func (m *MemberEnterTips) GetEntrantUser() *GroupMemberFullInfo { return nil } -func (m *MemberEnterTips) GetOperationTime() uint64 { +func (m *MemberEnterTips) GetOperationTime() int64 { if m != nil { return m.OperationTime } @@ -1174,7 +1594,7 @@ func (m *MemberEnterTips) GetOperationTime() uint64 { type MemberLeaveTips struct { Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` LeaverUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=LeaverUser" json:"LeaverUser,omitempty"` - OperationTime uint64 `protobuf:"varint,3,opt,name=OperationTime" json:"OperationTime,omitempty"` + OperationTime int64 `protobuf:"varint,3,opt,name=OperationTime" json:"OperationTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1184,7 +1604,7 @@ func (m *MemberLeaveTips) Reset() { *m = MemberLeaveTips{} } func (m *MemberLeaveTips) String() string { return proto.CompactTextString(m) } func (*MemberLeaveTips) ProtoMessage() {} func (*MemberLeaveTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{16} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{20} } func (m *MemberLeaveTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberLeaveTips.Unmarshal(m, b) @@ -1218,7 +1638,7 @@ func (m *MemberLeaveTips) GetLeaverUser() *GroupMemberFullInfo { return nil } -func (m *MemberLeaveTips) GetOperationTime() uint64 { +func (m *MemberLeaveTips) GetOperationTime() int64 { if m != nil { return m.OperationTime } @@ -1229,7 +1649,7 @@ type MemberInvitedTips struct { Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` InvitedUserList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=InvitedUserList" json:"InvitedUserList,omitempty"` - OperationTime uint64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` + OperationTime int64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1239,7 +1659,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_1ed69884ac12b8b9, []int{17} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{21} } func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) @@ -1280,7 +1700,7 @@ func (m *MemberInvitedTips) GetInvitedUserList() []*GroupMemberFullInfo { return nil } -func (m *MemberInvitedTips) GetOperationTime() uint64 { +func (m *MemberInvitedTips) GetOperationTime() int64 { if m != nil { return m.OperationTime } @@ -1291,7 +1711,7 @@ type MemberKickedTips struct { Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` KickedUserList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=KickedUserList" json:"KickedUserList,omitempty"` - OperationTime uint64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` + OperationTime int64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1301,7 +1721,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_1ed69884ac12b8b9, []int{18} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{22} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -1342,7 +1762,7 @@ func (m *MemberKickedTips) GetKickedUserList() []*GroupMemberFullInfo { return nil } -func (m *MemberKickedTips) GetOperationTime() uint64 { +func (m *MemberKickedTips) GetOperationTime() int64 { if m != nil { return m.OperationTime } @@ -1353,7 +1773,7 @@ type MemberInfoChangedTips struct { ChangeType int32 `protobuf:"varint,1,opt,name=ChangeType" json:"ChangeType,omitempty"` OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` FinalInfo *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=FinalInfo" json:"FinalInfo,omitempty"` - MuteTime uint64 `protobuf:"varint,4,opt,name=MuteTime" json:"MuteTime,omitempty"` + MuteTime int64 `protobuf:"varint,4,opt,name=MuteTime" json:"MuteTime,omitempty"` Group *GroupInfo `protobuf:"bytes,5,opt,name=Group" json:"Group,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1364,7 +1784,7 @@ func (m *MemberInfoChangedTips) Reset() { *m = MemberInfoChangedTips{} } func (m *MemberInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*MemberInfoChangedTips) ProtoMessage() {} func (*MemberInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{19} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{23} } func (m *MemberInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInfoChangedTips.Unmarshal(m, b) @@ -1405,7 +1825,7 @@ func (m *MemberInfoChangedTips) GetFinalInfo() *GroupMemberFullInfo { return nil } -func (m *MemberInfoChangedTips) GetMuteTime() uint64 { +func (m *MemberInfoChangedTips) GetMuteTime() int64 { if m != nil { return m.MuteTime } @@ -1423,7 +1843,7 @@ type GroupCreatedTips struct { Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` Creator *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=Creator" json:"Creator,omitempty"` MemberList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=MemberList" json:"MemberList,omitempty"` - OperationTime uint64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` + OperationTime int64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1433,7 +1853,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_1ed69884ac12b8b9, []int{20} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{24} } func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) @@ -1474,7 +1894,7 @@ func (m *GroupCreatedTips) GetMemberList() []*GroupMemberFullInfo { return nil } -func (m *GroupCreatedTips) GetOperationTime() uint64 { +func (m *GroupCreatedTips) GetOperationTime() int64 { if m != nil { return m.OperationTime } @@ -1494,7 +1914,7 @@ func (m *GroupInfoChangedTips) Reset() { *m = GroupInfoChangedTips{} } func (m *GroupInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*GroupInfoChangedTips) ProtoMessage() {} func (*GroupInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{21} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{25} } func (m *GroupInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoChangedTips.Unmarshal(m, b) @@ -1548,7 +1968,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_1ed69884ac12b8b9, []int{22} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{26} } func (m *JoinGroupApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupApplicationTips.Unmarshal(m, b) @@ -1603,7 +2023,7 @@ func (m *ApplicationProcessedTips) Reset() { *m = ApplicationProcessedTi func (m *ApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*ApplicationProcessedTips) ProtoMessage() {} func (*ApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{23} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{27} } func (m *ApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ApplicationProcessedTips.Unmarshal(m, b) @@ -1651,71 +2071,8 @@ func (m *ApplicationProcessedTips) GetReason() string { return "" } -// ////////////////////friend///////////////////// -type FriendInfo struct { - OwnerUser *UserInfo `protobuf:"bytes,1,opt,name=OwnerUser" json:"OwnerUser,omitempty"` - Remark string `protobuf:"bytes,2,opt,name=Remark" json:"Remark,omitempty"` - CreateTime uint64 `protobuf:"varint,3,opt,name=CreateTime" json:"CreateTime,omitempty"` - FriendUser *UserInfo `protobuf:"bytes,4,opt,name=FriendUser" json:"FriendUser,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -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_1ed69884ac12b8b9, []int{24} -} -func (m *FriendInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FriendInfo.Unmarshal(m, b) -} -func (m *FriendInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FriendInfo.Marshal(b, m, deterministic) -} -func (dst *FriendInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_FriendInfo.Merge(dst, src) -} -func (m *FriendInfo) XXX_Size() int { - return xxx_messageInfo_FriendInfo.Size(m) -} -func (m *FriendInfo) XXX_DiscardUnknown() { - xxx_messageInfo_FriendInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_FriendInfo proto.InternalMessageInfo - -func (m *FriendInfo) GetOwnerUser() *UserInfo { - if m != nil { - return m.OwnerUser - } - return nil -} - -func (m *FriendInfo) GetRemark() string { - if m != nil { - return m.Remark - } - return "" -} - -func (m *FriendInfo) GetCreateTime() uint64 { - if m != nil { - return m.CreateTime - } - return 0 -} - -func (m *FriendInfo) GetFriendUser() *UserInfo { - if m != nil { - return m.FriendUser - } - return nil -} - type FriendApplication struct { - AddTime uint64 `protobuf:"varint,1,opt,name=AddTime" json:"AddTime,omitempty"` + AddTime int64 `protobuf:"varint,1,opt,name=AddTime" json:"AddTime,omitempty"` AddSource string `protobuf:"bytes,2,opt,name=AddSource" json:"AddSource,omitempty"` AddWording string `protobuf:"bytes,3,opt,name=AddWording" json:"AddWording,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -1727,7 +2084,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_1ed69884ac12b8b9, []int{25} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{28} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -1747,7 +2104,7 @@ func (m *FriendApplication) XXX_DiscardUnknown() { var xxx_messageInfo_FriendApplication proto.InternalMessageInfo -func (m *FriendApplication) GetAddTime() uint64 { +func (m *FriendApplication) GetAddTime() int64 { if m != nil { return m.AddTime } @@ -1780,7 +2137,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_1ed69884ac12b8b9, []int{26} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{29} } func (m *FromToUserID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FromToUserID.Unmarshal(m, b) @@ -1826,7 +2183,7 @@ func (m *FriendApplicationAddedTips) Reset() { *m = FriendApplicationAdd func (m *FriendApplicationAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationAddedTips) ProtoMessage() {} func (*FriendApplicationAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{27} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{30} } func (m *FriendApplicationAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationAddedTips.Unmarshal(m, b) @@ -1865,7 +2222,7 @@ func (m *FriendApplicationProcessedTips) Reset() { *m = FriendApplicatio func (m *FriendApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationProcessedTips) ProtoMessage() {} func (*FriendApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{28} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{31} } func (m *FriendApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationProcessedTips.Unmarshal(m, b) @@ -1895,7 +2252,7 @@ func (m *FriendApplicationProcessedTips) GetFromToUserID() *FromToUserID { // FromUserID Added a friend ToUserID type FriendAddedTips struct { Friend *FriendInfo `protobuf:"bytes,1,opt,name=Friend" json:"Friend,omitempty"` - OperationTime uint64 `protobuf:"varint,2,opt,name=OperationTime" json:"OperationTime,omitempty"` + OperationTime int64 `protobuf:"varint,2,opt,name=OperationTime" json:"OperationTime,omitempty"` OpUser *PublicUserInfo `protobuf:"bytes,3,opt,name=OpUser" json:"OpUser,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1906,7 +2263,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_1ed69884ac12b8b9, []int{29} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{32} } func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) @@ -1933,7 +2290,7 @@ func (m *FriendAddedTips) GetFriend() *FriendInfo { return nil } -func (m *FriendAddedTips) GetOperationTime() uint64 { +func (m *FriendAddedTips) GetOperationTime() int64 { if m != nil { return m.OperationTime } @@ -1959,7 +2316,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_1ed69884ac12b8b9, []int{30} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{33} } func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) @@ -1997,7 +2354,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_1ed69884ac12b8b9, []int{31} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{34} } func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) @@ -2035,7 +2392,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_1ed69884ac12b8b9, []int{32} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{35} } func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) @@ -2073,7 +2430,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_1ed69884ac12b8b9, []int{33} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{36} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -2112,7 +2469,7 @@ func (m *SelfInfoUpdatedTips) Reset() { *m = SelfInfoUpdatedTips{} } func (m *SelfInfoUpdatedTips) String() string { return proto.CompactTextString(m) } func (*SelfInfoUpdatedTips) ProtoMessage() {} func (*SelfInfoUpdatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{34} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{37} } func (m *SelfInfoUpdatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SelfInfoUpdatedTips.Unmarshal(m, b) @@ -2140,6 +2497,14 @@ func (m *SelfInfoUpdatedTips) GetUserID() string { } func init() { + proto.RegisterType((*GroupInfo)(nil), "open_im_sdk.GroupInfo") + proto.RegisterType((*GroupMemberFullInfo)(nil), "open_im_sdk.GroupMemberFullInfo") + proto.RegisterType((*PublicUserInfo)(nil), "open_im_sdk.PublicUserInfo") + proto.RegisterType((*UserInfo)(nil), "open_im_sdk.UserInfo") + proto.RegisterType((*FriendInfo)(nil), "open_im_sdk.FriendInfo") + proto.RegisterType((*BlackInfo)(nil), "open_im_sdk.BlackInfo") + proto.RegisterType((*GroupRequest)(nil), "open_im_sdk.GroupRequest") + proto.RegisterType((*FriendRequest)(nil), "open_im_sdk.FriendRequest") proto.RegisterType((*PullMessageBySeqListResp)(nil), "open_im_sdk.PullMessageBySeqListResp") proto.RegisterType((*PullMessageBySeqListReq)(nil), "open_im_sdk.PullMessageBySeqListReq") proto.RegisterType((*PullMessageReq)(nil), "open_im_sdk.PullMessageReq") @@ -2151,10 +2516,6 @@ func init() { proto.RegisterType((*MsgData)(nil), "open_im_sdk.MsgData") proto.RegisterMapType((map[string]bool)(nil), "open_im_sdk.MsgData.OptionsEntry") proto.RegisterType((*OfflinePushInfo)(nil), "open_im_sdk.OfflinePushInfo") - proto.RegisterType((*GroupInfo)(nil), "open_im_sdk.GroupInfo") - proto.RegisterType((*GroupMemberFullInfo)(nil), "open_im_sdk.GroupMemberFullInfo") - proto.RegisterType((*UserInfo)(nil), "open_im_sdk.UserInfo") - proto.RegisterType((*PublicUserInfo)(nil), "open_im_sdk.PublicUserInfo") proto.RegisterType((*TipsComm)(nil), "open_im_sdk.TipsComm") proto.RegisterType((*MemberEnterTips)(nil), "open_im_sdk.MemberEnterTips") proto.RegisterType((*MemberLeaveTips)(nil), "open_im_sdk.MemberLeaveTips") @@ -2165,7 +2526,6 @@ func init() { proto.RegisterType((*GroupInfoChangedTips)(nil), "open_im_sdk.GroupInfoChangedTips") proto.RegisterType((*JoinGroupApplicationTips)(nil), "open_im_sdk.JoinGroupApplicationTips") proto.RegisterType((*ApplicationProcessedTips)(nil), "open_im_sdk.ApplicationProcessedTips") - proto.RegisterType((*FriendInfo)(nil), "open_im_sdk.FriendInfo") proto.RegisterType((*FriendApplication)(nil), "open_im_sdk.FriendApplication") proto.RegisterType((*FromToUserID)(nil), "open_im_sdk.FromToUserID") proto.RegisterType((*FriendApplicationAddedTips)(nil), "open_im_sdk.FriendApplicationAddedTips") @@ -2178,115 +2538,128 @@ func init() { proto.RegisterType((*SelfInfoUpdatedTips)(nil), "open_im_sdk.SelfInfoUpdatedTips") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_1ed69884ac12b8b9) } - -var fileDescriptor_ws_1ed69884ac12b8b9 = []byte{ - // 1703 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x4f, 0x6f, 0x23, 0x4b, - 0x11, 0xd7, 0xf8, 0x5f, 0xec, 0x72, 0x36, 0xce, 0xce, 0xfe, 0x79, 0xc3, 0xf2, 0xb4, 0x32, 0x23, - 0x84, 0x2c, 0x04, 0x79, 0x22, 0x2b, 0xa4, 0xc7, 0xa2, 0x07, 0x38, 0x71, 0x92, 0x97, 0x65, 0xbd, - 0x0e, 0xe3, 0x2c, 0x1c, 0x38, 0x44, 0x13, 0x4f, 0xdb, 0x19, 0x79, 0xa6, 0xc7, 0xe9, 0x1e, 0x67, - 0x37, 0x17, 0xbe, 0x05, 0xe2, 0x80, 0x90, 0xb8, 0x21, 0x24, 0x0e, 0x88, 0x03, 0x1f, 0x81, 0x4f, - 0xc2, 0x09, 0x89, 0x13, 0x47, 0x38, 0xa0, 0xaa, 0xee, 0x19, 0xf7, 0xd8, 0x79, 0xd9, 0x24, 0xbb, - 0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c, 0x37, 0xdb, 0x78, 0x32, 0xd9, 0xfd, 0x35, 0x3c, 0x59, 0x21, 0xde, 0x0d, 0x02, - 0xdd, 0x21, 0x5f, 0x14, 0x3d, 0xe9, 0xec, 0x17, 0xff, 0x23, 0x62, 0x2a, 0x78, 0x05, 0x75, 0xf7, - 0x04, 0x9e, 0xae, 0x18, 0x2f, 0xb6, 0xe0, 0x7b, 0x3a, 0xf8, 0x83, 0x05, 0x2d, 0xed, 0x21, 0xe7, - 0xfc, 0x19, 0xd4, 0x14, 0xa4, 0x8d, 0x7d, 0xb2, 0x64, 0x2c, 0xeb, 0x2b, 0x4f, 0xab, 0xad, 0x8e, - 0xa2, 0xd2, 0x15, 0xa3, 0xc8, 0x7e, 0xb6, 0x34, 0x21, 0xae, 0xbd, 0x99, 0xd9, 0x70, 0xf0, 0xb2, - 0xb6, 0xe8, 0xb1, 0x88, 0xa5, 0x1f, 0x26, 0xe6, 0x01, 0x6c, 0xec, 0x44, 0xfe, 0x68, 0xfa, 0xc1, - 0xaa, 0xf4, 0x0b, 0xd8, 0x24, 0x83, 0x1f, 0x90, 0xe3, 0x2f, 0xe1, 0xd1, 0x22, 0xd1, 0xe6, 0xdc, - 0x7e, 0x4f, 0xbb, 0xdf, 0x87, 0x07, 0x43, 0x16, 0x8d, 0xd1, 0xea, 0xeb, 0x59, 0x90, 0x3f, 0x7c, - 0x5f, 0xb1, 0xea, 0x9f, 0xd6, 0xe8, 0x3f, 0xd1, 0xcf, 0xfe, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x45, - 0x62, 0x8c, 0xef, 0x9c, 0x16, 0x00, 0x00, +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_a1fbf2797043d7f3) } + +var fileDescriptor_ws_a1fbf2797043d7f3 = []byte{ + // 1916 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x59, 0x4f, 0x8f, 0x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, 0x9f, 0x2d, 0x6c, 0xb7, 0x37, + 0x96, 0x79, 0xb1, 0xd3, 0xfc, 0xa2, 0x2c, 0x8e, 0x59, 0xcc, 0xb2, 0xf7, 0xe3, 0x73, 0x1f, 0x76, + 0xe8, 0x75, 0xee, 0xbd, 0x65, 0xe9, 0x67, 0xb0, 0x4b, 0x0a, 0xdf, 0xa3, 0x8d, 0x3f, 0x87, 0x9b, + 0x55, 0xa0, 0xf5, 0x26, 0xf8, 0x8e, 0x7a, 0xbf, 0x07, 0xd7, 0x07, 0x2c, 0x1e, 0xa1, 0xd6, 0xa7, + 0xb3, 0xb0, 0x3c, 0x45, 0x5e, 0xf3, 0x70, 0xf8, 0xbc, 0x41, 0x7f, 0x4e, 0x7d, 0xf6, 0xbf, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x1c, 0xbd, 0xfd, 0xa5, 0xaf, 0x1a, 0x00, 0x00, } diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index 7ef3d4d22..1921ef694 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -2,6 +2,102 @@ syntax = "proto3"; package open_im_sdk;//The package name to which the proto file belongs //option go_package = "./sdk_ws;open_im_sdk";//The generated go pb file is in the current directory, and the package name is open_im_sdk +////////////////////////////////base/////////////////////////////// + + +message GroupInfo{ + string GroupID = 1; + string GroupName = 2; + string Notification = 3; + string Introduction = 4; + string FaceUrl = 5; + string OwnerUserID = 6; + int64 CreateTime = 7; + uint32 MemberCount = 8; + string Ex = 9; + int32 Status = 10; + string CreatorUserID = 11; + int32 GroupType = 12; +} + +message GroupMemberFullInfo { + string GroupID = 1 ; + string UserID = 2 ; + int32 roleLevel = 3; + int64 JoinTime = 4; + string NickName = 5; + string FaceUrl = 6; + string FriendRemark = 7; + int32 AppMangerLevel = 8; //if >0 + int32 JoinSource = 9; + string OperatorUserID = 10; + string Ex = 11; +} + +message PublicUserInfo{ + string UserID = 1; + string Nickname = 2; + string FaceUrl = 3; + int32 Gender = 4; + int32 AppMangerLevel = 5; //if >0 +} + +message UserInfo{ + string UserID = 1; + string Nickname = 2; + string FaceUrl = 3; + int32 Gender = 4; + string PhoneNumber = 5; + string Birth = 6; + string Email = 7; + string Ex = 8; +} + +message FriendInfo{ + string OwnerUserID = 1; + string Remark = 2; + int64 CreateTime = 3; + UserInfo FriendUser = 4; + int32 AddSource = 5; + string OperatorUserID = 6; + string Ex = 7; +} + +message BlackInfo{ + string OwnerUserID = 1; + int64 CreateTime = 2; + PublicUserInfo BlackUserInfo = 4; + int32 AddSource = 5; + string OperatorUserID = 6; + string Ex = 7; +} + +message GroupRequest{ + string UserID = 1; + string GroupID = 2; + string HandleResult = 3; + string ReqMsg = 4; + string HandleMsg = 5; + int64 ReqTime = 6; + string HandleUserID = 7; + int64 HandleTime = 8; + string Ex = 9; +} + +message FriendRequest{ + string FromUserID = 1; + string ToUserID = 2; + int32 HandleResult = 3; + string ReqMsg = 4; + int64 CreateTime = 5; + string HandlerUserID = 6; + string HandleMsg = 7; + int64 HandleTime = 8; + string Ex = 9; +} + +///////////////////////////////////base end///////////////////////////////////// + message PullMessageBySeqListResp { int32 errCode = 1; @@ -14,7 +110,7 @@ message PullMessageBySeqListResp { message PullMessageBySeqListReq{ string userID = 1; string operationID = 2; - repeated int64 seqList =3; + repeated int64 seqList = 3; } message PullMessageReq { string userID = 1; @@ -80,76 +176,38 @@ message MsgData { string sendID = 1; string recvID = 2; string groupID = 3; - string clientMsgID =4; - string serverMsgID =5; - int32 senderPlatformID =6; - string senderNickName =7; - string senderFaceURL =8; + string clientMsgID = 4; + string serverMsgID = 5; + int32 senderPlatformID = 6; + string senderNickname = 7; + string senderFaceURL = 8; int32 sessionType = 9; int32 msgFrom = 10; int32 contentType = 11; - bytes content =12; + bytes content = 12; repeated string forceList = 13; - int64 seq =14; + int64 seq = 14; int64 sendTime = 15; int64 createTime = 16; - map Options= 17; - OfflinePushInfo offlinePushInfo =18; + map Options = 17; + OfflinePushInfo offlinePushInfo = 18; } message OfflinePushInfo{ - string Title = 1; - string Desc = 2; - string Ext = 3; - string iOSPushSound = 4; - bool iOSBadgeCount = 5; + string Title = 1; + string Desc = 2; + string Ex = 3; + string iOSPushSound = 4; + bool iOSBadgeCount = 5; } -//public -message GroupInfo{ - string GroupID = 1; - string GroupName = 2; - string Notification = 3; - string Introduction = 4; - string FaceUrl = 5; - PublicUserInfo Owner = 6; - uint64 CreateTime = 7; - uint32 MemberCount = 8; - string Ext = 9; -} -//private, Group members have permission to view -message GroupMemberFullInfo { - string GroupID = 1 ; - string UserID = 2 ; - int32 AdministratorLevel = 3; - uint64 JoinTime = 4; - string NickName = 5; - string FaceUrl = 6; - string FriendRemark = 7; - int32 AppMangerLevel = 8; // >0 -} -//private, Friends have permission to view -message UserInfo{ - string UserID = 1; - string Nickname = 2; - string FaceUrl = 3; - int32 Gender = 4; - string Mobile = 5; - string Birth = 6; - string Email = 7; - string Ext = 8; -} -//No permissions required -message PublicUserInfo{ - string UserID = 1; - string Nickname = 2; - string FaceUrl = 3; - int32 Gender = 4; -} + + + message TipsComm{ bytes Detail = 1; @@ -161,35 +219,35 @@ message TipsComm{ message MemberEnterTips{ GroupInfo Group = 1; GroupMemberFullInfo EntrantUser = 2; - uint64 OperationTime = 3; + int64 OperationTime = 3; } //Actively leave the group message MemberLeaveTips{ GroupInfo Group = 1; GroupMemberFullInfo LeaverUser = 2; - uint64 OperationTime = 3; + int64 OperationTime = 3; } message MemberInvitedTips{ GroupInfo Group = 1; GroupMemberFullInfo OpUser = 2; repeated GroupMemberFullInfo InvitedUserList = 3; - uint64 OperationTime = 4; + int64 OperationTime = 4; } message MemberKickedTips{ GroupInfo Group = 1; GroupMemberFullInfo OpUser = 2; repeated GroupMemberFullInfo KickedUserList = 3; - uint64 OperationTime = 4; + int64 OperationTime = 4; } message MemberInfoChangedTips{ int32 ChangeType = 1; ///bitwise operators 0001:member info changed; 0010:mute ; GroupMemberFullInfo OpUser = 2; //who do this GroupMemberFullInfo FinalInfo = 3; // - uint64 MuteTime = 4; + int64 MuteTime = 4; GroupInfo Group = 5; } @@ -197,7 +255,7 @@ message GroupCreatedTips{ GroupInfo Group = 1; GroupMemberFullInfo Creator = 2; repeated GroupMemberFullInfo MemberList = 3; - uint64 OperationTime = 4; + int64 OperationTime = 4; } message GroupInfoChangedTips{ @@ -208,27 +266,27 @@ message GroupInfoChangedTips{ message JoinGroupApplicationTips{ GroupInfo Group = 1; - PublicUserInfo Applicant = 2; - string Reason = 3; + PublicUserInfo Applicant = 2; + string Reason = 3; } message ApplicationProcessedTips{ GroupInfo Group = 1; GroupMemberFullInfo OpUser = 2; int32 Result = 3; - string Reason = 4; + string Reason = 4; } //////////////////////friend///////////////////// -message FriendInfo{ - UserInfo OwnerUser = 1; - string Remark = 2; - uint64 CreateTime = 3; - UserInfo FriendUser = 4; -} +//message FriendInfo{ +// UserInfo OwnerUser = 1; +// string Remark = 2; +// uint64 CreateTime = 3; +// UserInfo FriendUser = 4; +//} message FriendApplication{ - uint64 AddTime = 1; + int64 AddTime = 1; string AddSource = 2; string AddWording = 3; } @@ -240,7 +298,7 @@ message FromToUserID{ //FromUserID apply to add ToUserID message FriendApplicationAddedTips{ - FromToUserID FromToUserID = 1; + FromToUserID FromToUserID = 1; } //FromUserID accept or reject ToUserID @@ -251,7 +309,7 @@ message FriendApplicationProcessedTips{ // FromUserID Added a friend ToUserID message FriendAddedTips{ FriendInfo Friend = 1; - uint64 OperationTime = 2; + int64 OperationTime = 2; PublicUserInfo OpUser = 3; //who do this } @@ -261,11 +319,7 @@ message FriendDeletedTips{ FromToUserID FromToUserID = 1; } -//message BlackInfo{ -// PublicUserInfo OwnerUser = 1; -// uint64 CreateTime = 3; -// PublicUserInfo BlackUser = 4; -//} + message BlackAddedTips{ FromToUserID FromToUserID = 1;