From fabc7ed524a43f4397fa0dbce7cffcb4ac86b394 Mon Sep 17 00:00:00 2001 From: skiffer-git <72860476+skiffer-git@users.noreply.github.com> Date: Wed, 26 May 2021 19:37:19 +0800 Subject: [PATCH 1/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 46d4ba396..658a8cd32 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Open-IM-Server is open source instant messaging Server.Backend in Go. ![avatar](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/Open-IM.png) -[![LICENSE](https://img.shields.io/github/license/pingcap/tidb.svg)](https://github.com/OpenIMSDK/open-im-server/master/LICENSE) +[![LICENSE](https://img.shields.io/github/license/pingcap/tidb.svg)](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/LICENSE) [![Language](https://img.shields.io/badge/Language-Go-blue.svg)](https://golang.org/) ## Open-IM-Server: Open source Instant Messaging Server From 62d5714093eaf2d55a28becb1b011dac118bfb08 Mon Sep 17 00:00:00 2001 From: away <1819625428@qq.com> Date: Wed, 26 May 2021 19:37:45 +0800 Subject: [PATCH 2/9] friend rpc service initial commit --- src/rpc/friend/Makefile | 27 +++++ src/rpc/friend/friend/add_blacklist.go | 28 +++++ src/rpc/friend/friend/add_friend.go | 47 ++++++++ src/rpc/friend/friend/add_friend_response.go | 58 +++++++++ src/rpc/friend/friend/delete_friend.go | 27 +++++ src/rpc/friend/friend/get_blacklist.go | 55 +++++++++ .../friend/friend/get_friend_apply_list.go | 58 +++++++++ src/rpc/friend/friend/get_friend_list.go | 59 ++++++++++ src/rpc/friend/friend/is_in_blacklist.go | 22 ++++ src/rpc/friend/friend/remove_blacklist.go | 27 +++++ src/rpc/friend/friend/search_friend.go | 111 ++++++++++++++++++ src/rpc/friend/friend/set_friend_comment.go | 27 +++++ src/rpc/friend/open_im_friend.go | 14 +++ 13 files changed, 560 insertions(+) create mode 100644 src/rpc/friend/Makefile create mode 100644 src/rpc/friend/friend/add_blacklist.go create mode 100644 src/rpc/friend/friend/add_friend.go create mode 100644 src/rpc/friend/friend/add_friend_response.go create mode 100644 src/rpc/friend/friend/delete_friend.go create mode 100644 src/rpc/friend/friend/get_blacklist.go create mode 100644 src/rpc/friend/friend/get_friend_apply_list.go create mode 100644 src/rpc/friend/friend/get_friend_list.go create mode 100644 src/rpc/friend/friend/is_in_blacklist.go create mode 100644 src/rpc/friend/friend/remove_blacklist.go create mode 100644 src/rpc/friend/friend/search_friend.go create mode 100644 src/rpc/friend/friend/set_friend_comment.go create mode 100644 src/rpc/friend/open_im_friend.go diff --git a/src/rpc/friend/Makefile b/src/rpc/friend/Makefile new file mode 100644 index 000000000..c1291dc82 --- /dev/null +++ b/src/rpc/friend/Makefile @@ -0,0 +1,27 @@ +.PHONY: all build run gotool install clean help + +BINARY_NAME=open_im_friend +BIN_DIR=../../../bin/ +LAN_FILE=.go +GO_FILE:=${BINARY_NAME}${LAN_FILE} + +all: gotool build + +build: + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ${BINARY_NAME} ${GO_FILE} + +run: + @go run ./ + +gotool: + go fmt ./ + go vet ./ + +install: + make build + mv ${BINARY_NAME} ${BIN_DIR} + +clean: + @if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi + + diff --git a/src/rpc/friend/friend/add_blacklist.go b/src/rpc/friend/friend/add_blacklist.go new file mode 100644 index 000000000..42daf67a8 --- /dev/null +++ b/src/rpc/friend/friend/add_blacklist.go @@ -0,0 +1,28 @@ +package friend + +import ( + "Open_IM/src/common/config" + "Open_IM/src/common/db/mysql_model/im_mysql_model" + "Open_IM/src/common/log" + pbFriend "Open_IM/src/proto/friend" + "Open_IM/src/utils" + "context" +) + +func (s *friendServer) AddBlacklist(ctx context.Context, req *pbFriend.AddBlacklistReq) (*pbFriend.CommonResp, error) { + log.Info(req.Token, req.OperationID, "rpc add blacklist is server,args=%s", req.String()) + //Parse token, to find current user information + claims, err := utils.ParseToken(req.Token) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) + return &pbFriend.CommonResp{ErrorCode: config.ErrParseToken.ErrCode, ErrorMsg: config.ErrParseToken.ErrMsg}, nil + } else { + err := im_mysql_model.InsertInToUserBlackList(claims.UID, req.Uid) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s,Failed to add blacklist", err.Error()) + return &pbFriend.CommonResp{ErrorCode: config.ErrMysql.ErrCode, ErrorMsg: config.ErrMysql.ErrMsg}, nil + } + } + log.Info(req.Token, req.OperationID, "rpc add blacklist success return,uid=%s", req.Uid) + return &pbFriend.CommonResp{}, nil +} diff --git a/src/rpc/friend/friend/add_friend.go b/src/rpc/friend/friend/add_friend.go new file mode 100644 index 000000000..28deae6ed --- /dev/null +++ b/src/rpc/friend/friend/add_friend.go @@ -0,0 +1,47 @@ +package friend + +import ( + "Open_IM/src/common/config" + "Open_IM/src/common/constant" + "Open_IM/src/common/db/mysql_model/im_mysql_model" + "Open_IM/src/common/log" + pbChat "Open_IM/src/proto/chat" + pbFriend "Open_IM/src/proto/friend" + "Open_IM/src/push/logic" + "Open_IM/src/utils" + "context" + "fmt" +) + +func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq) (*pbFriend.CommonResp, error) { + log.Info(req.Token, req.OperationID, "rpc add friend is server,userid=%s", req.Uid) + //Parse token, to find current user information + claims, err := utils.ParseToken(req.Token) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) + return &pbFriend.CommonResp{ErrorCode: config.ErrParseToken.ErrCode, ErrorMsg: config.ErrParseToken.ErrMsg}, nil + } + //Establish a relationship in the friend request table + err = im_mysql_model.InsertIntoFriendReq(claims.UID, req.Uid, constant.NotFriendFlag, req.ReqMessage) + if err != nil { + log.Error(req.Token, req.OperationID, fmt.Sprintf("err=%s,create friend request ship failed", err.Error())) + return &pbFriend.CommonResp{ErrorCode: config.ErrAddFriend.ErrCode, ErrorMsg: config.ErrAddFriend.ErrMsg}, nil + } + log.Info(req.Token, req.OperationID, "rpc add friend is success return,uid=%s", req.Uid) + //Push message when add friend successfully + senderInfo, errSend := im_mysql_model.FindUserByUID(claims.UID) + receiverInfo, errReceive := im_mysql_model.FindUserByUID(req.Uid) + if errSend == nil && errReceive == nil { + logic.SendMsgByWS(&pbChat.WSToMsgSvrChatMsg{ + SendID: senderInfo.UID, + RecvID: receiverInfo.UID, + Content: senderInfo.Name + " asked to add you as a friend", + SendTime: utils.GetCurrentTimestampBySecond(), + MsgFrom: constant.SysMsgType, + ContentType: constant.AddFriendTip, + SessionType: constant.SingleChatType, + OperationID: req.OperationID, + }) + } + return &pbFriend.CommonResp{}, nil +} diff --git a/src/rpc/friend/friend/add_friend_response.go b/src/rpc/friend/friend/add_friend_response.go new file mode 100644 index 000000000..31963e0b4 --- /dev/null +++ b/src/rpc/friend/friend/add_friend_response.go @@ -0,0 +1,58 @@ +package friend + +import ( + "Open_IM/src/common/config" + "Open_IM/src/common/constant" + "Open_IM/src/common/db/mysql_model/im_mysql_model" + "Open_IM/src/common/log" + pbChat "Open_IM/src/proto/chat" + pbFriend "Open_IM/src/proto/friend" + "Open_IM/src/push/logic" + "Open_IM/src/utils" + "context" +) + +func (s *friendServer) AddedFriend(ctx context.Context, req *pbFriend.AddedFriendReq) (*pbFriend.CommonResp, error) { + log.Info(req.Token, req.OperationID, "rpc add friend response is server,args=%s", req.String()) + //Parse token, to find current user information + claims, err := utils.ParseToken(req.Token) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) + return &pbFriend.CommonResp{ErrorCode: config.ErrParseToken.ErrCode, ErrorMsg: config.ErrParseToken.ErrMsg}, nil + } + err = im_mysql_model.UpdateFriendRelationshipToFriendReq(req.Uid, claims.UID, req.Flag) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s,update friend request table failed", err.Error()) + return &pbFriend.CommonResp{ErrorCode: config.ErrMysql.ErrCode, ErrorMsg: config.ErrMysql.ErrMsg}, nil + } + log.Info(req.Token, req.OperationID, "rpc add friend response success return,userid=%s,flag=%d", req.Uid, req.Flag) + //Change the status of the friend request form + if req.Flag == 1 { + //Establish two single friendship + err = im_mysql_model.InsertToFriend(claims.UID, req.Uid, req.Flag) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s,create friendship failed", err.Error()) + return &pbFriend.CommonResp{ErrorCode: config.ErrAddFriend.ErrCode, ErrorMsg: config.ErrAddFriend.ErrMsg}, nil + } + err = im_mysql_model.InsertToFriend(req.Uid, claims.UID, req.Flag) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s,create friendship failed", err.Error()) + return &pbFriend.CommonResp{ErrorCode: config.ErrAddFriend.ErrCode, ErrorMsg: config.ErrAddFriend.ErrMsg}, nil + } + //Push message when establish friends successfully + senderInfo, errSend := im_mysql_model.FindUserByUID(claims.UID) + if errSend == nil { + logic.SendMsgByWS(&pbChat.WSToMsgSvrChatMsg{ + SendID: claims.UID, + RecvID: req.Uid, + Content: senderInfo.Name + " agreed to add you as a friend.", + SendTime: utils.GetCurrentTimestampBySecond(), + MsgFrom: constant.SysMsgType, //Notification message identification + ContentType: constant.AgreeAddFriendTip, //Add friend flag + SessionType: constant.SingleChatType, + OperationID: req.OperationID, + }) + } + } + return &pbFriend.CommonResp{}, nil +} diff --git a/src/rpc/friend/friend/delete_friend.go b/src/rpc/friend/friend/delete_friend.go new file mode 100644 index 000000000..fba59d212 --- /dev/null +++ b/src/rpc/friend/friend/delete_friend.go @@ -0,0 +1,27 @@ +package friend + +import ( + "Open_IM/src/common/config" + "Open_IM/src/common/db/mysql_model/im_mysql_model" + "Open_IM/src/common/log" + pbFriend "Open_IM/src/proto/friend" + "Open_IM/src/utils" + "context" +) + +func (s *friendServer) DeleteFriend(ctx context.Context, req *pbFriend.DeleteFriendReq) (*pbFriend.CommonResp, error) { + log.Info(req.Token, req.OperationID, "rpc delete friend is server,args=%s", req.String()) + //Parse token, to find current user information + claims, err := utils.ParseToken(req.Token) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) + return &pbFriend.CommonResp{ErrorCode: config.ErrParseToken.ErrCode, ErrorMsg: config.ErrParseToken.ErrMsg}, nil + } + err = im_mysql_model.DeleteSingleFriendInfo(claims.UID, req.Uid) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s,delete friend failed", err.Error()) + return &pbFriend.CommonResp{ErrorCode: config.ErrMysql.ErrCode, ErrorMsg: config.ErrMysql.ErrMsg}, nil + } + log.Info(req.Token, req.OperationID, "rpc delete friend success return") + return &pbFriend.CommonResp{}, nil +} diff --git a/src/rpc/friend/friend/get_blacklist.go b/src/rpc/friend/friend/get_blacklist.go new file mode 100644 index 000000000..421081b1a --- /dev/null +++ b/src/rpc/friend/friend/get_blacklist.go @@ -0,0 +1,55 @@ +package friend + +import ( + "Open_IM/src/common/config" + "Open_IM/src/common/db/mysql_model/im_mysql_model" + "Open_IM/src/common/log" + pbFriend "Open_IM/src/proto/friend" + "Open_IM/src/utils" + "context" +) + +func (s *friendServer) GetBlacklist(ctx context.Context, req *pbFriend.GetBlacklistReq) (*pbFriend.GetBlacklistResp, error) { + log.Info(req.Token, req.OperationID, "rpc get blacklist is server,args=%s", req.String()) + var ( + userInfoList []*pbFriend.UserInfo + comment string + ) + //Parse token, to find current user information + claims, err := utils.ParseToken(req.Token) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) + return &pbFriend.GetBlacklistResp{ErrorCode: config.ErrParseToken.ErrCode, ErrorMsg: config.ErrParseToken.ErrMsg}, nil + } + blackListInfo, err := im_mysql_model.GetBlackListByUID(claims.UID) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s get blacklist failed", err.Error()) + return &pbFriend.GetBlacklistResp{ErrorCode: config.ErrGetBlackList.ErrCode, ErrorMsg: config.ErrGetBlackList.ErrMsg}, nil + } + for _, blackUser := range blackListInfo { + var blackUserInfo pbFriend.UserInfo + //Find black user information + us, err := im_mysql_model.FindUserByUID(blackUser.BlockId) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s search black list userInfo failed", err.Error()) + continue + } + friendShip, err := im_mysql_model.FindFriendRelationshipFromFriend(claims.UID, blackUser.BlockId) + if err == nil { + comment = friendShip.Comment + } + blackUserInfo.Uid = us.UID + blackUserInfo.Icon = us.Icon + blackUserInfo.Name = us.Name + blackUserInfo.Gender = us.Gender + blackUserInfo.Mobile = us.Mobile + blackUserInfo.Birth = us.Birth + blackUserInfo.Email = us.Email + blackUserInfo.Ex = us.Ex + blackUserInfo.Comment = comment + + userInfoList = append(userInfoList, &blackUserInfo) + } + log.Info(req.Token, req.OperationID, "rpc get blacklist success return") + return &pbFriend.GetBlacklistResp{Data: userInfoList}, nil +} diff --git a/src/rpc/friend/friend/get_friend_apply_list.go b/src/rpc/friend/friend/get_friend_apply_list.go new file mode 100644 index 000000000..40a0bd4b4 --- /dev/null +++ b/src/rpc/friend/friend/get_friend_apply_list.go @@ -0,0 +1,58 @@ +package friend + +import ( + "Open_IM/src/common/config" + "Open_IM/src/common/db/mysql_model/im_mysql_model" + "Open_IM/src/common/log" + pbFriend "Open_IM/src/proto/friend" + "Open_IM/src/utils" + "context" + "fmt" + "strconv" +) + +func (s *friendServer) GetFriendApplyList(ctx context.Context, req *pbFriend.GetFriendApplyReq) (*pbFriend.GetFriendApplyResp, error) { + log.Info(req.Token, req.OperationID, "rpc get friend apply list is server,args=%s", req.String()) + var appleUserList []*pbFriend.ApplyUserInfo + //Parse token, to find current user information + claims, err := utils.ParseToken(req.Token) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) + return &pbFriend.GetFriendApplyResp{ErrorCode: config.ErrParseToken.ErrCode, ErrorMsg: config.ErrParseToken.ErrMsg}, nil + } + // Find the current user friend applications received + ApplyUsersInfo, err := im_mysql_model.FindFriendsApplyFromFriendReq(claims.UID) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s,search applyInfo failed", err.Error()) + return &pbFriend.GetFriendApplyResp{ErrorCode: config.ErrMysql.ErrCode, ErrorMsg: config.ErrMysql.ErrMsg}, nil + } + for _, applyUserInfo := range ApplyUsersInfo { + var userInfo pbFriend.ApplyUserInfo + //Find friend application status + friendReqStatus, err := im_mysql_model.FindFriendRelationshipFromFriendReq(applyUserInfo.ReqId, applyUserInfo.UserId) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s,search friendRelationshipStatus failed", err.Error()) + } else { + userInfo.Flag = friendReqStatus.Flag + userInfo.ReqMessage = friendReqStatus.ReqMessage + userInfo.ApplyTime = strconv.FormatInt(friendReqStatus.CreateTime.Unix(), 10) + } + //Find user information + us, err := im_mysql_model.FindUserByUID(applyUserInfo.ReqId) + if err != nil { + log.Error(req.Token, req.OperationID, fmt.Sprintf("err=%s,search userInfo failed", err.Error())) + } else { + userInfo.Uid = us.UID + userInfo.Icon = us.Icon + userInfo.Name = us.Name + userInfo.Gender = us.Gender + userInfo.Mobile = us.Mobile + userInfo.Birth = us.Birth + userInfo.Email = us.Email + userInfo.Ex = us.Ex + appleUserList = append(appleUserList, &userInfo) + } + } + log.Info(req.Token, req.OperationID, fmt.Sprintf("rpc get friendapplylist success return")) + return &pbFriend.GetFriendApplyResp{Data: appleUserList}, nil +} diff --git a/src/rpc/friend/friend/get_friend_list.go b/src/rpc/friend/friend/get_friend_list.go new file mode 100644 index 000000000..c60a93ad8 --- /dev/null +++ b/src/rpc/friend/friend/get_friend_list.go @@ -0,0 +1,59 @@ +package friend + +import ( + "Open_IM/src/common/config" + "Open_IM/src/common/constant" + "Open_IM/src/common/db/mysql_model/im_mysql_model" + "Open_IM/src/common/log" + pbFriend "Open_IM/src/proto/friend" + "Open_IM/src/utils" + "context" + "fmt" +) + +func (s *friendServer) GetFriendList(ctx context.Context, req *pbFriend.GetFriendListReq) (*pbFriend.GetFriendListResp, error) { + log.Info(req.Token, req.OperationID, "rpc get friend list is server,args=%s", req.String()) + var userInfoList []*pbFriend.UserInfo + //Parse token, to find current user information + claims, err := utils.ParseToken(req.Token) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) + return &pbFriend.GetFriendListResp{ErrorCode: config.ErrParseToken.ErrCode, ErrorMsg: config.ErrParseToken.ErrMsg}, nil + } + friends, err := im_mysql_model.FindUserInfoFromFriend(claims.UID) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s search friendInfo failed", err.Error()) + return &pbFriend.GetFriendListResp{ErrorCode: config.ErrSearchUserInfo.ErrCode, ErrorMsg: config.ErrSearchUserInfo.ErrMsg}, nil + } + for _, friendUser := range friends { + var friendUserInfo pbFriend.UserInfo + + //find user is in blackList + err = im_mysql_model.FindRelationshipFromBlackList(claims.UID, friendUser.FriendId) + if err == nil { + friendUserInfo.IsInBlackList = constant.BlackListFlag + } else { + friendUserInfo.IsInBlackList = 0 + } + //Find user information + us, err := im_mysql_model.FindUserByUID(friendUser.FriendId) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s search userInfo failed", err.Error()) + } else { + friendUserInfo.Uid = friendUser.FriendId + friendUserInfo.Comment = friendUser.Comment + friendUserInfo.Icon = us.Icon + friendUserInfo.Name = us.Name + friendUserInfo.Gender = us.Gender + friendUserInfo.Mobile = us.Mobile + friendUserInfo.Birth = us.Birth + friendUserInfo.Email = us.Email + friendUserInfo.Ex = us.Ex + + userInfoList = append(userInfoList, &friendUserInfo) + } + + } + log.Info(req.Token, req.OperationID, fmt.Sprintf("rpc get friend list success return")) + return &pbFriend.GetFriendListResp{Data: userInfoList}, nil +} diff --git a/src/rpc/friend/friend/is_in_blacklist.go b/src/rpc/friend/friend/is_in_blacklist.go new file mode 100644 index 000000000..fc2fe59da --- /dev/null +++ b/src/rpc/friend/friend/is_in_blacklist.go @@ -0,0 +1,22 @@ +package friend + +import ( + "Open_IM/src/common/db/mysql_model/im_mysql_model" + "Open_IM/src/common/log" + pbFriend "Open_IM/src/proto/friend" + "context" + "fmt" +) + +func (s *friendServer) IsInBlackList(ctx context.Context, req *pbFriend.IsInBlackListReq) (*pbFriend.IsInBlackListResp, error) { + log.InfoByArgs("rpc is in blacklist is server,args=%s", req.String()) + var isInBlacklist = false + err := im_mysql_model.FindRelationshipFromBlackList(req.ReceiveUid, req.SendUid) + if err != nil { + log.Error("", req.OperationID, "err=%s,", err.Error()) + } else { + isInBlacklist = true + } + log.InfoByArgs(fmt.Sprintf("rpc is in blackList success return")) + return &pbFriend.IsInBlackListResp{Response: isInBlacklist}, nil +} diff --git a/src/rpc/friend/friend/remove_blacklist.go b/src/rpc/friend/friend/remove_blacklist.go new file mode 100644 index 000000000..7d13d8a2f --- /dev/null +++ b/src/rpc/friend/friend/remove_blacklist.go @@ -0,0 +1,27 @@ +package friend + +import ( + "Open_IM/src/common/config" + "Open_IM/src/common/db/mysql_model/im_mysql_model" + "Open_IM/src/common/log" + pbFriend "Open_IM/src/proto/friend" + "Open_IM/src/utils" + "context" +) + +func (s *friendServer) RemoveBlacklist(ctx context.Context, req *pbFriend.RemoveBlacklistReq) (*pbFriend.CommonResp, error) { + log.Info(req.Token, req.OperationID, "rpc remove blacklist is server,userid=%s", req.Uid) + //Parse token, to find current user information + claims, err := utils.ParseToken(req.Token) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) + return &pbFriend.CommonResp{ErrorCode: config.ErrParseToken.ErrCode, ErrorMsg: config.ErrParseToken.ErrMsg}, nil + } + err = im_mysql_model.RemoveBlackList(claims.UID, req.Uid) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s,remove blacklist failed", err.Error()) + return &pbFriend.CommonResp{ErrorCode: config.ErrMysql.ErrCode, ErrorMsg: config.ErrMysql.ErrMsg}, nil + } + log.Info(req.Token, req.OperationID, "rpc remove blacklist success return,userid=%s", req.Uid) + return &pbFriend.CommonResp{}, nil +} diff --git a/src/rpc/friend/friend/search_friend.go b/src/rpc/friend/friend/search_friend.go new file mode 100644 index 000000000..c6b6ce6ed --- /dev/null +++ b/src/rpc/friend/friend/search_friend.go @@ -0,0 +1,111 @@ +package friend + +import ( + "Open_IM/src/common/config" + "Open_IM/src/common/constant" + "Open_IM/src/common/db/mysql_model/im_mysql_model" + "Open_IM/src/common/log" + pbFriend "Open_IM/src/proto/friend" + "Open_IM/src/utils" + "context" + "fmt" + "github.com/skiffer-git/grpc-etcdv3/getcdv3" + "google.golang.org/grpc" + "net" + "strconv" + "strings" +) + +type friendServer struct { + rpcPort int + rpcRegisterName string + etcdSchema string + etcdAddr []string +} + +func NewFriendServer(port int) *friendServer { + return &friendServer{ + rpcPort: port, + rpcRegisterName: config.Config.RpcRegisterName.OpenImFriendName, + etcdSchema: config.Config.Etcd.EtcdSchema, + etcdAddr: config.Config.Etcd.EtcdAddr, + } +} + +func (s *friendServer) Run() { + log.Info("", "", fmt.Sprintf("rpc friend init....")) + + 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())) + return + } + log.Info("", "", "listen network success, address = %s", registerAddress) + defer listener.Close() + //grpc server + srv := grpc.NewServer() + defer srv.GracefulStop() + //User friend related services register to etcd + 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()) + return + } + err = srv.Serve(listener) + if err != nil { + log.ErrorByArgs("listen rpc friend error,err=%s", err.Error()) + return + } +} + +func (s *friendServer) SearchFriend(ctx context.Context, req *pbFriend.SearchFriendReq) (*pbFriend.SearchFriendResp, error) { + log.Info(req.Token, req.OperationID, fmt.Sprintf("rpc search user is server,args=%s", req.String())) + var ( + isInBlackList int32 + isFriend int32 + comment string + ) + //Parse token, to find current user information + claims, err := utils.ParseToken(req.Token) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) + return &pbFriend.SearchFriendResp{ErrorCode: config.ErrParseToken.ErrCode, ErrorMsg: config.ErrParseToken.ErrMsg}, nil + } + friendShip, err := im_mysql_model.FindFriendRelationshipFromFriend(claims.UID, req.Uid) + if err == nil { + isFriend = constant.FriendFlag + comment = friendShip.Comment + } + friendUserInfo, err := im_mysql_model.FindUserByUID(req.Uid) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s,no this user", err.Error()) + return &pbFriend.SearchFriendResp{ErrorCode: config.ErrSearchUserInfo.ErrCode, ErrorMsg: config.ErrSearchUserInfo.ErrMsg}, nil + } + err = im_mysql_model.FindRelationshipFromBlackList(claims.UID, req.Uid) + if err == nil { + isInBlackList = constant.BlackListFlag + } + log.Info(req.Token, req.OperationID, "rpc search friend success return") + return &pbFriend.SearchFriendResp{ + ErrorCode: 0, + ErrorMsg: "", + Data: &pbFriend.SearchFriendData{ + Uid: friendUserInfo.UID, + Icon: friendUserInfo.Icon, + Name: friendUserInfo.Name, + Gender: friendUserInfo.Gender, + Mobile: friendUserInfo.Mobile, + Birth: friendUserInfo.Birth, + Email: friendUserInfo.Email, + Ex: friendUserInfo.Ex, + Comment: comment, + IsFriend: isFriend, + IsInBlackList: isInBlackList, + }, + }, nil + +} diff --git a/src/rpc/friend/friend/set_friend_comment.go b/src/rpc/friend/friend/set_friend_comment.go new file mode 100644 index 000000000..66c974f47 --- /dev/null +++ b/src/rpc/friend/friend/set_friend_comment.go @@ -0,0 +1,27 @@ +package friend + +import ( + "Open_IM/src/common/config" + "Open_IM/src/common/db/mysql_model/im_mysql_model" + "Open_IM/src/common/log" + pbFriend "Open_IM/src/proto/friend" + "Open_IM/src/utils" + "context" +) + +func (s *friendServer) SetFriendComment(ctx context.Context, req *pbFriend.SetFriendCommentReq) (*pbFriend.CommonResp, error) { + log.Info(req.Token, req.OperationID, "rpc set friend comment is server,params=%s", req.String()) + //Parse token, to find current user information + claims, err := utils.ParseToken(req.Token) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) + return &pbFriend.CommonResp{ErrorCode: config.ErrParseToken.ErrCode, ErrorMsg: config.ErrParseToken.ErrMsg}, nil + } + err = im_mysql_model.UpdateFriendComment(claims.UID, req.Uid, req.Comment) + if err != nil { + log.Error(req.Token, req.OperationID, "set friend comment failed,err=%s", err.Error()) + return &pbFriend.CommonResp{ErrorCode: config.ErrSetFriendComment.ErrCode, ErrorMsg: config.ErrSetFriendComment.ErrMsg}, nil + } + log.Info(req.Token, req.OperationID, "rpc set friend comment is success return") + return &pbFriend.CommonResp{}, nil +} diff --git a/src/rpc/friend/open_im_friend.go b/src/rpc/friend/open_im_friend.go new file mode 100644 index 000000000..088f5a7f4 --- /dev/null +++ b/src/rpc/friend/open_im_friend.go @@ -0,0 +1,14 @@ +package main + +import ( + "Open_IM/src/rpc/friend/friend" + "flag" +) + +func main() { + + rpcPort := flag.Int("port", 10200, "get RpcFriendPort from cmd,default 12000 as port") + flag.Parse() + rpcServer := friend.NewFriendServer(*rpcPort) + rpcServer.Run() +} From 2c3d0ae0e8a04b4950f8c4f637aa0565b77d135c Mon Sep 17 00:00:00 2001 From: away <1819625428@qq.com> Date: Wed, 26 May 2021 19:38:34 +0800 Subject: [PATCH 3/9] user rpc service initial commit --- src/rpc/user/Makefile | 27 ++++++++ src/rpc/user/open_im_user.go | 13 ++++ src/rpc/user/user/get_user_info.go | 96 +++++++++++++++++++++++++++ src/rpc/user/user/update_user_info.go | 25 +++++++ 4 files changed, 161 insertions(+) create mode 100644 src/rpc/user/Makefile create mode 100644 src/rpc/user/open_im_user.go create mode 100644 src/rpc/user/user/get_user_info.go create mode 100644 src/rpc/user/user/update_user_info.go diff --git a/src/rpc/user/Makefile b/src/rpc/user/Makefile new file mode 100644 index 000000000..d3f837791 --- /dev/null +++ b/src/rpc/user/Makefile @@ -0,0 +1,27 @@ +.PHONY: all build run gotool install clean help + +BINARY_NAME=open_im_user +BIN_DIR=../../../bin/ +LAN_FILE=.go +GO_FILE:=${BINARY_NAME}${LAN_FILE} + +all: gotool build + +build: + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ${BINARY_NAME} ${GO_FILE} + +run: + @go run ./ + +gotool: + go fmt ./ + go vet ./ + +install: + make build + mv ${BINARY_NAME} ${BIN_DIR} + +clean: + @if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi + + diff --git a/src/rpc/user/open_im_user.go b/src/rpc/user/open_im_user.go new file mode 100644 index 000000000..0625b11ee --- /dev/null +++ b/src/rpc/user/open_im_user.go @@ -0,0 +1,13 @@ +package main + +import ( + "Open_IM/src/rpc/user/user" + "flag" +) + +func main() { + rpcPort := flag.Int("port", 10100, "rpc listening port") + flag.Parse() + rpcServer := user.NewUserServer(*rpcPort) + rpcServer.Run() +} diff --git a/src/rpc/user/user/get_user_info.go b/src/rpc/user/user/get_user_info.go new file mode 100644 index 000000000..cc2ba0d6c --- /dev/null +++ b/src/rpc/user/user/get_user_info.go @@ -0,0 +1,96 @@ +package user + +import ( + "Open_IM/src/common/config" + "Open_IM/src/common/db/mysql_model/im_mysql_model" + "Open_IM/src/common/log" + pbUser "Open_IM/src/proto/user" + "Open_IM/src/utils" + "context" + "github.com/skiffer-git/grpc-etcdv3/getcdv3" + "google.golang.org/grpc" + "net" + "strconv" + "strings" +) + +type userServer struct { + rpcPort int + rpcRegisterName string + etcdSchema string + etcdAddr []string +} + +func NewUserServer(port int) *userServer { + return &userServer{ + rpcPort: port, + rpcRegisterName: config.Config.RpcRegisterName.OpenImUserName, + etcdSchema: config.Config.Etcd.EtcdSchema, + etcdAddr: config.Config.Etcd.EtcdAddr, + } +} + +func (s *userServer) Run() { + log.Info("", "", "rpc user init....") + + ip := utils.ServerIP + registerAddress := ip + ":" + strconv.Itoa(s.rpcPort) + //listener network + listener, err := net.Listen("tcp", registerAddress) + if err != nil { + log.InfoByArgs("listen network failed,err=%s", err.Error()) + return + } + log.Info("", "", "listen network success, address = %s", registerAddress) + defer listener.Close() + //grpc server + srv := grpc.NewServer() + defer srv.GracefulStop() + //Service registers with etcd + pbUser.RegisterUserServer(srv, s) + err = getcdv3.RegisterEtcd(s.etcdSchema, strings.Join(s.etcdAddr, ","), ip, s.rpcPort, s.rpcRegisterName, 10) + if err != nil { + log.ErrorByArgs("register rpc token to etcd failed,err=%s", err.Error()) + return + } + err = srv.Serve(listener) + if err != nil { + log.ErrorByArgs("listen token failed,err=%s", err.Error()) + return + } + log.Info("", "", "rpc token init success") +} + +func (s *userServer) GetUserInfo(ctx context.Context, req *pbUser.GetUserInfoReq) (*pbUser.GetUserInfoResp, error) { + log.InfoByKv("rpc get_user_info is server", req.OperationID) + + var userInfoList []*pbUser.UserInfo + //Obtain user information according to userID + if len(req.UserIDList) > 0 { + for _, userID := range req.UserIDList { + var userInfo pbUser.UserInfo + user, err := im_mysql_model.FindUserByUID(userID) + if err != nil { + log.ErrorByKv("search userinfo failed", req.OperationID, "userID", userID, "err=%s", err.Error()) + continue + } + userInfo.Uid = user.UID + userInfo.Icon = user.Icon + userInfo.Name = user.Name + userInfo.Gender = user.Gender + userInfo.Mobile = user.Mobile + userInfo.Birth = user.Birth + userInfo.Email = user.Email + userInfo.Ex = user.Ex + userInfoList = append(userInfoList, &userInfo) + } + } else { + return &pbUser.GetUserInfoResp{ErrorCode: 999, ErrorMsg: "uidList is nil"}, nil + } + log.InfoByKv("rpc get userInfo return success", req.OperationID, "token", req.Token) + return &pbUser.GetUserInfoResp{ + ErrorCode: 0, + ErrorMsg: "", + Data: userInfoList, + }, nil +} diff --git a/src/rpc/user/user/update_user_info.go b/src/rpc/user/user/update_user_info.go new file mode 100644 index 000000000..105d7636c --- /dev/null +++ b/src/rpc/user/user/update_user_info.go @@ -0,0 +1,25 @@ +package user + +import ( + "Open_IM/src/common/config" + "Open_IM/src/common/db/mysql_model/im_mysql_model" + log2 "Open_IM/src/common/log" + pbUser "Open_IM/src/proto/user" + "Open_IM/src/utils" + "context" +) + +func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserInfoReq) (*pbUser.CommonResp, error) { + log2.Info(req.Token, req.OperationID, "rpc modify user is server,args=%s", req.String()) + claims, err := utils.ParseToken(req.Token) + if err != nil { + log2.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) + return &pbUser.CommonResp{ErrorCode: config.ErrParseToken.ErrCode, ErrorMsg: err.Error()}, nil + } + err = im_mysql_model.UpDateUserInfo(claims.UID, req.Name, req.Icon, req.Mobile, req.Birth, req.Email, req.Ex, req.Gender) + if err != nil { + log2.Error(req.Token, req.OperationID, "update user some attribute failed,err=%s", err.Error()) + return &pbUser.CommonResp{ErrorCode: config.ErrModifyUserInfo.ErrCode, ErrorMsg: config.ErrModifyUserInfo.ErrMsg}, nil + } + return &pbUser.CommonResp{}, nil +} From 5eba5e8c9b95d8cd3c4f29549ec56d634df32467 Mon Sep 17 00:00:00 2001 From: away <1819625428@qq.com> Date: Wed, 26 May 2021 19:39:31 +0800 Subject: [PATCH 4/9] Internal user rpc service initial commit --- .../internal_service/get_user_info_to_client.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/rpc/user/internal_service/get_user_info_to_client.go diff --git a/src/rpc/user/internal_service/get_user_info_to_client.go b/src/rpc/user/internal_service/get_user_info_to_client.go new file mode 100644 index 000000000..6019a77cf --- /dev/null +++ b/src/rpc/user/internal_service/get_user_info_to_client.go @@ -0,0 +1,16 @@ +package internal_service + +import ( + "Open_IM/src/common/config" + pbUser "Open_IM/src/proto/user" + "context" + "github.com/skiffer-git/grpc-etcdv3/getcdv3" + "strings" +) + +func GetUserInfoClient(req *pbUser.GetUserInfoReq) (*pbUser.GetUserInfoResp, error) { + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) + client := pbUser.NewUserClient(etcdConn) + RpcResp, err := client.GetUserInfo(context.Background(), req) + return RpcResp, err +} From b8fd1e74030005c66f404b647e5a14be36786553 Mon Sep 17 00:00:00 2001 From: away <1819625428@qq.com> Date: Wed, 26 May 2021 19:42:43 +0800 Subject: [PATCH 5/9] go mod initial commit --- go.mod | 48 +++++++ go.sum | 390 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 438 insertions(+) create mode 100644 go.mod create mode 100644 go.sum diff --git a/go.mod b/go.mod new file mode 100644 index 000000000..6cc40ae15 --- /dev/null +++ b/go.mod @@ -0,0 +1,48 @@ +module Open_IM + +go 1.15 + +require ( + github.com/Shopify/sarama v1.19.0 + github.com/Shopify/toxiproxy v2.1.4+incompatible // indirect + github.com/antonfisher/nested-logrus-formatter v1.3.0 + github.com/coreos/go-semver v0.3.0 // indirect + github.com/dgrijalva/jwt-go v3.2.0+incompatible + github.com/dustin/go-humanize v1.0.0 // indirect + github.com/eapache/go-resiliency v1.2.0 // indirect + github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect + github.com/eapache/queue v1.1.0 // indirect + github.com/favadi/protoc-go-inject-tag v1.1.0 // indirect + github.com/frankban/quicktest v1.11.3 // indirect + github.com/garyburd/redigo v1.6.2 + github.com/gin-gonic/gin v1.6.3 + github.com/go-playground/validator/v10 v10.2.0 + github.com/golang/protobuf v1.5.2 + github.com/golang/snappy v0.0.3 // indirect + github.com/gorilla/websocket v1.4.2 + github.com/jinzhu/gorm v1.9.16 + github.com/jonboulle/clockwork v0.2.2 // indirect + github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible + github.com/lestrrat-go/strftime v1.0.4 // indirect + github.com/lib/pq v1.2.0 // indirect + github.com/mattn/go-sqlite3 v1.14.6 // indirect + github.com/mitchellh/mapstructure v1.4.1 + github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 + github.com/olivere/elastic/v7 v7.0.23 + github.com/pierrec/lz4 v2.6.0+incompatible // indirect + github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect + github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5 + github.com/sirupsen/logrus v1.6.0 + github.com/skiffer-git/grpc-etcdv3 v1.0.4 + github.com/tencentyun/qcloud-cos-sts-sdk v0.0.0-20210325043845-84a0811633ca + github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 // indirect + golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb + golang.org/x/tools v0.0.0-20210106214847-113979e3529a // indirect + google.golang.org/grpc v1.33.2 + gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 + gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c + sigs.k8s.io/yaml v1.2.0 // indirect + +) + +replace google.golang.org/grpc => google.golang.org/grpc v1.29.1 diff --git a/go.sum b/go.sum new file mode 100644 index 000000000..d7c5a88ec --- /dev/null +++ b/go.sum @@ -0,0 +1,390 @@ +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= +github.com/Shopify/sarama v1.19.0 h1:9oksLxC6uxVPHPVYUmq6xhr1BOF/hHobWH2UzO67z1s= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= +github.com/antonfisher/nested-logrus-formatter v1.3.0 h1:8zixYquU1Odk+vzAaAQPAdRh1ZjmUXNQ1T+dUBvlhVo= +github.com/antonfisher/nested-logrus-formatter v1.3.0/go.mod h1:6WTfyWFkBc9+zyBaKIqRrg/KwMqBbodBjgbHjDz7zjA= +github.com/aws/aws-sdk-go v1.38.3/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd/v22 v22.0.0 h1:XJIw/+VlJ+87J+doOxznsAWIdmWuViOVhkQamW5YV28= +github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd h1:83Wprp6ROGeiHFAP8WJdI2RoxALQYgdllERc3N5N2DM= +github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.2.0 h1:v7g92e/KSN71Rq7vSThKaWIq68fL4YHvWyiUKorFR1Q= +github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 h1:Yzb9+7DPaBjB8zlTR87/ElzFsnQfuHnVUVqpZZIcV5Y= +github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/favadi/protoc-go-inject-tag v1.1.0 h1:rSTVJya9GF6mcqOO2KRAppvVMHqIkSzG9ORflxqflNA= +github.com/favadi/protoc-go-inject-tag v1.1.0/go.mod h1:13goAxKedbu5IbfI0n2wIKh1CCgZOwPNZQd0igDWvko= +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/frankban/quicktest v1.11.3 h1:8sXhOn0uLys67V8EsXLc6eszDs8VXWxL3iRvebPhedY= +github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= +github.com/garyburd/redigo v1.6.2 h1:yE/pwKCrbLpLpQICzYTeZ7JsTA/C53wFTJHaEtRqniM= +github.com/garyburd/redigo v1.6.2/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= +github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY= +github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= +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-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/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.5 h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +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/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= +github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= +github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc h1:RKf14vYWi2ttpEmkA4aQ3j4u9dStX2t4M8UM6qqNsG8= +github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc/go.mod h1:kopuH9ugFRkIXf3YoqHKyrJ9YfUFsckUU9S7B+XP+is= +github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible h1:Y6sqxHMyB1D2YSzWkLibYKgg+SwmyFU9dF2hn6MdTj4= +github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible/go.mod h1:ZQnN8lSECaebrkQytbHj4xNgtg8CR7RYXnPok8e0EHA= +github.com/lestrrat-go/strftime v1.0.4 h1:T1Rb9EPkAhgxKqbcMIPguPq8glqXTA1koF8n9BHElA8= +github.com/lestrrat-go/strftime v1.0.4/go.mod h1:E1nN3pCbtMSu1yjSVeyuRFVm/U0xoR76fd03sz+Qz4g= +github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0= +github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus= +github.com/mattn/go-sqlite3 v1.14.6 h1:dNPt6NO46WmLVt2DLNpwczCmdV5boIZ6g/tlDrlRUbg= +github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ= +github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olivere/elastic/v7 v7.0.23 h1:b7tjMogDMhf2CisGI+L02LXLVa0ZyE82Z15XfW1e8t8= +github.com/olivere/elastic/v7 v7.0.23/go.mod h1:OuWmD2DiuYhddWegBKPWQuelVKBLrW0fa/VUYgxuGTY= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/pierrec/lz4 v2.6.0+incompatible h1:Ix9yFKn1nSPBLFl/yZknTp8TU5G4Ps0JDmguYK6iH1A= +github.com/pierrec/lz4 v2.6.0+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5 h1:mZHayPoR0lNmnHyvtYjDeq0zlVHn9K/ZXoy17ylucdo= +github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5/go.mod h1:GEXHk5HgEKCvEIIrSpFI3ozzG5xOKA2DVlEX/gGnewM= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/skiffer-git/grpc-etcdv3 v1.0.4 h1:jJYHZMoLvvHncZYXXwx6X4csZFz6sZA8nnyo8KTxMuk= +github.com/skiffer-git/grpc-etcdv3 v1.0.4/go.mod h1:wGyUf1fbweKbnQUOlZJPFcn9D3nnA7Zn9sYgZYxQc/I= +github.com/smartystreets/assertions v1.1.1/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= +github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= +github.com/smartystreets/gunit v1.4.2/go.mod h1:ZjM1ozSIMJlAz/ay4SG8PeKF00ckUp+zMHZXV9/bvak= +github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/tencentyun/qcloud-cos-sts-sdk v0.0.0-20210325043845-84a0811633ca h1:G/aIr3WiUesWHL2YGYgEqjM5tCAJ43Ml+0C18wDkWWs= +github.com/tencentyun/qcloud-cos-sts-sdk v0.0.0-20210325043845-84a0811633ca/go.mod h1:b18KQa4IxHbxeseW1GcZox53d7J0z39VNONTxvvlkXw= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= +github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= +github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.etcd.io/bbolt v1.3.4 h1:hi1bXHMVrlQh6WwxAy+qZCV/SYIlqo+Ushwdpa4tAKg= +go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/etcd v0.0.0-20200402134248-51bdeb39e698 h1:jWtjCJX1qxhHISBMLRztWwR+EXkI7MJAF2HjHAE/x/I= +go.etcd.io/etcd v0.0.0-20200402134248-51bdeb39e698/go.mod h1:YoUyTScD3Vcv2RBm3eGVOq7i1ULiz3OuXoQFWOirmAM= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.14.1 h1:nYDKopTbvAPq/NrUVZwT15y2lpROBiLLyoRTbXOYWOo= +go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb h1:fqpd0EBDzlHRCjiphRR5Zo/RSWWQlWv34418dnEixWk= +golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777 h1:003p0dJM77cxMSyCPFphvZf/Y5/NXf5fzg6ufd1/Oew= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 h1:+DCIGbF/swA92ohVg0//6X2IVY3KZs6p9mix0ziNYJM= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a h1:CB3a9Nez8M13wwlr/E2YtwoU+qYHKfC+JrDa45RXXoQ= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/grpc v1.29.1 h1:EC2SB8S04d2r73uptxphDSUG+kTKVgjRPF+N3xpxRB4= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw= +gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= From e84521e1735b7142dbc18eafcfb3a345436f363b Mon Sep 17 00:00:00 2001 From: away <1819625428@qq.com> Date: Wed, 26 May 2021 19:42:58 +0800 Subject: [PATCH 6/9] dockerfile initial commit --- deploy.Dockerfile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 deploy.Dockerfile diff --git a/deploy.Dockerfile b/deploy.Dockerfile new file mode 100644 index 000000000..4a76eade6 --- /dev/null +++ b/deploy.Dockerfile @@ -0,0 +1,31 @@ +FROM golang:1.15 as build + +RUN rm -rf /var/lib/apt/lists/* +RUN apt-get install apt-transport-https && apt-get update && apt-get install procps\ +&&apt-get install net-tools +#Non-interactive operation +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get install -y vim curl tzdata gawk +#Time zone adjusted to East eighth District +RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && dpkg-reconfigure -f noninteractive tzdata +# go mod Installation source, container environment variable addition will override the default variable value +ENV GO111MODULE=on +ENV GOPROXY=https://goproxy.cn,direct + +#map directory to save logs +VOLUME /home/open_im_server/logs +#map directory to save config +VOLUME /home/open_im_server/config + +# Set up the working directory +WORKDIR /home/open_im_server +# add all files to the container +COPY . . + +WORKDIR /home/open_im_server/script +RUN chmod +x *.sh +CMD ["./start_all.sh"] + + + + From 647e35d97f7a71a1aa91a97e24fc7426920ea448 Mon Sep 17 00:00:00 2001 From: away <1819625428@qq.com> Date: Wed, 26 May 2021 19:44:38 +0800 Subject: [PATCH 7/9] friend proto initial commit --- src/proto/friend/friend.pb.go | 1825 +++++++++++++++++++++++++++++++++ src/proto/friend/friend.proto | 159 +++ 2 files changed, 1984 insertions(+) create mode 100644 src/proto/friend/friend.pb.go create mode 100644 src/proto/friend/friend.proto diff --git a/src/proto/friend/friend.pb.go b/src/proto/friend/friend.pb.go new file mode 100644 index 000000000..7771b92a9 --- /dev/null +++ b/src/proto/friend/friend.pb.go @@ -0,0 +1,1825 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: friend/friend.proto + +package friend + +import ( + context "context" + fmt "fmt" + proto "github.com/golang/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type CommonResp struct { + ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode,proto3" json:"errorCode,omitempty"` + ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg,proto3" json:"errorMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CommonResp) Reset() { *m = CommonResp{} } +func (m *CommonResp) String() string { return proto.CompactTextString(m) } +func (*CommonResp) ProtoMessage() {} +func (*CommonResp) Descriptor() ([]byte, []int) { + return fileDescriptor_1a7db849dd7bb41b, []int{0} +} + +func (m *CommonResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CommonResp.Unmarshal(m, b) +} +func (m *CommonResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CommonResp.Marshal(b, m, deterministic) +} +func (m *CommonResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommonResp.Merge(m, src) +} +func (m *CommonResp) XXX_Size() int { + return xxx_messageInfo_CommonResp.Size(m) +} +func (m *CommonResp) XXX_DiscardUnknown() { + xxx_messageInfo_CommonResp.DiscardUnknown(m) +} + +var xxx_messageInfo_CommonResp proto.InternalMessageInfo + +func (m *CommonResp) GetErrorCode() int32 { + if m != nil { + return m.ErrorCode + } + return 0 +} + +func (m *CommonResp) GetErrorMsg() string { + if m != nil { + return m.ErrorMsg + } + return "" +} + +type SearchFriendReq struct { + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"` + Token string `protobuf:"bytes,3,opt,name=Token,proto3" json:"Token,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SearchFriendReq) Reset() { *m = SearchFriendReq{} } +func (m *SearchFriendReq) String() string { return proto.CompactTextString(m) } +func (*SearchFriendReq) ProtoMessage() {} +func (*SearchFriendReq) Descriptor() ([]byte, []int) { + return fileDescriptor_1a7db849dd7bb41b, []int{1} +} + +func (m *SearchFriendReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SearchFriendReq.Unmarshal(m, b) +} +func (m *SearchFriendReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SearchFriendReq.Marshal(b, m, deterministic) +} +func (m *SearchFriendReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SearchFriendReq.Merge(m, src) +} +func (m *SearchFriendReq) XXX_Size() int { + return xxx_messageInfo_SearchFriendReq.Size(m) +} +func (m *SearchFriendReq) XXX_DiscardUnknown() { + xxx_messageInfo_SearchFriendReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SearchFriendReq proto.InternalMessageInfo + +func (m *SearchFriendReq) GetUid() string { + if m != nil { + return m.Uid + } + return "" +} + +func (m *SearchFriendReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *SearchFriendReq) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +type SearchFriendResp struct { + ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode,proto3" json:"errorCode,omitempty"` + ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg,proto3" json:"errorMsg,omitempty"` + Data *SearchFriendData `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SearchFriendResp) Reset() { *m = SearchFriendResp{} } +func (m *SearchFriendResp) String() string { return proto.CompactTextString(m) } +func (*SearchFriendResp) ProtoMessage() {} +func (*SearchFriendResp) Descriptor() ([]byte, []int) { + return fileDescriptor_1a7db849dd7bb41b, []int{2} +} + +func (m *SearchFriendResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SearchFriendResp.Unmarshal(m, b) +} +func (m *SearchFriendResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SearchFriendResp.Marshal(b, m, deterministic) +} +func (m *SearchFriendResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_SearchFriendResp.Merge(m, src) +} +func (m *SearchFriendResp) XXX_Size() int { + return xxx_messageInfo_SearchFriendResp.Size(m) +} +func (m *SearchFriendResp) XXX_DiscardUnknown() { + xxx_messageInfo_SearchFriendResp.DiscardUnknown(m) +} + +var xxx_messageInfo_SearchFriendResp proto.InternalMessageInfo + +func (m *SearchFriendResp) GetErrorCode() int32 { + if m != nil { + return m.ErrorCode + } + return 0 +} + +func (m *SearchFriendResp) GetErrorMsg() string { + if m != nil { + return m.ErrorMsg + } + return "" +} + +func (m *SearchFriendResp) GetData() *SearchFriendData { + if m != nil { + return m.Data + } + return nil +} + +type SearchFriendData struct { + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` + Icon string `protobuf:"bytes,2,opt,name=icon,proto3" json:"icon,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Gender int32 `protobuf:"varint,4,opt,name=gender,proto3" json:"gender,omitempty"` + Mobile string `protobuf:"bytes,5,opt,name=mobile,proto3" json:"mobile,omitempty"` + Birth string `protobuf:"bytes,6,opt,name=birth,proto3" json:"birth,omitempty"` + Email string `protobuf:"bytes,7,opt,name=email,proto3" json:"email,omitempty"` + Ex string `protobuf:"bytes,8,opt,name=ex,proto3" json:"ex,omitempty"` + Comment string `protobuf:"bytes,9,opt,name=comment,proto3" json:"comment,omitempty"` + IsFriend int32 `protobuf:"varint,10,opt,name=isFriend,proto3" json:"isFriend,omitempty"` + IsInBlackList int32 `protobuf:"varint,11,opt,name=isInBlackList,proto3" json:"isInBlackList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SearchFriendData) Reset() { *m = SearchFriendData{} } +func (m *SearchFriendData) String() string { return proto.CompactTextString(m) } +func (*SearchFriendData) ProtoMessage() {} +func (*SearchFriendData) Descriptor() ([]byte, []int) { + return fileDescriptor_1a7db849dd7bb41b, []int{3} +} + +func (m *SearchFriendData) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SearchFriendData.Unmarshal(m, b) +} +func (m *SearchFriendData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SearchFriendData.Marshal(b, m, deterministic) +} +func (m *SearchFriendData) XXX_Merge(src proto.Message) { + xxx_messageInfo_SearchFriendData.Merge(m, src) +} +func (m *SearchFriendData) XXX_Size() int { + return xxx_messageInfo_SearchFriendData.Size(m) +} +func (m *SearchFriendData) XXX_DiscardUnknown() { + xxx_messageInfo_SearchFriendData.DiscardUnknown(m) +} + +var xxx_messageInfo_SearchFriendData proto.InternalMessageInfo + +func (m *SearchFriendData) GetUid() string { + if m != nil { + return m.Uid + } + return "" +} + +func (m *SearchFriendData) GetIcon() string { + if m != nil { + return m.Icon + } + return "" +} + +func (m *SearchFriendData) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *SearchFriendData) GetGender() int32 { + if m != nil { + return m.Gender + } + return 0 +} + +func (m *SearchFriendData) GetMobile() string { + if m != nil { + return m.Mobile + } + return "" +} + +func (m *SearchFriendData) GetBirth() string { + if m != nil { + return m.Birth + } + return "" +} + +func (m *SearchFriendData) GetEmail() string { + if m != nil { + return m.Email + } + return "" +} + +func (m *SearchFriendData) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +func (m *SearchFriendData) GetComment() string { + if m != nil { + return m.Comment + } + return "" +} + +func (m *SearchFriendData) GetIsFriend() int32 { + if m != nil { + return m.IsFriend + } + return 0 +} + +func (m *SearchFriendData) GetIsInBlackList() int32 { + if m != nil { + return m.IsInBlackList + } + return 0 +} + +type AddFriendReq struct { + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"` + Token string `protobuf:"bytes,3,opt,name=Token,proto3" json:"Token,omitempty"` + ReqMessage string `protobuf:"bytes,4,opt,name=ReqMessage,proto3" json:"ReqMessage,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_1a7db849dd7bb41b, []int{4} +} + +func (m *AddFriendReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AddFriendReq.Unmarshal(m, b) +} +func (m *AddFriendReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AddFriendReq.Marshal(b, m, deterministic) +} +func (m *AddFriendReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddFriendReq.Merge(m, src) +} +func (m *AddFriendReq) XXX_Size() int { + return xxx_messageInfo_AddFriendReq.Size(m) +} +func (m *AddFriendReq) XXX_DiscardUnknown() { + xxx_messageInfo_AddFriendReq.DiscardUnknown(m) +} + +var xxx_messageInfo_AddFriendReq proto.InternalMessageInfo + +func (m *AddFriendReq) GetUid() string { + if m != nil { + return m.Uid + } + return "" +} + +func (m *AddFriendReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *AddFriendReq) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +func (m *AddFriendReq) GetReqMessage() string { + if m != nil { + return m.ReqMessage + } + return "" +} + +type GetFriendApplyReq struct { + OperationID string `protobuf:"bytes,1,opt,name=OperationID,proto3" json:"OperationID,omitempty"` + Token string `protobuf:"bytes,2,opt,name=Token,proto3" json:"Token,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_1a7db849dd7bb41b, []int{5} +} + +func (m *GetFriendApplyReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetFriendApplyReq.Unmarshal(m, b) +} +func (m *GetFriendApplyReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetFriendApplyReq.Marshal(b, m, deterministic) +} +func (m *GetFriendApplyReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetFriendApplyReq.Merge(m, src) +} +func (m *GetFriendApplyReq) XXX_Size() int { + return xxx_messageInfo_GetFriendApplyReq.Size(m) +} +func (m *GetFriendApplyReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetFriendApplyReq.DiscardUnknown(m) +} + +var xxx_messageInfo_GetFriendApplyReq proto.InternalMessageInfo + +func (m *GetFriendApplyReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *GetFriendApplyReq) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +type GetFriendApplyResp struct { + ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode,proto3" json:"errorCode,omitempty"` + ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg,proto3" json:"errorMsg,omitempty"` + Data []*ApplyUserInfo `protobuf:"bytes,4,rep,name=data,proto3" json:"data,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_1a7db849dd7bb41b, []int{6} +} + +func (m *GetFriendApplyResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetFriendApplyResp.Unmarshal(m, b) +} +func (m *GetFriendApplyResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetFriendApplyResp.Marshal(b, m, deterministic) +} +func (m *GetFriendApplyResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetFriendApplyResp.Merge(m, src) +} +func (m *GetFriendApplyResp) XXX_Size() int { + return xxx_messageInfo_GetFriendApplyResp.Size(m) +} +func (m *GetFriendApplyResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetFriendApplyResp.DiscardUnknown(m) +} + +var xxx_messageInfo_GetFriendApplyResp proto.InternalMessageInfo + +func (m *GetFriendApplyResp) GetErrorCode() int32 { + if m != nil { + return m.ErrorCode + } + return 0 +} + +func (m *GetFriendApplyResp) GetErrorMsg() string { + if m != nil { + return m.ErrorMsg + } + return "" +} + +func (m *GetFriendApplyResp) GetData() []*ApplyUserInfo { + if m != nil { + return m.Data + } + return nil +} + +type ApplyUserInfo struct { + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Icon string `protobuf:"bytes,3,opt,name=icon,proto3" json:"icon,omitempty"` + Gender int32 `protobuf:"varint,4,opt,name=gender,proto3" json:"gender,omitempty"` + Mobile string `protobuf:"bytes,5,opt,name=mobile,proto3" json:"mobile,omitempty"` + Birth string `protobuf:"bytes,6,opt,name=birth,proto3" json:"birth,omitempty"` + Email string `protobuf:"bytes,7,opt,name=email,proto3" json:"email,omitempty"` + Ex string `protobuf:"bytes,8,opt,name=ex,proto3" json:"ex,omitempty"` + Flag int32 `protobuf:"varint,9,opt,name=flag,proto3" json:"flag,omitempty"` + ApplyTime string `protobuf:"bytes,10,opt,name=applyTime,proto3" json:"applyTime,omitempty"` + ReqMessage string `protobuf:"bytes,11,opt,name=reqMessage,proto3" json:"reqMessage,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_1a7db849dd7bb41b, []int{7} +} + +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 (m *ApplyUserInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ApplyUserInfo.Merge(m, 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) GetUid() string { + if m != nil { + return m.Uid + } + return "" +} + +func (m *ApplyUserInfo) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ApplyUserInfo) GetIcon() string { + if m != nil { + return m.Icon + } + return "" +} + +func (m *ApplyUserInfo) GetGender() int32 { + if m != nil { + return m.Gender + } + return 0 +} + +func (m *ApplyUserInfo) GetMobile() string { + if m != nil { + return m.Mobile + } + return "" +} + +func (m *ApplyUserInfo) GetBirth() string { + if m != nil { + return m.Birth + } + return "" +} + +func (m *ApplyUserInfo) GetEmail() string { + if m != nil { + return m.Email + } + return "" +} + +func (m *ApplyUserInfo) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +func (m *ApplyUserInfo) GetFlag() int32 { + if m != nil { + return m.Flag + } + return 0 +} + +func (m *ApplyUserInfo) GetApplyTime() string { + if m != nil { + return m.ApplyTime + } + return "" +} + +func (m *ApplyUserInfo) GetReqMessage() string { + if m != nil { + return m.ReqMessage + } + return "" +} + +type GetFriendListReq struct { + OperationID string `protobuf:"bytes,1,opt,name=OperationID,proto3" json:"OperationID,omitempty"` + Token string `protobuf:"bytes,2,opt,name=Token,proto3" json:"Token,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_1a7db849dd7bb41b, []int{8} +} + +func (m *GetFriendListReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetFriendListReq.Unmarshal(m, b) +} +func (m *GetFriendListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetFriendListReq.Marshal(b, m, deterministic) +} +func (m *GetFriendListReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetFriendListReq.Merge(m, src) +} +func (m *GetFriendListReq) XXX_Size() int { + return xxx_messageInfo_GetFriendListReq.Size(m) +} +func (m *GetFriendListReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetFriendListReq.DiscardUnknown(m) +} + +var xxx_messageInfo_GetFriendListReq proto.InternalMessageInfo + +func (m *GetFriendListReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *GetFriendListReq) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +type GetFriendListResp struct { + ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode,proto3" json:"errorCode,omitempty"` + ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg,proto3" json:"errorMsg,omitempty"` + Data []*UserInfo `protobuf:"bytes,3,rep,name=data,proto3" json:"data,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_1a7db849dd7bb41b, []int{9} +} + +func (m *GetFriendListResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetFriendListResp.Unmarshal(m, b) +} +func (m *GetFriendListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetFriendListResp.Marshal(b, m, deterministic) +} +func (m *GetFriendListResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetFriendListResp.Merge(m, src) +} +func (m *GetFriendListResp) XXX_Size() int { + return xxx_messageInfo_GetFriendListResp.Size(m) +} +func (m *GetFriendListResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetFriendListResp.DiscardUnknown(m) +} + +var xxx_messageInfo_GetFriendListResp proto.InternalMessageInfo + +func (m *GetFriendListResp) GetErrorCode() int32 { + if m != nil { + return m.ErrorCode + } + return 0 +} + +func (m *GetFriendListResp) GetErrorMsg() string { + if m != nil { + return m.ErrorMsg + } + return "" +} + +func (m *GetFriendListResp) GetData() []*UserInfo { + if m != nil { + return m.Data + } + return nil +} + +type UserInfo struct { + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Icon string `protobuf:"bytes,2,opt,name=icon,proto3" json:"icon,omitempty"` + Gender int32 `protobuf:"varint,4,opt,name=gender,proto3" json:"gender,omitempty"` + Mobile string `protobuf:"bytes,5,opt,name=mobile,proto3" json:"mobile,omitempty"` + Birth string `protobuf:"bytes,6,opt,name=birth,proto3" json:"birth,omitempty"` + Email string `protobuf:"bytes,7,opt,name=email,proto3" json:"email,omitempty"` + Ex string `protobuf:"bytes,8,opt,name=ex,proto3" json:"ex,omitempty"` + Comment string `protobuf:"bytes,9,opt,name=comment,proto3" json:"comment,omitempty"` + IsInBlackList int32 `protobuf:"varint,10,opt,name=isInBlackList,proto3" json:"isInBlackList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_1a7db849dd7bb41b, []int{10} +} + +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 (m *UserInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserInfo.Merge(m, src) +} +func (m *UserInfo) XXX_Size() int { + return xxx_messageInfo_UserInfo.Size(m) +} +func (m *UserInfo) XXX_DiscardUnknown() { + xxx_messageInfo_UserInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_UserInfo proto.InternalMessageInfo + +func (m *UserInfo) GetUid() string { + if m != nil { + return m.Uid + } + return "" +} + +func (m *UserInfo) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *UserInfo) GetIcon() string { + if m != nil { + return m.Icon + } + return "" +} + +func (m *UserInfo) GetGender() int32 { + if m != nil { + return m.Gender + } + return 0 +} + +func (m *UserInfo) GetMobile() string { + if m != nil { + return m.Mobile + } + return "" +} + +func (m *UserInfo) GetBirth() string { + if m != nil { + return m.Birth + } + return "" +} + +func (m *UserInfo) GetEmail() string { + if m != nil { + return m.Email + } + return "" +} + +func (m *UserInfo) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +func (m *UserInfo) GetComment() string { + if m != nil { + return m.Comment + } + return "" +} + +func (m *UserInfo) GetIsInBlackList() int32 { + if m != nil { + return m.IsInBlackList + } + return 0 +} + +type AddBlacklistReq struct { + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"` + Token string `protobuf:"bytes,3,opt,name=Token,proto3" json:"Token,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_1a7db849dd7bb41b, []int{11} +} + +func (m *AddBlacklistReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AddBlacklistReq.Unmarshal(m, b) +} +func (m *AddBlacklistReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AddBlacklistReq.Marshal(b, m, deterministic) +} +func (m *AddBlacklistReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddBlacklistReq.Merge(m, src) +} +func (m *AddBlacklistReq) XXX_Size() int { + return xxx_messageInfo_AddBlacklistReq.Size(m) +} +func (m *AddBlacklistReq) XXX_DiscardUnknown() { + xxx_messageInfo_AddBlacklistReq.DiscardUnknown(m) +} + +var xxx_messageInfo_AddBlacklistReq proto.InternalMessageInfo + +func (m *AddBlacklistReq) GetUid() string { + if m != nil { + return m.Uid + } + return "" +} + +func (m *AddBlacklistReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *AddBlacklistReq) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +type RemoveBlacklistReq struct { + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"` + Token string `protobuf:"bytes,3,opt,name=Token,proto3" json:"Token,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_1a7db849dd7bb41b, []int{12} +} + +func (m *RemoveBlacklistReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RemoveBlacklistReq.Unmarshal(m, b) +} +func (m *RemoveBlacklistReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RemoveBlacklistReq.Marshal(b, m, deterministic) +} +func (m *RemoveBlacklistReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveBlacklistReq.Merge(m, src) +} +func (m *RemoveBlacklistReq) XXX_Size() int { + return xxx_messageInfo_RemoveBlacklistReq.Size(m) +} +func (m *RemoveBlacklistReq) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveBlacklistReq.DiscardUnknown(m) +} + +var xxx_messageInfo_RemoveBlacklistReq proto.InternalMessageInfo + +func (m *RemoveBlacklistReq) GetUid() string { + if m != nil { + return m.Uid + } + return "" +} + +func (m *RemoveBlacklistReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *RemoveBlacklistReq) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +type GetBlacklistReq struct { + OperationID string `protobuf:"bytes,1,opt,name=OperationID,proto3" json:"OperationID,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_1a7db849dd7bb41b, []int{13} +} + +func (m *GetBlacklistReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetBlacklistReq.Unmarshal(m, b) +} +func (m *GetBlacklistReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetBlacklistReq.Marshal(b, m, deterministic) +} +func (m *GetBlacklistReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetBlacklistReq.Merge(m, src) +} +func (m *GetBlacklistReq) XXX_Size() int { + return xxx_messageInfo_GetBlacklistReq.Size(m) +} +func (m *GetBlacklistReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetBlacklistReq.DiscardUnknown(m) +} + +var xxx_messageInfo_GetBlacklistReq proto.InternalMessageInfo + +func (m *GetBlacklistReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *GetBlacklistReq) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +type GetBlacklistResp struct { + ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode,proto3" json:"errorCode,omitempty"` + ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg,proto3" json:"errorMsg,omitempty"` + Data []*UserInfo `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_1a7db849dd7bb41b, []int{14} +} + +func (m *GetBlacklistResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetBlacklistResp.Unmarshal(m, b) +} +func (m *GetBlacklistResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetBlacklistResp.Marshal(b, m, deterministic) +} +func (m *GetBlacklistResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetBlacklistResp.Merge(m, src) +} +func (m *GetBlacklistResp) XXX_Size() int { + return xxx_messageInfo_GetBlacklistResp.Size(m) +} +func (m *GetBlacklistResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetBlacklistResp.DiscardUnknown(m) +} + +var xxx_messageInfo_GetBlacklistResp proto.InternalMessageInfo + +func (m *GetBlacklistResp) GetErrorCode() int32 { + if m != nil { + return m.ErrorCode + } + return 0 +} + +func (m *GetBlacklistResp) GetErrorMsg() string { + if m != nil { + return m.ErrorMsg + } + return "" +} + +func (m *GetBlacklistResp) GetData() []*UserInfo { + if m != nil { + return m.Data + } + return nil +} + +type IsInBlackListReq struct { + SendUid string `protobuf:"bytes,1,opt,name=sendUid,proto3" json:"sendUid,omitempty"` + ReceiveUid string `protobuf:"bytes,2,opt,name=receiveUid,proto3" json:"receiveUid,omitempty"` + OperationID string `protobuf:"bytes,3,opt,name=OperationID,proto3" json:"OperationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_1a7db849dd7bb41b, []int{15} +} + +func (m *IsInBlackListReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_IsInBlackListReq.Unmarshal(m, b) +} +func (m *IsInBlackListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_IsInBlackListReq.Marshal(b, m, deterministic) +} +func (m *IsInBlackListReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_IsInBlackListReq.Merge(m, src) +} +func (m *IsInBlackListReq) XXX_Size() int { + return xxx_messageInfo_IsInBlackListReq.Size(m) +} +func (m *IsInBlackListReq) XXX_DiscardUnknown() { + xxx_messageInfo_IsInBlackListReq.DiscardUnknown(m) +} + +var xxx_messageInfo_IsInBlackListReq proto.InternalMessageInfo + +func (m *IsInBlackListReq) GetSendUid() string { + if m != nil { + return m.SendUid + } + return "" +} + +func (m *IsInBlackListReq) GetReceiveUid() string { + if m != nil { + return m.ReceiveUid + } + return "" +} + +func (m *IsInBlackListReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +type IsInBlackListResp struct { + ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode,proto3" json:"errorCode,omitempty"` + ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg,proto3" json:"errorMsg,omitempty"` + Response bool `protobuf:"varint,3,opt,name=response,proto3" json:"response,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_1a7db849dd7bb41b, []int{16} +} + +func (m *IsInBlackListResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_IsInBlackListResp.Unmarshal(m, b) +} +func (m *IsInBlackListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_IsInBlackListResp.Marshal(b, m, deterministic) +} +func (m *IsInBlackListResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_IsInBlackListResp.Merge(m, src) +} +func (m *IsInBlackListResp) XXX_Size() int { + return xxx_messageInfo_IsInBlackListResp.Size(m) +} +func (m *IsInBlackListResp) XXX_DiscardUnknown() { + xxx_messageInfo_IsInBlackListResp.DiscardUnknown(m) +} + +var xxx_messageInfo_IsInBlackListResp proto.InternalMessageInfo + +func (m *IsInBlackListResp) GetErrorCode() int32 { + if m != nil { + return m.ErrorCode + } + return 0 +} + +func (m *IsInBlackListResp) GetErrorMsg() string { + if m != nil { + return m.ErrorMsg + } + return "" +} + +func (m *IsInBlackListResp) GetResponse() bool { + if m != nil { + return m.Response + } + return false +} + +type DeleteFriendReq struct { + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"` + Token string `protobuf:"bytes,3,opt,name=Token,proto3" json:"Token,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_1a7db849dd7bb41b, []int{17} +} + +func (m *DeleteFriendReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteFriendReq.Unmarshal(m, b) +} +func (m *DeleteFriendReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteFriendReq.Marshal(b, m, deterministic) +} +func (m *DeleteFriendReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteFriendReq.Merge(m, src) +} +func (m *DeleteFriendReq) XXX_Size() int { + return xxx_messageInfo_DeleteFriendReq.Size(m) +} +func (m *DeleteFriendReq) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteFriendReq.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteFriendReq proto.InternalMessageInfo + +func (m *DeleteFriendReq) GetUid() string { + if m != nil { + return m.Uid + } + return "" +} + +func (m *DeleteFriendReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *DeleteFriendReq) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +type AddedFriendReq struct { + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` + Flag int32 `protobuf:"varint,2,opt,name=flag,proto3" json:"flag,omitempty"` + OperationID string `protobuf:"bytes,3,opt,name=OperationID,proto3" json:"OperationID,omitempty"` + Token string `protobuf:"bytes,4,opt,name=Token,proto3" json:"Token,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AddedFriendReq) Reset() { *m = AddedFriendReq{} } +func (m *AddedFriendReq) String() string { return proto.CompactTextString(m) } +func (*AddedFriendReq) ProtoMessage() {} +func (*AddedFriendReq) Descriptor() ([]byte, []int) { + return fileDescriptor_1a7db849dd7bb41b, []int{18} +} + +func (m *AddedFriendReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AddedFriendReq.Unmarshal(m, b) +} +func (m *AddedFriendReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AddedFriendReq.Marshal(b, m, deterministic) +} +func (m *AddedFriendReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddedFriendReq.Merge(m, src) +} +func (m *AddedFriendReq) XXX_Size() int { + return xxx_messageInfo_AddedFriendReq.Size(m) +} +func (m *AddedFriendReq) XXX_DiscardUnknown() { + xxx_messageInfo_AddedFriendReq.DiscardUnknown(m) +} + +var xxx_messageInfo_AddedFriendReq proto.InternalMessageInfo + +func (m *AddedFriendReq) GetUid() string { + if m != nil { + return m.Uid + } + return "" +} + +func (m *AddedFriendReq) GetFlag() int32 { + if m != nil { + return m.Flag + } + return 0 +} + +func (m *AddedFriendReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *AddedFriendReq) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +type SetFriendCommentReq struct { + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=operationID,proto3" json:"operationID,omitempty"` + Comment string `protobuf:"bytes,3,opt,name=comment,proto3" json:"comment,omitempty"` + Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_1a7db849dd7bb41b, []int{19} +} + +func (m *SetFriendCommentReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetFriendCommentReq.Unmarshal(m, b) +} +func (m *SetFriendCommentReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetFriendCommentReq.Marshal(b, m, deterministic) +} +func (m *SetFriendCommentReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetFriendCommentReq.Merge(m, src) +} +func (m *SetFriendCommentReq) XXX_Size() int { + return xxx_messageInfo_SetFriendCommentReq.Size(m) +} +func (m *SetFriendCommentReq) XXX_DiscardUnknown() { + xxx_messageInfo_SetFriendCommentReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SetFriendCommentReq proto.InternalMessageInfo + +func (m *SetFriendCommentReq) GetUid() string { + if m != nil { + return m.Uid + } + return "" +} + +func (m *SetFriendCommentReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *SetFriendCommentReq) GetComment() string { + if m != nil { + return m.Comment + } + return "" +} + +func (m *SetFriendCommentReq) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +func init() { + proto.RegisterType((*CommonResp)(nil), "friend.CommonResp") + proto.RegisterType((*SearchFriendReq)(nil), "friend.SearchFriendReq") + proto.RegisterType((*SearchFriendResp)(nil), "friend.SearchFriendResp") + proto.RegisterType((*SearchFriendData)(nil), "friend.SearchFriendData") + proto.RegisterType((*AddFriendReq)(nil), "friend.AddFriendReq") + 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((*UserInfo)(nil), "friend.UserInfo") + proto.RegisterType((*AddBlacklistReq)(nil), "friend.AddBlacklistReq") + proto.RegisterType((*RemoveBlacklistReq)(nil), "friend.RemoveBlacklistReq") + proto.RegisterType((*GetBlacklistReq)(nil), "friend.GetBlacklistReq") + proto.RegisterType((*GetBlacklistResp)(nil), "friend.GetBlacklistResp") + proto.RegisterType((*IsInBlackListReq)(nil), "friend.IsInBlackListReq") + proto.RegisterType((*IsInBlackListResp)(nil), "friend.IsInBlackListResp") + proto.RegisterType((*DeleteFriendReq)(nil), "friend.DeleteFriendReq") + proto.RegisterType((*AddedFriendReq)(nil), "friend.AddedFriendReq") + proto.RegisterType((*SetFriendCommentReq)(nil), "friend.SetFriendCommentReq") +} + +func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_1a7db849dd7bb41b) } + +var fileDescriptor_1a7db849dd7bb41b = []byte{ + // 867 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xdb, 0x4e, 0xdb, 0x4c, + 0x10, 0x56, 0x6c, 0x27, 0x24, 0x93, 0x84, 0x84, 0x85, 0x9f, 0xdf, 0xa4, 0x55, 0x15, 0x59, 0x5c, + 0x50, 0xa9, 0xa2, 0x12, 0x55, 0x2f, 0x2a, 0xae, 0x42, 0x22, 0x50, 0x4a, 0x51, 0x25, 0x03, 0x37, + 0x45, 0xaa, 0x64, 0xe2, 0x21, 0x58, 0xc4, 0x07, 0xbc, 0x2e, 0x82, 0xbe, 0x40, 0x5f, 0xa0, 0x6f, + 0xd7, 0x97, 0xe8, 0x23, 0x54, 0xbb, 0x3e, 0xad, 0x0f, 0x01, 0xa4, 0x14, 0x7a, 0x15, 0xcf, 0xb7, + 0xab, 0x99, 0x9d, 0xf9, 0xbe, 0x99, 0xdd, 0xc0, 0xea, 0x85, 0x6f, 0xa1, 0x63, 0xbe, 0x0d, 0x7f, + 0xb6, 0x3d, 0xdf, 0x0d, 0x5c, 0x52, 0x0b, 0x2d, 0x6d, 0x1f, 0x60, 0xe8, 0xda, 0xb6, 0xeb, 0xe8, + 0x48, 0x3d, 0xf2, 0x12, 0x1a, 0xe8, 0xfb, 0xae, 0x3f, 0x74, 0x4d, 0x54, 0x2b, 0xfd, 0xca, 0x56, + 0x55, 0x4f, 0x01, 0xd2, 0x83, 0x3a, 0x37, 0x8e, 0xe8, 0x54, 0x95, 0xfa, 0x95, 0xad, 0x86, 0x9e, + 0xd8, 0xda, 0x19, 0x74, 0x8e, 0xd1, 0xf0, 0x27, 0x97, 0xfb, 0xdc, 0xaf, 0x8e, 0xd7, 0xa4, 0x0b, + 0xf2, 0x37, 0xcb, 0xe4, 0x6e, 0x1a, 0x3a, 0xfb, 0x24, 0x7d, 0x68, 0x7e, 0xf6, 0xd0, 0x37, 0x02, + 0xcb, 0x75, 0xc6, 0xa3, 0xc8, 0x87, 0x08, 0x91, 0x35, 0xa8, 0x9e, 0xb8, 0x57, 0xe8, 0xa8, 0x32, + 0x5f, 0x0b, 0x0d, 0xed, 0x3b, 0x74, 0xb3, 0xce, 0x17, 0x39, 0x2a, 0x79, 0x03, 0xca, 0xc8, 0x08, + 0x0c, 0x1e, 0xa2, 0xb9, 0xa3, 0x6e, 0x47, 0x75, 0x11, 0x23, 0xb0, 0x75, 0x9d, 0xef, 0xd2, 0x7e, + 0x4a, 0xd9, 0xe0, 0x0c, 0x2c, 0x49, 0x8d, 0x80, 0x62, 0x4d, 0x5c, 0x27, 0x0a, 0xc6, 0xbf, 0x19, + 0xe6, 0x18, 0x36, 0x46, 0xb9, 0xf0, 0x6f, 0xb2, 0x0e, 0xb5, 0x29, 0x3a, 0x26, 0xfa, 0xaa, 0xc2, + 0xcf, 0x1c, 0x59, 0x0c, 0xb7, 0xdd, 0x73, 0x6b, 0x86, 0x6a, 0x95, 0xef, 0x8e, 0x2c, 0x56, 0x90, + 0x73, 0xcb, 0x0f, 0x2e, 0xd5, 0x5a, 0x58, 0x10, 0x6e, 0x30, 0x14, 0x6d, 0xc3, 0x9a, 0xa9, 0x4b, + 0x21, 0xca, 0x0d, 0xb2, 0x0c, 0x12, 0xde, 0xaa, 0x75, 0x0e, 0x49, 0x78, 0x4b, 0x54, 0x58, 0x9a, + 0xb8, 0xb6, 0x8d, 0x4e, 0xa0, 0x36, 0x38, 0x18, 0x9b, 0xac, 0x3c, 0x16, 0x0d, 0xf3, 0x51, 0x81, + 0x9f, 0x23, 0xb1, 0xc9, 0x26, 0xb4, 0x2d, 0x3a, 0x76, 0xf6, 0x66, 0xc6, 0xe4, 0xea, 0x93, 0x45, + 0x03, 0xb5, 0xc9, 0x37, 0x64, 0x41, 0xed, 0x16, 0x5a, 0x03, 0xd3, 0x7c, 0x02, 0xb2, 0xc9, 0x2b, + 0x00, 0x1d, 0xaf, 0x8f, 0x90, 0x52, 0x63, 0x8a, 0xbc, 0x4a, 0x0d, 0x5d, 0x40, 0xb4, 0x43, 0x58, + 0x39, 0xc0, 0x20, 0x8c, 0x3c, 0xf0, 0xbc, 0xd9, 0x1d, 0x0b, 0x9f, 0x0b, 0x56, 0xb9, 0x27, 0x98, + 0x24, 0x2a, 0xeb, 0x0e, 0x48, 0xde, 0xd9, 0x42, 0xda, 0x7a, 0x0d, 0x8a, 0xc9, 0xb4, 0xa5, 0xf4, + 0xe5, 0xad, 0xe6, 0xce, 0x7f, 0xb1, 0xb6, 0xb8, 0xeb, 0x53, 0x8a, 0xfe, 0xd8, 0xb9, 0x70, 0x75, + 0xbe, 0x45, 0xfb, 0x21, 0x41, 0x3b, 0x83, 0x97, 0xab, 0x8a, 0x2b, 0x48, 0x12, 0x14, 0x14, 0x2b, + 0x4d, 0x16, 0x94, 0xf6, 0x9c, 0xaa, 0x22, 0xa0, 0x5c, 0xcc, 0x8c, 0x29, 0x97, 0x54, 0x55, 0xe7, + 0xdf, 0xac, 0x60, 0x06, 0x4b, 0xe5, 0xc4, 0xb2, 0x91, 0x0b, 0xaa, 0xa1, 0xa7, 0x00, 0x63, 0xd4, + 0x4f, 0x19, 0x6d, 0x86, 0x8c, 0xa6, 0x88, 0xf6, 0x11, 0xba, 0xd3, 0x98, 0x04, 0x26, 0xae, 0x45, + 0x08, 0xa5, 0xb0, 0x92, 0xf3, 0xb5, 0x10, 0x9f, 0x9b, 0x11, 0x9f, 0x32, 0xe7, 0xb3, 0x1b, 0xf3, + 0x99, 0xa3, 0xf2, 0x77, 0x05, 0xea, 0x8f, 0x60, 0x51, 0x2e, 0x61, 0x51, 0xfa, 0x47, 0x2c, 0xce, + 0x9f, 0x0d, 0x85, 0xfe, 0x87, 0xb2, 0xfe, 0x3f, 0x83, 0xce, 0xc0, 0x34, 0xb9, 0x3d, 0x8b, 0x28, + 0xfb, 0x7b, 0xf3, 0xfe, 0x2b, 0x10, 0x1d, 0x6d, 0xf7, 0x06, 0x9f, 0xc8, 0xff, 0x18, 0x3a, 0x07, + 0x18, 0x64, 0x9c, 0x3f, 0x4a, 0x6f, 0x81, 0xa8, 0x37, 0x6e, 0x68, 0x3e, 0x74, 0xb3, 0xae, 0x9e, + 0x41, 0x6e, 0x0e, 0x74, 0xc7, 0x22, 0x19, 0xec, 0xfc, 0x2a, 0x2c, 0x51, 0x74, 0xcc, 0xd3, 0xa4, + 0x40, 0xb1, 0x19, 0x76, 0xdf, 0x04, 0xad, 0x1b, 0x64, 0x8b, 0x52, 0xdc, 0x7d, 0x31, 0x92, 0xcf, + 0x5c, 0x2e, 0x64, 0xae, 0x59, 0xb0, 0x92, 0x8b, 0xb7, 0x50, 0x92, 0x3d, 0xa8, 0xfb, 0x48, 0x3d, + 0xd7, 0xa1, 0x61, 0x4b, 0xd4, 0xf5, 0xc4, 0x66, 0xb2, 0x1a, 0xe1, 0x0c, 0x03, 0x7c, 0x8a, 0x67, + 0x84, 0x03, 0xcb, 0x03, 0xd3, 0xc4, 0x7b, 0x6f, 0xad, 0x78, 0xba, 0x49, 0xc2, 0x74, 0x7b, 0xb0, + 0x42, 0x69, 0x3c, 0x25, 0x7b, 0xb9, 0xac, 0x1e, 0xc7, 0xb3, 0x68, 0x18, 0x76, 0xd7, 0xdc, 0x84, + 0xdc, 0x62, 0x42, 0x02, 0x24, 0xb6, 0xab, 0x9c, 0x6d, 0xd7, 0x44, 0x96, 0x8a, 0x20, 0xcb, 0x9d, + 0x5f, 0x55, 0x88, 0x5e, 0x78, 0x64, 0x00, 0x2d, 0x2a, 0xbc, 0x5f, 0xc8, 0xff, 0x65, 0x0f, 0x1e, + 0x1d, 0xaf, 0x7b, 0x6a, 0xf9, 0x02, 0xf5, 0xc8, 0x7b, 0x68, 0x18, 0xf1, 0x65, 0x4f, 0xd6, 0x92, + 0x4b, 0x4d, 0xb8, 0xff, 0x7b, 0x24, 0x46, 0x85, 0xd7, 0xe4, 0x21, 0x90, 0x69, 0xe6, 0x72, 0x65, + 0xe2, 0x21, 0x1b, 0xf1, 0xce, 0xc2, 0x2d, 0xde, 0xeb, 0xcd, 0x5b, 0xa2, 0x1e, 0x19, 0x41, 0x3b, + 0x33, 0xd8, 0x49, 0x72, 0xdc, 0xfc, 0xdd, 0xd1, 0xdb, 0x98, 0xb3, 0x42, 0x3d, 0xb2, 0x0b, 0x2d, + 0x43, 0x18, 0x5b, 0x69, 0x31, 0x72, 0xc3, 0xac, 0x34, 0x9f, 0x01, 0x74, 0xfc, 0xec, 0x58, 0x22, + 0xc9, 0x89, 0x8b, 0xf3, 0xaa, 0xd4, 0xc5, 0x28, 0x37, 0x5c, 0xd3, 0x2c, 0xf2, 0x1d, 0x9d, 0x66, + 0x51, 0xec, 0xbd, 0x01, 0xb4, 0xa6, 0xc2, 0xd0, 0x49, 0xb3, 0xc8, 0x4d, 0xb5, 0x94, 0xd2, 0xc2, + 0x8c, 0xda, 0x85, 0x96, 0x29, 0x34, 0x5a, 0xea, 0x22, 0xd7, 0x7e, 0xa5, 0x59, 0x7c, 0x80, 0xa6, + 0x91, 0x36, 0x12, 0x59, 0x17, 0x8a, 0x88, 0x0f, 0x68, 0x62, 0x08, 0x5d, 0x9a, 0xeb, 0x09, 0xf2, + 0x22, 0x15, 0x5e, 0xa1, 0x5b, 0xca, 0x9c, 0xec, 0x75, 0xbe, 0xb4, 0x43, 0x70, 0x37, 0xfc, 0x39, + 0xaf, 0xf1, 0x3f, 0x35, 0xef, 0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0xbd, 0x0d, 0xba, 0x52, 0xeb, + 0x0c, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// FriendClient is the client API for Friend service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type FriendClient interface { + SearchFriend(ctx context.Context, in *SearchFriendReq, opts ...grpc.CallOption) (*SearchFriendResp, error) + AddFriend(ctx context.Context, in *AddFriendReq, opts ...grpc.CallOption) (*CommonResp, error) + GetFriendApplyList(ctx context.Context, in *GetFriendApplyReq, opts ...grpc.CallOption) (*GetFriendApplyResp, 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) + 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) + AddedFriend(ctx context.Context, in *AddedFriendReq, opts ...grpc.CallOption) (*CommonResp, error) + SetFriendComment(ctx context.Context, in *SetFriendCommentReq, opts ...grpc.CallOption) (*CommonResp, error) +} + +type friendClient struct { + cc *grpc.ClientConn +} + +func NewFriendClient(cc *grpc.ClientConn) FriendClient { + return &friendClient{cc} +} + +func (c *friendClient) SearchFriend(ctx context.Context, in *SearchFriendReq, opts ...grpc.CallOption) (*SearchFriendResp, error) { + out := new(SearchFriendResp) + err := c.cc.Invoke(ctx, "/friend.friend/searchFriend", in, out, 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) + err := c.cc.Invoke(ctx, "/friend.friend/addFriend", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *friendClient) GetFriendApplyList(ctx context.Context, in *GetFriendApplyReq, opts ...grpc.CallOption) (*GetFriendApplyResp, error) { + out := new(GetFriendApplyResp) + err := c.cc.Invoke(ctx, "/friend.friend/getFriendApplyList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *friendClient) GetFriendList(ctx context.Context, in *GetFriendListReq, opts ...grpc.CallOption) (*GetFriendListResp, error) { + out := new(GetFriendListResp) + err := c.cc.Invoke(ctx, "/friend.friend/getFriendList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *friendClient) AddBlacklist(ctx context.Context, in *AddBlacklistReq, opts ...grpc.CallOption) (*CommonResp, error) { + out := new(CommonResp) + err := c.cc.Invoke(ctx, "/friend.friend/addBlacklist", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *friendClient) RemoveBlacklist(ctx context.Context, in *RemoveBlacklistReq, opts ...grpc.CallOption) (*CommonResp, error) { + out := new(CommonResp) + err := c.cc.Invoke(ctx, "/friend.friend/removeBlacklist", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *friendClient) IsInBlackList(ctx context.Context, in *IsInBlackListReq, opts ...grpc.CallOption) (*IsInBlackListResp, error) { + out := new(IsInBlackListResp) + err := c.cc.Invoke(ctx, "/friend.friend/isInBlackList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *friendClient) GetBlacklist(ctx context.Context, in *GetBlacklistReq, opts ...grpc.CallOption) (*GetBlacklistResp, error) { + out := new(GetBlacklistResp) + err := c.cc.Invoke(ctx, "/friend.friend/getBlacklist", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *friendClient) DeleteFriend(ctx context.Context, in *DeleteFriendReq, opts ...grpc.CallOption) (*CommonResp, error) { + out := new(CommonResp) + err := c.cc.Invoke(ctx, "/friend.friend/deleteFriend", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *friendClient) AddedFriend(ctx context.Context, in *AddedFriendReq, opts ...grpc.CallOption) (*CommonResp, error) { + out := new(CommonResp) + err := c.cc.Invoke(ctx, "/friend.friend/addedFriend", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *friendClient) SetFriendComment(ctx context.Context, in *SetFriendCommentReq, opts ...grpc.CallOption) (*CommonResp, error) { + out := new(CommonResp) + err := c.cc.Invoke(ctx, "/friend.friend/setFriendComment", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// FriendServer is the server API for Friend service. +type FriendServer interface { + SearchFriend(context.Context, *SearchFriendReq) (*SearchFriendResp, error) + AddFriend(context.Context, *AddFriendReq) (*CommonResp, error) + GetFriendApplyList(context.Context, *GetFriendApplyReq) (*GetFriendApplyResp, error) + GetFriendList(context.Context, *GetFriendListReq) (*GetFriendListResp, error) + AddBlacklist(context.Context, *AddBlacklistReq) (*CommonResp, error) + RemoveBlacklist(context.Context, *RemoveBlacklistReq) (*CommonResp, error) + IsInBlackList(context.Context, *IsInBlackListReq) (*IsInBlackListResp, error) + GetBlacklist(context.Context, *GetBlacklistReq) (*GetBlacklistResp, error) + DeleteFriend(context.Context, *DeleteFriendReq) (*CommonResp, error) + AddedFriend(context.Context, *AddedFriendReq) (*CommonResp, error) + SetFriendComment(context.Context, *SetFriendCommentReq) (*CommonResp, error) +} + +// UnimplementedFriendServer can be embedded to have forward compatible implementations. +type UnimplementedFriendServer struct { +} + +func (*UnimplementedFriendServer) SearchFriend(ctx context.Context, req *SearchFriendReq) (*SearchFriendResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method SearchFriend not implemented") +} +func (*UnimplementedFriendServer) AddFriend(ctx context.Context, req *AddFriendReq) (*CommonResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddFriend not implemented") +} +func (*UnimplementedFriendServer) GetFriendApplyList(ctx context.Context, req *GetFriendApplyReq) (*GetFriendApplyResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetFriendApplyList not implemented") +} +func (*UnimplementedFriendServer) GetFriendList(ctx context.Context, req *GetFriendListReq) (*GetFriendListResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetFriendList not implemented") +} +func (*UnimplementedFriendServer) AddBlacklist(ctx context.Context, req *AddBlacklistReq) (*CommonResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddBlacklist not implemented") +} +func (*UnimplementedFriendServer) RemoveBlacklist(ctx context.Context, req *RemoveBlacklistReq) (*CommonResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveBlacklist not implemented") +} +func (*UnimplementedFriendServer) IsInBlackList(ctx context.Context, req *IsInBlackListReq) (*IsInBlackListResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method IsInBlackList not implemented") +} +func (*UnimplementedFriendServer) GetBlacklist(ctx context.Context, req *GetBlacklistReq) (*GetBlacklistResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlacklist not implemented") +} +func (*UnimplementedFriendServer) DeleteFriend(ctx context.Context, req *DeleteFriendReq) (*CommonResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteFriend not implemented") +} +func (*UnimplementedFriendServer) AddedFriend(ctx context.Context, req *AddedFriendReq) (*CommonResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddedFriend not implemented") +} +func (*UnimplementedFriendServer) SetFriendComment(ctx context.Context, req *SetFriendCommentReq) (*CommonResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetFriendComment not implemented") +} + +func RegisterFriendServer(s *grpc.Server, srv FriendServer) { + s.RegisterService(&_Friend_serviceDesc, srv) +} + +func _Friend_SearchFriend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchFriendReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FriendServer).SearchFriend(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/friend.friend/SearchFriend", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FriendServer).SearchFriend(ctx, req.(*SearchFriendReq)) + } + 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 { + return nil, err + } + if interceptor == nil { + return srv.(FriendServer).AddFriend(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/friend.friend/AddFriend", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FriendServer).AddFriend(ctx, req.(*AddFriendReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Friend_GetFriendApplyList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetFriendApplyReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FriendServer).GetFriendApplyList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/friend.friend/GetFriendApplyList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FriendServer).GetFriendApplyList(ctx, req.(*GetFriendApplyReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Friend_GetFriendList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetFriendListReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FriendServer).GetFriendList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/friend.friend/GetFriendList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FriendServer).GetFriendList(ctx, req.(*GetFriendListReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Friend_AddBlacklist_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddBlacklistReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FriendServer).AddBlacklist(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/friend.friend/AddBlacklist", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FriendServer).AddBlacklist(ctx, req.(*AddBlacklistReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Friend_RemoveBlacklist_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveBlacklistReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FriendServer).RemoveBlacklist(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/friend.friend/RemoveBlacklist", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FriendServer).RemoveBlacklist(ctx, req.(*RemoveBlacklistReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Friend_IsInBlackList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsInBlackListReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FriendServer).IsInBlackList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/friend.friend/IsInBlackList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FriendServer).IsInBlackList(ctx, req.(*IsInBlackListReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Friend_GetBlacklist_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBlacklistReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FriendServer).GetBlacklist(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/friend.friend/GetBlacklist", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FriendServer).GetBlacklist(ctx, req.(*GetBlacklistReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Friend_DeleteFriend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteFriendReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FriendServer).DeleteFriend(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/friend.friend/DeleteFriend", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FriendServer).DeleteFriend(ctx, req.(*DeleteFriendReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Friend_AddedFriend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddedFriendReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FriendServer).AddedFriend(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/friend.friend/AddedFriend", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FriendServer).AddedFriend(ctx, req.(*AddedFriendReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Friend_SetFriendComment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetFriendCommentReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FriendServer).SetFriendComment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/friend.friend/SetFriendComment", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FriendServer).SetFriendComment(ctx, req.(*SetFriendCommentReq)) + } + return interceptor(ctx, in, info, handler) +} + +var _Friend_serviceDesc = grpc.ServiceDesc{ + ServiceName: "friend.friend", + HandlerType: (*FriendServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "searchFriend", + Handler: _Friend_SearchFriend_Handler, + }, + { + MethodName: "addFriend", + Handler: _Friend_AddFriend_Handler, + }, + { + MethodName: "getFriendApplyList", + Handler: _Friend_GetFriendApplyList_Handler, + }, + { + MethodName: "getFriendList", + Handler: _Friend_GetFriendList_Handler, + }, + { + MethodName: "addBlacklist", + Handler: _Friend_AddBlacklist_Handler, + }, + { + MethodName: "removeBlacklist", + Handler: _Friend_RemoveBlacklist_Handler, + }, + { + MethodName: "isInBlackList", + Handler: _Friend_IsInBlackList_Handler, + }, + { + MethodName: "getBlacklist", + Handler: _Friend_GetBlacklist_Handler, + }, + { + MethodName: "deleteFriend", + Handler: _Friend_DeleteFriend_Handler, + }, + { + MethodName: "addedFriend", + Handler: _Friend_AddedFriend_Handler, + }, + { + MethodName: "setFriendComment", + Handler: _Friend_SetFriendComment_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "friend/friend.proto", +} diff --git a/src/proto/friend/friend.proto b/src/proto/friend/friend.proto new file mode 100644 index 000000000..eb69dff2e --- /dev/null +++ b/src/proto/friend/friend.proto @@ -0,0 +1,159 @@ +syntax = "proto3"; +option go_package = "friend;friend"; +package friend; + +message CommonResp{ + int32 errorCode = 1; + string errorMsg = 2; +} + +message SearchFriendReq{ + string uid = 1; + string OperationID = 2; + string Token = 3; +} +message SearchFriendResp{ + int32 errorCode = 1; + string errorMsg = 2; + SearchFriendData Data = 3; +} + +message SearchFriendData{ + string uid = 1; + string icon = 2; + string name = 3; + int32 gender = 4; + string mobile = 5; + string birth = 6; + string email = 7; + string ex = 8; + string comment = 9; + int32 isFriend = 10; + int32 isInBlackList = 11; +} + +message AddFriendReq{ + string uid = 1; + string OperationID = 2; + string Token = 3; + string ReqMessage = 4; +} + + +message GetFriendApplyReq{ + string OperationID = 1; + string Token = 2; +} +message GetFriendApplyResp{ + int32 errorCode = 1; + string errorMsg = 2; + repeated ApplyUserInfo data = 4; +} + +message ApplyUserInfo{ + string uid = 1; + string name = 2; + string icon = 3; + int32 gender = 4; + string mobile = 5; + string birth = 6; + string email = 7; + string ex = 8; + int32 flag = 9; + string applyTime = 10; + string reqMessage = 11; +} + + +message getFriendListReq{ + string OperationID = 1; + string Token = 2; +} +message getFriendListResp{ + int32 errorCode = 1; + string errorMsg = 2; + repeated UserInfo data = 3; +} +message UserInfo{ + string uid = 1; + string name = 3; + string icon = 2; + int32 gender = 4; + string mobile = 5; + string birth = 6; + string email = 7; + string ex = 8; + string comment = 9; + int32 isInBlackList = 10; +} + +message AddBlacklistReq{ + string uid = 1; + string OperationID = 2; + string Token = 3; +} + + +message RemoveBlacklistReq{ + string uid = 1; + string OperationID = 2; + string Token = 3; +} + + +message GetBlacklistReq{ + string OperationID = 1; + string token = 2; +} +message GetBlacklistResp{ + int32 errorCode = 1; + string errorMsg = 2; + repeated UserInfo data = 3; +} + + +message IsInBlackListReq{ + string sendUid = 1; + string receiveUid = 2; + string OperationID = 3; +} +message IsInBlackListResp{ + int32 errorCode = 1; + string errorMsg = 2; + bool response = 3; +} + +message DeleteFriendReq{ + string uid = 1; + string OperationID = 2; + string Token = 3; +} + + +message AddedFriendReq{ + string uid = 1; + int32 flag = 2; + string OperationID = 3; + string Token = 4; +} + +message SetFriendCommentReq{ + string uid = 1; + string operationID = 2; + string comment = 3; + string token = 4; +} + +service friend{ + rpc searchFriend(SearchFriendReq) returns(SearchFriendResp); + rpc addFriend(AddFriendReq) returns(CommonResp); + rpc getFriendApplyList(GetFriendApplyReq) returns(GetFriendApplyResp); + rpc getFriendList(getFriendListReq) returns(getFriendListResp); + rpc addBlacklist(AddBlacklistReq) returns(CommonResp); + rpc removeBlacklist(RemoveBlacklistReq) returns(CommonResp); + rpc isInBlackList(IsInBlackListReq) returns(IsInBlackListResp); + rpc getBlacklist(GetBlacklistReq) returns(GetBlacklistResp); + rpc deleteFriend(DeleteFriendReq) returns(CommonResp); + rpc addedFriend(AddedFriendReq) returns(CommonResp); + rpc setFriendComment(SetFriendCommentReq) returns(CommonResp); +} \ No newline at end of file From cf82b4fc6f7cd7db1e0e85f64363d17a0e5f34d7 Mon Sep 17 00:00:00 2001 From: away <1819625428@qq.com> Date: Wed, 26 May 2021 19:44:49 +0800 Subject: [PATCH 8/9] user proto initial commit --- src/proto/user/user.pb.go | 584 ++++++++++++++++++++++++++++++++++++++ src/proto/user/user.proto | 52 ++++ 2 files changed, 636 insertions(+) create mode 100644 src/proto/user/user.pb.go create mode 100644 src/proto/user/user.proto diff --git a/src/proto/user/user.pb.go b/src/proto/user/user.pb.go new file mode 100644 index 000000000..7aa964a06 --- /dev/null +++ b/src/proto/user/user.pb.go @@ -0,0 +1,584 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: user/user.proto + +package user + +import ( + context "context" + fmt "fmt" + proto "github.com/golang/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type CommonResp struct { + ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode,proto3" json:"errorCode,omitempty"` + ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg,proto3" json:"errorMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CommonResp) Reset() { *m = CommonResp{} } +func (m *CommonResp) String() string { return proto.CompactTextString(m) } +func (*CommonResp) ProtoMessage() {} +func (*CommonResp) Descriptor() ([]byte, []int) { + return fileDescriptor_ed89022014131a74, []int{0} +} + +func (m *CommonResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CommonResp.Unmarshal(m, b) +} +func (m *CommonResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CommonResp.Marshal(b, m, deterministic) +} +func (m *CommonResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommonResp.Merge(m, src) +} +func (m *CommonResp) XXX_Size() int { + return xxx_messageInfo_CommonResp.Size(m) +} +func (m *CommonResp) XXX_DiscardUnknown() { + xxx_messageInfo_CommonResp.DiscardUnknown(m) +} + +var xxx_messageInfo_CommonResp proto.InternalMessageInfo + +func (m *CommonResp) GetErrorCode() int32 { + if m != nil { + return m.ErrorCode + } + return 0 +} + +func (m *CommonResp) GetErrorMsg() string { + if m != nil { + return m.ErrorMsg + } + return "" +} + +type GetUserInfoReq struct { + UserIDList []string `protobuf:"bytes,1,rep,name=userIDList,proto3" json:"userIDList,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + OperationID string `protobuf:"bytes,3,opt,name=OperationID,proto3" json:"OperationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetUserInfoReq) Reset() { *m = GetUserInfoReq{} } +func (m *GetUserInfoReq) String() string { return proto.CompactTextString(m) } +func (*GetUserInfoReq) ProtoMessage() {} +func (*GetUserInfoReq) Descriptor() ([]byte, []int) { + return fileDescriptor_ed89022014131a74, []int{1} +} + +func (m *GetUserInfoReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetUserInfoReq.Unmarshal(m, b) +} +func (m *GetUserInfoReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetUserInfoReq.Marshal(b, m, deterministic) +} +func (m *GetUserInfoReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetUserInfoReq.Merge(m, src) +} +func (m *GetUserInfoReq) XXX_Size() int { + return xxx_messageInfo_GetUserInfoReq.Size(m) +} +func (m *GetUserInfoReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetUserInfoReq.DiscardUnknown(m) +} + +var xxx_messageInfo_GetUserInfoReq proto.InternalMessageInfo + +func (m *GetUserInfoReq) GetUserIDList() []string { + if m != nil { + return m.UserIDList + } + return nil +} + +func (m *GetUserInfoReq) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +func (m *GetUserInfoReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +type GetUserInfoResp struct { + ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode,proto3" json:"errorCode,omitempty"` + ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg,proto3" json:"errorMsg,omitempty"` + Data []*UserInfo `protobuf:"bytes,3,rep,name=Data,proto3" json:"Data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetUserInfoResp) Reset() { *m = GetUserInfoResp{} } +func (m *GetUserInfoResp) String() string { return proto.CompactTextString(m) } +func (*GetUserInfoResp) ProtoMessage() {} +func (*GetUserInfoResp) Descriptor() ([]byte, []int) { + return fileDescriptor_ed89022014131a74, []int{2} +} + +func (m *GetUserInfoResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetUserInfoResp.Unmarshal(m, b) +} +func (m *GetUserInfoResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetUserInfoResp.Marshal(b, m, deterministic) +} +func (m *GetUserInfoResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetUserInfoResp.Merge(m, src) +} +func (m *GetUserInfoResp) XXX_Size() int { + return xxx_messageInfo_GetUserInfoResp.Size(m) +} +func (m *GetUserInfoResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetUserInfoResp.DiscardUnknown(m) +} + +var xxx_messageInfo_GetUserInfoResp proto.InternalMessageInfo + +func (m *GetUserInfoResp) GetErrorCode() int32 { + if m != nil { + return m.ErrorCode + } + return 0 +} + +func (m *GetUserInfoResp) GetErrorMsg() string { + if m != nil { + return m.ErrorMsg + } + return "" +} + +func (m *GetUserInfoResp) GetData() []*UserInfo { + if m != nil { + return m.Data + } + return nil +} + +type UserInfo struct { + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Icon string `protobuf:"bytes,3,opt,name=icon,proto3" json:"icon,omitempty"` + Gender int32 `protobuf:"varint,4,opt,name=gender,proto3" json:"gender,omitempty"` + Mobile string `protobuf:"bytes,5,opt,name=mobile,proto3" json:"mobile,omitempty"` + Birth string `protobuf:"bytes,6,opt,name=birth,proto3" json:"birth,omitempty"` + Email string `protobuf:"bytes,7,opt,name=email,proto3" json:"email,omitempty"` + Ex string `protobuf:"bytes,8,opt,name=ex,proto3" json:"ex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +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_ed89022014131a74, []int{3} +} + +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 (m *UserInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserInfo.Merge(m, src) +} +func (m *UserInfo) XXX_Size() int { + return xxx_messageInfo_UserInfo.Size(m) +} +func (m *UserInfo) XXX_DiscardUnknown() { + xxx_messageInfo_UserInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_UserInfo proto.InternalMessageInfo + +func (m *UserInfo) GetUid() string { + if m != nil { + return m.Uid + } + return "" +} + +func (m *UserInfo) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *UserInfo) GetIcon() string { + if m != nil { + return m.Icon + } + return "" +} + +func (m *UserInfo) GetGender() int32 { + if m != nil { + return m.Gender + } + return 0 +} + +func (m *UserInfo) GetMobile() string { + if m != nil { + return m.Mobile + } + return "" +} + +func (m *UserInfo) GetBirth() string { + if m != nil { + return m.Birth + } + return "" +} + +func (m *UserInfo) GetEmail() string { + if m != nil { + return m.Email + } + return "" +} + +func (m *UserInfo) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +type LogoutReq struct { + OperationID string `protobuf:"bytes,1,opt,name=OperationID,proto3" json:"OperationID,omitempty"` + Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LogoutReq) Reset() { *m = LogoutReq{} } +func (m *LogoutReq) String() string { return proto.CompactTextString(m) } +func (*LogoutReq) ProtoMessage() {} +func (*LogoutReq) Descriptor() ([]byte, []int) { + return fileDescriptor_ed89022014131a74, []int{4} +} + +func (m *LogoutReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LogoutReq.Unmarshal(m, b) +} +func (m *LogoutReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LogoutReq.Marshal(b, m, deterministic) +} +func (m *LogoutReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_LogoutReq.Merge(m, src) +} +func (m *LogoutReq) XXX_Size() int { + return xxx_messageInfo_LogoutReq.Size(m) +} +func (m *LogoutReq) XXX_DiscardUnknown() { + xxx_messageInfo_LogoutReq.DiscardUnknown(m) +} + +var xxx_messageInfo_LogoutReq proto.InternalMessageInfo + +func (m *LogoutReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *LogoutReq) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +type UpdateUserInfoReq struct { + Icon string `protobuf:"bytes,1,opt,name=icon,proto3" json:"icon,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Gender int32 `protobuf:"varint,3,opt,name=gender,proto3" json:"gender,omitempty"` + Mobile string `protobuf:"bytes,4,opt,name=mobile,proto3" json:"mobile,omitempty"` + Birth string `protobuf:"bytes,5,opt,name=birth,proto3" json:"birth,omitempty"` + Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"` + Ex string `protobuf:"bytes,7,opt,name=ex,proto3" json:"ex,omitempty"` + Token string `protobuf:"bytes,8,opt,name=token,proto3" json:"token,omitempty"` + OperationID string `protobuf:"bytes,9,opt,name=OperationID,proto3" json:"OperationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpdateUserInfoReq) Reset() { *m = UpdateUserInfoReq{} } +func (m *UpdateUserInfoReq) String() string { return proto.CompactTextString(m) } +func (*UpdateUserInfoReq) ProtoMessage() {} +func (*UpdateUserInfoReq) Descriptor() ([]byte, []int) { + return fileDescriptor_ed89022014131a74, []int{5} +} + +func (m *UpdateUserInfoReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpdateUserInfoReq.Unmarshal(m, b) +} +func (m *UpdateUserInfoReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpdateUserInfoReq.Marshal(b, m, deterministic) +} +func (m *UpdateUserInfoReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateUserInfoReq.Merge(m, src) +} +func (m *UpdateUserInfoReq) XXX_Size() int { + return xxx_messageInfo_UpdateUserInfoReq.Size(m) +} +func (m *UpdateUserInfoReq) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateUserInfoReq.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateUserInfoReq proto.InternalMessageInfo + +func (m *UpdateUserInfoReq) GetIcon() string { + if m != nil { + return m.Icon + } + return "" +} + +func (m *UpdateUserInfoReq) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *UpdateUserInfoReq) GetGender() int32 { + if m != nil { + return m.Gender + } + return 0 +} + +func (m *UpdateUserInfoReq) GetMobile() string { + if m != nil { + return m.Mobile + } + return "" +} + +func (m *UpdateUserInfoReq) GetBirth() string { + if m != nil { + return m.Birth + } + return "" +} + +func (m *UpdateUserInfoReq) GetEmail() string { + if m != nil { + return m.Email + } + return "" +} + +func (m *UpdateUserInfoReq) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +func (m *UpdateUserInfoReq) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +func (m *UpdateUserInfoReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func init() { + proto.RegisterType((*CommonResp)(nil), "user.CommonResp") + proto.RegisterType((*GetUserInfoReq)(nil), "user.GetUserInfoReq") + proto.RegisterType((*GetUserInfoResp)(nil), "user.GetUserInfoResp") + proto.RegisterType((*UserInfo)(nil), "user.UserInfo") + proto.RegisterType((*LogoutReq)(nil), "user.LogoutReq") + proto.RegisterType((*UpdateUserInfoReq)(nil), "user.UpdateUserInfoReq") +} + +func init() { proto.RegisterFile("user/user.proto", fileDescriptor_ed89022014131a74) } + +var fileDescriptor_ed89022014131a74 = []byte{ + // 416 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0x4d, 0x8b, 0xd4, 0x40, + 0x10, 0xa5, 0x27, 0x1f, 0x9b, 0x54, 0x20, 0xbb, 0x16, 0xab, 0x36, 0x83, 0x48, 0xc8, 0x29, 0xa7, + 0x15, 0xd6, 0x9b, 0x7b, 0x73, 0x06, 0x65, 0x60, 0x45, 0x08, 0xec, 0xc5, 0x5b, 0xc6, 0x94, 0x99, + 0xe0, 0x24, 0x1d, 0x3b, 0x3d, 0x30, 0x37, 0xff, 0x92, 0xff, 0xc8, 0xbf, 0x22, 0xdd, 0xc9, 0x4c, + 0x32, 0x33, 0xd1, 0x8b, 0x97, 0x50, 0xef, 0x75, 0xa8, 0xaa, 0xf7, 0xaa, 0x0a, 0xae, 0x77, 0x2d, + 0xc9, 0x37, 0xfa, 0x73, 0xd7, 0x48, 0xa1, 0x04, 0xda, 0x3a, 0x8e, 0x3f, 0x00, 0x2c, 0x44, 0x55, + 0x89, 0x3a, 0xa5, 0xb6, 0xc1, 0x57, 0xe0, 0x93, 0x94, 0x42, 0x2e, 0x44, 0x4e, 0x9c, 0x45, 0x2c, + 0x71, 0xd2, 0x81, 0xc0, 0x39, 0x78, 0x06, 0x7c, 0x6a, 0x0b, 0x3e, 0x8b, 0x58, 0xe2, 0xa7, 0x47, + 0x1c, 0x6f, 0x20, 0xfc, 0x48, 0xea, 0xa9, 0x25, 0xb9, 0xaa, 0xbf, 0x89, 0x94, 0x7e, 0xe0, 0x6b, + 0x00, 0x5d, 0x61, 0xb5, 0x7c, 0x2c, 0x5b, 0xc5, 0x59, 0x64, 0x25, 0x7e, 0x3a, 0x62, 0xf0, 0x16, + 0x1c, 0x25, 0xbe, 0x53, 0xdd, 0xa7, 0xea, 0x00, 0x46, 0x10, 0x7c, 0x6e, 0x48, 0x66, 0xaa, 0x14, + 0xf5, 0x6a, 0xc9, 0x2d, 0xf3, 0x36, 0xa6, 0x62, 0x01, 0xd7, 0x27, 0x95, 0xfe, 0xa7, 0x6d, 0x8c, + 0xc1, 0x5e, 0x66, 0x2a, 0xe3, 0x56, 0x64, 0x25, 0xc1, 0x7d, 0x78, 0x67, 0xfc, 0x39, 0xe6, 0x36, + 0x6f, 0xf1, 0x2f, 0x06, 0xde, 0x81, 0xc2, 0x1b, 0xb0, 0x76, 0x65, 0x6e, 0x8a, 0xf8, 0xa9, 0x0e, + 0x11, 0xc1, 0xae, 0xb3, 0x8a, 0xfa, 0xd4, 0x26, 0xd6, 0x5c, 0xf9, 0x55, 0xd4, 0x7d, 0xfb, 0x26, + 0xc6, 0x17, 0xe0, 0x16, 0x54, 0xe7, 0x24, 0xb9, 0x6d, 0x3a, 0xec, 0x91, 0xe6, 0x2b, 0xb1, 0x2e, + 0xb7, 0xc4, 0x1d, 0xf3, 0x77, 0x8f, 0xb4, 0x3f, 0xeb, 0x52, 0xaa, 0x0d, 0x77, 0x3b, 0x7f, 0x0c, + 0xd0, 0x2c, 0x55, 0x59, 0xb9, 0xe5, 0x57, 0x1d, 0x6b, 0x00, 0x86, 0x30, 0xa3, 0x3d, 0xf7, 0x0c, + 0x35, 0xa3, 0x7d, 0xbc, 0x00, 0xff, 0x51, 0x14, 0x62, 0xa7, 0xf4, 0x20, 0xce, 0x2c, 0x65, 0x17, + 0x96, 0x4e, 0x8f, 0x22, 0xfe, 0xcd, 0xe0, 0xd9, 0x53, 0x93, 0x67, 0x8a, 0xc6, 0x63, 0x3d, 0x48, + 0x63, 0x23, 0x69, 0x53, 0x16, 0x0c, 0x72, 0xad, 0xbf, 0xc8, 0xb5, 0xa7, 0xe5, 0x3a, 0x93, 0x72, + 0xdd, 0x4b, 0xb9, 0x57, 0x07, 0xb9, 0x43, 0xff, 0xde, 0x3f, 0x56, 0xc9, 0xbf, 0xd0, 0x7d, 0xff, + 0x13, 0xcc, 0x11, 0xe0, 0x3b, 0x08, 0x8a, 0x61, 0xa5, 0xf0, 0xb6, 0x5b, 0x83, 0xd3, 0x7d, 0x9e, + 0x3f, 0x9f, 0x60, 0xdb, 0x06, 0x1f, 0x20, 0x3c, 0x35, 0x09, 0x5f, 0xf6, 0x5b, 0x74, 0x6e, 0xdd, + 0xfc, 0xa6, 0x7b, 0x18, 0xee, 0xed, 0x7d, 0xf0, 0xc5, 0xd7, 0xd4, 0x83, 0xfe, 0xac, 0x5d, 0x73, + 0x97, 0x6f, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xf8, 0x6d, 0x34, 0xa2, 0xaa, 0x03, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// UserClient is the client API for User service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type UserClient interface { + GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error) + UpdateUserInfo(ctx context.Context, in *UpdateUserInfoReq, opts ...grpc.CallOption) (*CommonResp, error) +} + +type userClient struct { + cc *grpc.ClientConn +} + +func NewUserClient(cc *grpc.ClientConn) UserClient { + return &userClient{cc} +} + +func (c *userClient) GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error) { + out := new(GetUserInfoResp) + err := c.cc.Invoke(ctx, "/user.user/getUserInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userClient) UpdateUserInfo(ctx context.Context, in *UpdateUserInfoReq, opts ...grpc.CallOption) (*CommonResp, error) { + out := new(CommonResp) + err := c.cc.Invoke(ctx, "/user.user/UpdateUserInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// UserServer is the server API for User service. +type UserServer interface { + GetUserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoResp, error) + UpdateUserInfo(context.Context, *UpdateUserInfoReq) (*CommonResp, error) +} + +// UnimplementedUserServer can be embedded to have forward compatible implementations. +type UnimplementedUserServer struct { +} + +func (*UnimplementedUserServer) GetUserInfo(ctx context.Context, req *GetUserInfoReq) (*GetUserInfoResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUserInfo not implemented") +} +func (*UnimplementedUserServer) UpdateUserInfo(ctx context.Context, req *UpdateUserInfoReq) (*CommonResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateUserInfo not implemented") +} + +func RegisterUserServer(s *grpc.Server, srv UserServer) { + s.RegisterService(&_User_serviceDesc, srv) +} + +func _User_GetUserInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUserInfoReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServer).GetUserInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/user.user/GetUserInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServer).GetUserInfo(ctx, req.(*GetUserInfoReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _User_UpdateUserInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateUserInfoReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServer).UpdateUserInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/user.user/UpdateUserInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServer).UpdateUserInfo(ctx, req.(*UpdateUserInfoReq)) + } + return interceptor(ctx, in, info, handler) +} + +var _User_serviceDesc = grpc.ServiceDesc{ + ServiceName: "user.user", + HandlerType: (*UserServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "getUserInfo", + Handler: _User_GetUserInfo_Handler, + }, + { + MethodName: "UpdateUserInfo", + Handler: _User_UpdateUserInfo_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "user/user.proto", +} diff --git a/src/proto/user/user.proto b/src/proto/user/user.proto new file mode 100644 index 000000000..0046442c4 --- /dev/null +++ b/src/proto/user/user.proto @@ -0,0 +1,52 @@ +syntax = "proto3"; +option go_package = "user;user"; +package user; + +message CommonResp{ + int32 errorCode = 1; + string errorMsg = 2; +} + +message GetUserInfoReq{ + repeated string userIDList = 1; + string token = 2; + string OperationID = 3; +} +message GetUserInfoResp{ + int32 errorCode = 1; + string errorMsg = 2; + repeated UserInfo Data = 3; +} +message UserInfo{ + string uid = 1; + string name = 2; + string icon = 3; + int32 gender = 4; + string mobile = 5; + string birth = 6; + string email = 7; + string ex = 8; +} + + +message LogoutReq{ + string OperationID = 1; + string token = 2; +} + +message UpdateUserInfoReq{ + string icon = 1; + string name = 2; + int32 gender = 3; + string mobile = 4; + string birth = 5; + string email = 6; + string ex = 7; + string token = 8; + string OperationID = 9; +} + +service user { + rpc getUserInfo(GetUserInfoReq) returns(GetUserInfoResp); + rpc UpdateUserInfo(UpdateUserInfoReq) returns(CommonResp); +} From 2f7d0c656eb7b03df881c5c802084e03bd05c4d7 Mon Sep 17 00:00:00 2001 From: skiffer-git <72860476+skiffer-git@users.noreply.github.com> Date: Wed, 26 May 2021 19:52:17 +0800 Subject: [PATCH 9/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 658a8cd32..40901f3d2 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Open-IM-Server is open source instant messaging Server.Backend in Go. ![avatar](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/Open-IM.png) -[![LICENSE](https://img.shields.io/github/license/pingcap/tidb.svg)](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/LICENSE) +[![LICENSE](https://img.shields.io/badge/license-Apache--2.0-green)](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/LICENSE) [![Language](https://img.shields.io/badge/Language-Go-blue.svg)](https://golang.org/) ## Open-IM-Server: Open source Instant Messaging Server