diff --git a/cmd/robot/friend.go b/cmd/robot/friend.go index 5d2d6acc3..48c584985 100644 --- a/cmd/robot/friend.go +++ b/cmd/robot/friend.go @@ -30,7 +30,7 @@ func (r *Robot) handleFriendMsg(msg *pb.UserMessage) { //好友列表 func (r *Robot) FriendList() { - req := &pb.FriendListReq{} + req := &pb.Friend_List_Req{} head := &pb.UserMessage{MainType: string(comm.SM_FriendModule), SubType: friend.Friend_SubType_List} defer traceFunc(head.MainType, head.SubType, r.user.GetUid(), req) err := r.SendToClient(head, req) @@ -40,7 +40,7 @@ func (r *Robot) FriendList() { } func (r *Robot) handleFriendList(msg *pb.UserMessage) { - rsp := &pb.FriendListRsp{} + rsp := &pb.Friend_List_Rsp{} if !comm.ProtoDecode(msg, rsp) { return } @@ -49,7 +49,7 @@ func (r *Robot) handleFriendList(msg *pb.UserMessage) { //好友搜索 func (r *Robot) FriendSearch(nickName string) { - req := &pb.FriendSearchReq{ + req := &pb.Friend_Search_Req{ NickName: nickName, } head := &pb.UserMessage{MainType: string(comm.SM_FriendModule), SubType: friend.Friend_SubType_Search} @@ -61,7 +61,7 @@ func (r *Robot) FriendSearch(nickName string) { } func (r *Robot) handleFriendSearch(msg *pb.UserMessage) { - rsp := &pb.FriendSearchRsp{} + rsp := &pb.Friend_Search_Rsp{} if !comm.ProtoDecode(msg, rsp) { return } @@ -70,7 +70,7 @@ func (r *Robot) handleFriendSearch(msg *pb.UserMessage) { //好友申请 func (r *Robot) FriendApply(friendId string) { - req := &pb.FriendApplyReq{ + req := &pb.Friend_Apply_Req{ FriendId: friendId, } head := &pb.UserMessage{MainType: string(comm.SM_FriendModule), SubType: friend.Friend_SubType_Apply} @@ -82,7 +82,7 @@ func (r *Robot) FriendApply(friendId string) { } func (r *Robot) handleFriendApply(msg *pb.UserMessage) { - rsp := &pb.FriendApplyRsp{} + rsp := &pb.Friend_Apply_Rsp{} if !comm.ProtoDecode(msg, rsp) { return } @@ -91,7 +91,7 @@ func (r *Robot) handleFriendApply(msg *pb.UserMessage) { //申请列表 func (r *Robot) FriendApplyList() { - req := &pb.FriendApplyListReq{} + req := &pb.Friend_ApplyList_Req{} head := &pb.UserMessage{MainType: string(comm.SM_FriendModule), SubType: friend.Friend_SubType_ApplyList} defer traceFunc(head.MainType, head.SubType, r.user.GetUid(), req) err := r.SendToClient(head, req) @@ -101,7 +101,7 @@ func (r *Robot) FriendApplyList() { } func (r *Robot) handleFriendApplyList(msg *pb.UserMessage) { - rsp := &pb.FriendApplyListRsp{} + rsp := &pb.Friend_ApplyList_Rsp{} if !comm.ProtoDecode(msg, rsp) { return } @@ -110,7 +110,7 @@ func (r *Robot) handleFriendApplyList(msg *pb.UserMessage) { //同意 func (r *Robot) FriendAgree(friendIds []string) { - req := &pb.FriendAgreeReq{ + req := &pb.Friend_Agree_Req{ FriendIds: friendIds, } head := &pb.UserMessage{MainType: string(comm.SM_FriendModule), SubType: friend.Friend_SubType_Agree} @@ -122,7 +122,7 @@ func (r *Robot) FriendAgree(friendIds []string) { } func (r *Robot) handleFriendAgree(msg *pb.UserMessage) { - rsp := &pb.FriendAgreeRsp{} + rsp := &pb.Friend_Agree_Rsp{} if !comm.ProtoDecode(msg, rsp) { return } @@ -131,7 +131,7 @@ func (r *Robot) handleFriendAgree(msg *pb.UserMessage) { //拒绝 func (r *Robot) FriendRefuse(friendIds []string) { - req := &pb.FriendRefuseReq{ + req := &pb.Friend_Refuse_Req{ FriendIds: friendIds, } head := &pb.UserMessage{MainType: string(comm.SM_FriendModule), SubType: friend.Friend_SubType_Refuse} @@ -143,7 +143,7 @@ func (r *Robot) FriendRefuse(friendIds []string) { } func (r *Robot) handleFriendRefuse(msg *pb.UserMessage) { - rsp := &pb.FriendRefuseRsp{} + rsp := &pb.Friend_Refuse_Rsp{} if !comm.ProtoDecode(msg, rsp) { return } @@ -152,7 +152,7 @@ func (r *Robot) handleFriendRefuse(msg *pb.UserMessage) { //黑名单列表 func (r *Robot) FriendBlacklist() { - req := &pb.FriendBlackListReq{} + req := &pb.Friend_BlackList_Req{} head := &pb.UserMessage{MainType: string(comm.SM_FriendModule), SubType: friend.Friend_SubType_Blacklist} defer traceFunc(head.MainType, head.SubType, r.user.GetUid(), req) err := r.SendToClient(head, req) @@ -162,7 +162,7 @@ func (r *Robot) FriendBlacklist() { } func (r *Robot) handleFriendBlacklist(msg *pb.UserMessage) { - rsp := &pb.FriendBlackListRsp{} + rsp := &pb.Friend_BlackList_Rsp{} if !comm.ProtoDecode(msg, rsp) { return } @@ -171,7 +171,7 @@ func (r *Robot) handleFriendBlacklist(msg *pb.UserMessage) { //添加黑名单 func (r *Robot) FriendAddBlack() { - req := &pb.FriendBlackAddReq{} + req := &pb.Friend_BlackAdd_Req{} head := &pb.UserMessage{MainType: string(comm.SM_FriendModule), SubType: friend.Friend_SubType_AddBlack} defer traceFunc(head.MainType, head.SubType, r.user.GetUid(), req) err := r.SendToClient(head, req) @@ -181,7 +181,7 @@ func (r *Robot) FriendAddBlack() { } func (r *Robot) handleFriendAddBlack(msg *pb.UserMessage) { - rsp := &pb.FriendBlackAddRsp{} + rsp := &pb.Friend_BlackAdd_Rsp{} if !comm.ProtoDecode(msg, rsp) { return } @@ -190,7 +190,7 @@ func (r *Robot) handleFriendAddBlack(msg *pb.UserMessage) { //删除黑名单 func (r *Robot) FriendDelBlack(friendId string) { - req := &pb.FriendDelBlackReq{ + req := &pb.Friend_DelBlack_Req{ FriendId: friendId, } head := &pb.UserMessage{MainType: string(comm.SM_FriendModule), SubType: friend.Friend_SubType_DelBlack} @@ -202,7 +202,7 @@ func (r *Robot) FriendDelBlack(friendId string) { } func (r *Robot) handleFriendDelBlack(msg *pb.UserMessage) { - rsp := &pb.FriendDelBlackRsp{} + rsp := &pb.Friend_DelBlack_Rsp{} if !comm.ProtoDecode(msg, rsp) { return } diff --git a/cmd/robot/login.go b/cmd/robot/login.go index 40defba3a..3cbddab02 100644 --- a/cmd/robot/login.go +++ b/cmd/robot/login.go @@ -49,5 +49,5 @@ func (r *Robot) AccountLogin() { log.Fatalf("send err:%v", err) } - log.Printf("account:[%s] login...", r.opts.Account) + log.Printf("区服:[%d] 账号:[%s] login...", r.opts.ServerId, r.opts.Account) } diff --git a/cmd/robot/robot.go b/cmd/robot/robot.go index 8217f2031..d133414f4 100644 --- a/cmd/robot/robot.go +++ b/cmd/robot/robot.go @@ -41,6 +41,9 @@ func (r *Robot) Run() { if r.opts.Create { //创建新用户 r.AccountRegister(r.opts.Account, int32(r.opts.ServerId)) } else { + if r.opts.Account == "" { + log.Fatal("WARNNING: account is required !!!") + } r.AccountLogin() } diff --git a/lego/sys/redis/sys_test.go b/lego/sys/redis/sys_test.go index 6fd3514fc..f78895062 100644 --- a/lego/sys/redis/sys_test.go +++ b/lego/sys/redis/sys_test.go @@ -159,9 +159,14 @@ func Test_Redis_Type(t *testing.T) { } } +type TestAny struct { + SubName string `json:"subname"` + Age int32 `json:"age"` +} type TestData struct { - Name string `json:"name"` - Agr int `json:"agr"` + Name string `json:"name"` + Agr int `json:"agr"` + Sub *TestAny `json:"sub"` } func Test_Redis_Encoder_Struct(t *testing.T) { @@ -177,15 +182,20 @@ func Test_Redis_Encoder_int(t *testing.T) { } func Test_Redis_Encoder_Hash(t *testing.T) { - // err := redis.HMSet("test:1003", &TestData{Name: "liwei1dao", Agr: 12}) + // err := redis.HMSet("test:1005", &TestData{Name: "liwei1dao", Agr: 12, Sub: &TestAny{SubName: "test", Age: 20}}) // fmt.Printf("err:%v\n", err) - data := &TestData{} - err := redis.HGetAll("test:1003", data) - fmt.Printf("data:%v err:%v\n", data, err) - // name := "" - // err := redis.HGet("test:1003", "Name", &name) - // fmt.Printf("name:%v err:%v", name, err) + // data := &TestData{} + // err = redis.HGetAll("test:1005", data) + // fmt.Printf("data:%v err:%v\n", data, err) + + // redis.HSet("test:1003", "Name", "eeee") + name := "" + err := redis.HGet("test:1003", "Name", &name) + if err != nil { + fmt.Println(err) + } + fmt.Println(name) // data1 := map[string]*TestData{"li_1": {Name: "liwei2dao", Agr: 56}, "li_2": {Name: "liwei3dao", Agr: 78}} // err := redis.HMSet("test:1004", data1) diff --git a/modules/friend/api_addblack.go b/modules/friend/api_addblack.go index 6533866a8..6180240ef 100644 --- a/modules/friend/api_addblack.go +++ b/modules/friend/api_addblack.go @@ -6,23 +6,23 @@ import ( "go_dreamfactory/utils" ) -func (this *ApiComp) Addblack_Check(session comm.IUserSession, req *pb.FriendBlackAddReq) (result map[string]interface{}, code pb.ErrorCode) { +func (this *ApiComp) Addblack_Check(session comm.IUserSession, req *pb.Friend_BlackAdd_Req) (result map[string]interface{}, code comm.ErrorCode) { return } //加入黑名单 -func (this *ApiComp) Addblack(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendBlackAddReq) (err error) { +func (this *ApiComp) Addblack(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_BlackAdd_Req) (err error) { var ( code pb.ErrorCode self *pb.DB_FriendData target *pb.DB_FriendData - rsp *pb.FriendBlackAddRsp + rsp *pb.Friend_BlackAdd_Rsp blackNumMax = 50 //TODO 从配置中读取 ) defer func() { if code == pb.ErrorCode_Success { - rsp = &pb.FriendBlackAddRsp{ + rsp = &pb.Friend_BlackAdd_Rsp{ FriendId: req.FriendId, UserId: session.GetUserId(), } @@ -64,6 +64,10 @@ func (this *ApiComp) Addblack(session comm.IUserSession, chk map[string]interfac self.BlackIds = append(self.BlackIds, req.FriendId) //更新黑名单 - this.module.model_friend.SetObj(self.UserId, self, false, true) + err = this.module.model_friend.SetObj(self.UserId, self) + if err != nil { + code = pb.ErrorCode_DBError + return + } return } diff --git a/modules/friend/api_agree.go b/modules/friend/api_agree.go index bc8a13ffc..ce9e7b0f5 100644 --- a/modules/friend/api_agree.go +++ b/modules/friend/api_agree.go @@ -6,7 +6,7 @@ import ( "go_dreamfactory/utils" ) -func (this *ApiComp) Agree_Check(session comm.IUserSession, req *pb.FriendAgreeReq) (chk map[string]interface{}, code pb.ErrorCode) { +func (this *ApiComp) Agree_Check(session comm.IUserSession, req *pb.Friend_Agree_Req) (chk map[string]interface{}, code comm.ErrorCode) { chk = make(map[string]interface{}) var err error self := &pb.DB_FriendData{UserId: session.GetUserId()} @@ -14,7 +14,7 @@ func (this *ApiComp) Agree_Check(session comm.IUserSession, req *pb.FriendAgreeR //获取玩家自己好友数据 err = this.module.model_friend.GetObj(session.GetUserId(), self) if self == nil || err != nil { - code = pb.ErrorCode_FriendSelfNoData + code = comm.ErrorCode{Code: pb.ErrorCode_FriendSelfNoData} return } @@ -34,16 +34,16 @@ func (this *ApiComp) Agree_Check(session comm.IUserSession, req *pb.FriendAgreeR } //单个/批量同意 -func (this *ApiComp) Agree(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendAgreeReq) (code pb.ErrorCode) { +func (this *ApiComp) Agree(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_Agree_Req) (code pb.ErrorCode) { var ( self *pb.DB_FriendData - rsp *pb.FriendAgreeRsp + rsp *pb.Friend_Agree_Rsp optNum int32 ) defer func() { if code == pb.ErrorCode_Success { - rsp = &pb.FriendAgreeRsp{ + rsp = &pb.Friend_Agree_Rsp{ Num: optNum, } } @@ -80,7 +80,7 @@ func (this *ApiComp) Agree(session comm.IUserSession, chk map[string]interface{} } target.FriendIds = append(target.FriendIds, self.UserId) } - err = this.module.model_friend.SetObj(target.UserId, target, false, true) + err = this.module.model_friend.SetObj(target.UserId, target) if err != nil { code = pb.ErrorCode_DBError } @@ -91,7 +91,7 @@ func (this *ApiComp) Agree(session comm.IUserSession, chk map[string]interface{} } //更新 - err := this.module.model_friend.SetObj(self.UserId, self, false, true) + err := this.module.model_friend.SetObj(self.UserId, self) if err != nil { code = pb.ErrorCode_DBError return diff --git a/modules/friend/api_apply.go b/modules/friend/api_apply.go index 82eff4a4f..304a577ca 100644 --- a/modules/friend/api_apply.go +++ b/modules/friend/api_apply.go @@ -7,7 +7,7 @@ import ( "go_dreamfactory/utils" ) -func (this *ApiComp) Apply_Check(session comm.IUserSession, req *pb.FriendApplyReq) (chk map[string]interface{}, code pb.ErrorCode) { +func (this *ApiComp) Apply_Check(session comm.IUserSession, req *pb.Friend_Apply_Req) (chk map[string]interface{}, code comm.ErrorCode) { chk = make(map[string]interface{}) var err error self := &pb.DB_FriendData{UserId: session.GetUserId()} @@ -16,20 +16,20 @@ func (this *ApiComp) Apply_Check(session comm.IUserSession, req *pb.FriendApplyR //获取玩家自己好友数据 err = this.module.model_friend.GetObj(session.GetUserId(), self) if self == nil || err != nil { - code = pb.ErrorCode_FriendSelfNoData + code = comm.ErrorCode{Code: pb.ErrorCode_FriendSelfNoData} return } //获取好友数据 err = this.module.model_friend.GetObj(req.FriendId, target) if target == nil || err != nil { - code = pb.ErrorCode_FriendTargetNoData + code = comm.ErrorCode{Code: pb.ErrorCode_FriendTargetNoData} return } //判断是否是自己 if req.FriendId == session.GetUserId() { - code = pb.ErrorCode_FriendNotSelf + code = comm.ErrorCode{Code: pb.ErrorCode_FriendNotSelf} return } @@ -38,38 +38,38 @@ func (this *ApiComp) Apply_Check(session comm.IUserSession, req *pb.FriendApplyR var max int = 50 total := len(self.FriendIds) if total >= max { - code = pb.ErrorCode_FriendSelfMax + code = comm.ErrorCode{Code: pb.ErrorCode_FriendSelfMax} return } //判断对方是否也超过最大好友数量 ttotal := len(target.FriendIds) if ttotal >= max { - code = pb.ErrorCode_FriendTargetMax + code = comm.ErrorCode{Code: pb.ErrorCode_FriendTargetMax} return } //判断是否是好友 if _, ok := utils.Find(self.FriendIds, req.FriendId); ok { - code = pb.ErrorCode_FriendYet + code = comm.ErrorCode{Code: pb.ErrorCode_FriendYet} return } //判断自己是否在目标用户的申请列表中 if _, ok := utils.Find(target.ApplyIds, self.UserId); ok { - code = pb.ErrorCode_FriendApplyYet + code = comm.ErrorCode{Code: pb.ErrorCode_FriendApplyYet} return } //判断目标用户是否在黑名单中 if _, ok := utils.Find(self.BlackIds, req.FriendId); ok { - code = pb.ErrorCode_FriendSelfBlackYet + code = comm.ErrorCode{Code: pb.ErrorCode_FriendSelfBlackYet} return } //判断是否在对方的黑名单中 if _, ok := utils.Find(target.BlackIds, self.UserId); ok { - code = pb.ErrorCode_FriendTargetBlackYet + code = comm.ErrorCode{Code: pb.ErrorCode_FriendTargetBlackYet} return } @@ -79,10 +79,10 @@ func (this *ApiComp) Apply_Check(session comm.IUserSession, req *pb.FriendApplyR } //好友申请 -func (this *ApiComp) Apply(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendApplyReq) (code pb.ErrorCode) { +func (this *ApiComp) Apply(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_Apply_Req) (code pb.ErrorCode) { var ( target *pb.DB_FriendData - rsp *pb.FriendApplyRsp + rsp *pb.Friend_Apply_Rsp ) defer func() { @@ -91,7 +91,7 @@ func (this *ApiComp) Apply(session comm.IUserSession, chk map[string]interface{} defer func() { if code == pb.ErrorCode_Success { - rsp = &pb.FriendApplyRsp{ + rsp = &pb.Friend_Apply_Rsp{ UserId: session.GetUserId(), FriendId: req.FriendId, } @@ -112,8 +112,7 @@ func (this *ApiComp) Apply(session comm.IUserSession, chk map[string]interface{} } target.ApplyIds = append(target.ApplyIds, session.GetUserId()) - err := this.module.model_friend.SetObj(req.FriendId, target, false, true) - + err := this.module.model_friend.SetObj(req.FriendId, target) if err != nil { log.Errorf("firend Apply err:%v", err) code = pb.ErrorCode_FriendApplyError diff --git a/modules/friend/api_applylist.go b/modules/friend/api_applylist.go index 8907c1caa..ad2522346 100644 --- a/modules/friend/api_applylist.go +++ b/modules/friend/api_applylist.go @@ -5,21 +5,21 @@ import ( "go_dreamfactory/pb" ) -func (this *ApiComp) ApplyList_Check(session comm.IUserSession, req *pb.FriendApplyListReq) (chk map[string]interface{}, code pb.ErrorCode) { +func (this *ApiComp) ApplyList_Check(session comm.IUserSession, req *pb.Friend_ApplyList_Req) (chk map[string]interface{}, code comm.ErrorCode) { return } //申请列表 -func (this *ApiComp) ApplyList(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendApplyListReq) (code pb.ErrorCode) { +func (this *ApiComp) ApplyList(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_ApplyList_Req) (code pb.ErrorCode) { var ( self *pb.DB_FriendData - rsp *pb.FriendApplyListRsp + rsp *pb.Friend_ApplyList_Rsp list []*pb.FriendBase ) defer func() { if code == pb.ErrorCode_Success { - rsp = &pb.FriendApplyListRsp{ + rsp = &pb.Friend_ApplyList_Rsp{ List: list, } } diff --git a/modules/friend/api_blacklist.go b/modules/friend/api_blacklist.go index c0615070e..f45577436 100644 --- a/modules/friend/api_blacklist.go +++ b/modules/friend/api_blacklist.go @@ -5,21 +5,21 @@ import ( "go_dreamfactory/pb" ) -func (this *ApiComp) Blacklist_Check(session comm.IUserSession, req *pb.FriendBlackListReq) (chk map[string]interface{}, code pb.ErrorCode) { +func (this *ApiComp) Blacklist_Check(session comm.IUserSession, req *pb.Friend_BlackList_Req) (chk map[string]interface{}, code comm.ErrorCode) { return } //黑名单 -func (this *ApiComp) Blacklist(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendBlackListReq) (code pb.ErrorCode) { +func (this *ApiComp) Blacklist(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_BlackList_Req) (code pb.ErrorCode) { var ( self *pb.DB_FriendData - rsp *pb.FriendBlackListRsp + rsp *pb.Friend_BlackList_Rsp list []*pb.FriendBase ) defer func() { if code == pb.ErrorCode_Success { - rsp = &pb.FriendBlackListRsp{ + rsp = &pb.Friend_BlackList_Rsp{ Friends: list, } } diff --git a/modules/friend/api_del.go b/modules/friend/api_del.go index 128066d67..aecdbc260 100644 --- a/modules/friend/api_del.go +++ b/modules/friend/api_del.go @@ -5,11 +5,11 @@ import ( "go_dreamfactory/pb" ) -func (this *ApiComp) Del_Check(session comm.IUserSession, req *pb.FriendDelReq) (chk map[string]interface{}, code pb.ErrorCode) { +func (this *ApiComp) Del_Check(session comm.IUserSession, req *pb.Friend_Del_Req) (chk map[string]interface{}, code comm.ErrorCode) { return } //删除好友 -func (this *ApiComp) Del(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendDelReq) error { +func (this *ApiComp) Del(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_Del_Req) error { return nil } diff --git a/modules/friend/api_delblack.go b/modules/friend/api_delblack.go index 4ad3daf9d..4b9ce1f60 100644 --- a/modules/friend/api_delblack.go +++ b/modules/friend/api_delblack.go @@ -6,19 +6,19 @@ import ( "go_dreamfactory/utils" ) -func (this *ApiComp) Delblack_Check(session comm.IUserSession, req *pb.FriendDelBlackReq) (chk map[string]interface{}, code pb.ErrorCode) { +func (this *ApiComp) Delblack_Check(session comm.IUserSession, req *pb.Friend_DelBlack_Req) (chk map[string]interface{}, code comm.ErrorCode) { return } //删除黑名单 -func (this *ApiComp) Delblack(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendDelBlackReq) (code pb.ErrorCode) { +func (this *ApiComp) Delblack(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_DelBlack_Req) (code pb.ErrorCode) { var ( self *pb.DB_FriendData - rsp *pb.FriendDelBlackRsp + rsp *pb.Friend_DelBlack_Rsp ) defer func() { if code == pb.ErrorCode_Success { - rsp = &pb.FriendDelBlackRsp{ + rsp = &pb.Friend_DelBlack_Rsp{ FriendId: req.FriendId, UserId: session.GetUserId(), } @@ -34,7 +34,7 @@ func (this *ApiComp) Delblack(session comm.IUserSession, chk map[string]interfac //从黑名单列表中删除目标 self.BlackIds = utils.DeleteString(self.BlackIds, req.FriendId) //更新黑名单 - err = this.module.model_friend.SetObj(self.UserId, self, false, true) + err = this.module.model_friend.SetObj(self.UserId, self) if err != nil { code = pb.ErrorCode_DBError return diff --git a/modules/friend/api_list.go b/modules/friend/api_list.go index b49abe1a6..280cd2a76 100644 --- a/modules/friend/api_list.go +++ b/modules/friend/api_list.go @@ -5,21 +5,21 @@ import ( "go_dreamfactory/pb" ) -func (this *ApiComp) List_Check(session comm.IUserSession, req *pb.FriendListReq) (chk map[string]interface{}, code pb.ErrorCode) { +func (this *ApiComp) List_Check(session comm.IUserSession, req *pb.Friend_List_Req) (chk map[string]interface{}, code comm.ErrorCode) { return } //好友列表 -func (this *ApiComp) List(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendListReq) (code pb.ErrorCode) { +func (this *ApiComp) List(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_List_Req) (code pb.ErrorCode) { var ( self *pb.DB_FriendData - rsp *pb.FriendListRsp + rsp *pb.Friend_List_Rsp list []*pb.FriendBase ) defer func() { if code == pb.ErrorCode_Success { - rsp = &pb.FriendListRsp{ + rsp = &pb.Friend_List_Rsp{ List: list, } } diff --git a/modules/friend/api_refuse.go b/modules/friend/api_refuse.go index feacf9506..bd1272aba 100644 --- a/modules/friend/api_refuse.go +++ b/modules/friend/api_refuse.go @@ -6,7 +6,7 @@ import ( "go_dreamfactory/utils" ) -func (this *ApiComp) Refuse_Check(session comm.IUserSession, req *pb.FriendRefuseReq) (chk map[string]interface{}, code pb.ErrorCode) { +func (this *ApiComp) Refuse_Check(session comm.IUserSession, req *pb.Friend_Refuse_Req) (chk map[string]interface{}, code comm.ErrorCode) { chk = make(map[string]interface{}) var err error self := &pb.DB_FriendData{UserId: session.GetUserId()} @@ -14,7 +14,7 @@ func (this *ApiComp) Refuse_Check(session comm.IUserSession, req *pb.FriendRefus //获取玩家自己好友数据 err = this.module.model_friend.GetObj(session.GetUserId(), self) if self == nil || err != nil { - code = pb.ErrorCode_FriendSelfNoData + code = comm.ErrorCode{Code: pb.ErrorCode_FriendSelfNoData} return } @@ -33,19 +33,18 @@ func (this *ApiComp) Refuse_Check(session comm.IUserSession, req *pb.FriendRefus } //单个/批量拒绝 -func (this *ApiComp) Refuse(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendRefuseReq) (code pb.ErrorCode) { +func (this *ApiComp) Refuse(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_Refuse_Req) (code pb.ErrorCode) { //将申请人从申请列表中删除 var ( self *pb.DB_FriendData - rsp *pb.FriendAgreeRsp + rsp *pb.Friend_Refuse_Rsp optNum int32 ) defer func() { - if code == pb.ErrorCode_Success { - rsp = &pb.FriendAgreeRsp{ - Num: optNum, - } + rsp = &pb.Friend_Refuse_Rsp{ + Num: optNum, } + session.SendMsg(string(this.module.GetType()), Friend_SubType_Refuse, rsp) }() @@ -63,7 +62,7 @@ func (this *ApiComp) Refuse(session comm.IUserSession, chk map[string]interface{ } //更新 if optNum > 0 { - err := this.module.model_friend.SetObj(self.UserId, self, false, true) + err := this.module.model_friend.SetObj(self.UserId, self) if err != nil { code = pb.ErrorCode_DBError return diff --git a/modules/friend/api_search.go b/modules/friend/api_search.go index 1d554801d..c0b50b879 100644 --- a/modules/friend/api_search.go +++ b/modules/friend/api_search.go @@ -5,23 +5,23 @@ import ( "go_dreamfactory/pb" ) -func (this *ApiComp) Search_Check(session comm.IUserSession, req *pb.FriendSearchReq) (chk map[string]interface{}, code pb.ErrorCode) { +func (this *ApiComp) Search_Check(session comm.IUserSession, req *pb.Friend_Search_Req) (chk map[string]interface{}, code comm.ErrorCode) { return } //搜索 -func (this *ApiComp) Search(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendSearchReq) (code pb.ErrorCode) { +func (this *ApiComp) Search(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_Search_Req) (code pb.ErrorCode) { var ( - rsp *pb.FriendSearchRsp + rsp *pb.Friend_Search_Rsp friend *pb.FriendBase ) defer func() { if code == pb.ErrorCode_Success { - rsp = &pb.FriendSearchRsp{ + rsp = &pb.Friend_Search_Rsp{ Friend: friend, } } - session.SendMsg(string(this.module.GetType()), Friend_SubType_Search, rsp) + session.SendMsg(string(this.module.GetType()), Friend_SubType_Search, rsp) }() user := this.module.model_friend.Frined_FindCond(req.NickName) diff --git a/modules/mail/api_delmail.go b/modules/mail/api_delmail.go index 3e5e38497..395e112b6 100644 --- a/modules/mail/api_delmail.go +++ b/modules/mail/api_delmail.go @@ -7,7 +7,7 @@ import ( ) //参数校验 -func (this *Api_Comp) DelUserMailReq_Check(session comm.IUserSession, req *pb.Mail_DelMail_Req) (result map[string]interface{}, code pb.ErrorCode) { +func (this *Api_Comp) DelUserMailReq_Check(session comm.IUserSession, req *pb.Mail_DelMail_Req) (result map[string]interface{}, code comm.ErrorCode) { return } diff --git a/modules/model_comp.go b/modules/model_comp.go index c4f5e31d5..8bc7fe7eb 100644 --- a/modules/model_comp.go +++ b/modules/model_comp.go @@ -10,7 +10,6 @@ import ( "go_dreamfactory/lego/sys/redis" "go_dreamfactory/sys/cache" "go_dreamfactory/sys/db" - "reflect" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson/primitive" @@ -100,21 +99,30 @@ func (this *Model_Comp) UpdateModelLogs(table string, uID string, where bson.M, } //设置缓存JSON格式数据 -func (this *Model_Comp) SetObj(uid string, data proto.Message, isnew, islog bool) error { +//data 值允许protobuf格式的对象 +// attrs 操作可选项目 eg.传入WithDisabledMgoLog() 表示关闭日志,否则开启;WithND() 传入表示插入操作,不传表示更新,前提不能传入传入WithDisabledMgoLog() +func (this *Model_Comp) SetObj(uid string, data proto.Message, attrs ...*cache.OperationAttr) error { err := this.Redis.Set(fmt.Sprintf("%s:%s", this.TableName, uid), data, 0) if err != nil { log.Errorf("set err:%v", err) return err } - if islog { - if isnew { - return this.InsertModelLogs(this.TableName, uid, data) - } else { - return this.UpdateModelLogs(this.TableName, uid, bson.M{"uid": uid}, data) - } + return this.logOpt(uid, data, attrs...) +} + +//cache hashmap data参数 允许map或protobuf +//eg.map[string]*TestData{"li_1": {Name: "liwei2dao", Agr: 56}, "li_2": {Name: "liwei3dao", Agr: 78}} +//or &TestData{Name: "liwei1dao", Agr: 12, Sub: &TestAny{SubName: "test", Age: 20}} +// attrs 操作可选项目 eg.传入WithDisabledMgoLog() 表示关闭日志,否则开启;WithND() 传入表示插入操作,不传表示更新,前提不能传入传入WithDisabledMgoLog() +func (this *Model_Comp) SetHM(uid string, data interface{}, attrs ...*cache.OperationAttr) error { + err := this.Redis.HMSet(fmt.Sprintf("%s:%s", this.TableName, uid), data) + if err != nil { + log.Errorf("HMSet err: %v", err) + return err } - return nil + + return this.logOpt(uid, data, attrs...) } //更新缓存字段 @@ -152,7 +160,7 @@ func (this *Model_Comp) GetObj(uid string, v proto.Message) error { return err } //set cache - return this.SetObj(uid, v, true, false) + return this.SetObj(uid, v, cache.WithND()) } } } else { @@ -163,11 +171,12 @@ func (this *Model_Comp) GetObj(uid string, v proto.Message) error { } //获取对象数据 -func (this *Model_Comp) Get(uid string, v reflect.Type, fields ...string) ([]interface{}, error) { - return this.Redis.HMGet(fmt.Sprintf("%s:%s", this.TableName, uid), v, fields...) +//data +func (this *Model_Comp) GetAll(uid string, data interface{}) error { + return this.Redis.HGetAll(fmt.Sprintf("%s:%s", this.TableName, uid), data) } -//获取字段数据 +//获取字段数据 缓存存储的数据为hashmap时 func (this *Model_Comp) GetField(uid string, field string, v interface{}) error { return this.Redis.HGet(fmt.Sprintf("%s:%s", this.TableName, uid), field, v) } @@ -182,3 +191,17 @@ func (this *Model_Comp) Del(uid string) error { return this.DeleteModelLogs(this.TableName, uid, bson.M{"_id": uid}) } + +//日志操作可选项 +func (this *Model_Comp) logOpt(uid string, data interface{}, attrs ...*cache.OperationAttr) error { + ret := cache.OperationAttrs(attrs).Find(cache.ATTR_MGOLOG).Unwrap_Or(nil) + if ret == nil { + ir := cache.OperationAttrs(attrs).Find(cache.ATTR_INSERT).Unwrap_Or(nil) + if ir != nil && ir.(bool) { + return this.UpdateModelLogs(this.TableName, uid, bson.M{"uid": uid}, data) + } else { + return this.InsertModelLogs(this.TableName, uid, data) + } + } + return nil +} diff --git a/modules/user/api_create.go b/modules/user/api_create.go index a40863732..04495571c 100644 --- a/modules/user/api_create.go +++ b/modules/user/api_create.go @@ -4,10 +4,11 @@ import ( "go_dreamfactory/comm" "go_dreamfactory/lego/sys/event" "go_dreamfactory/pb" + "go_dreamfactory/sys/cache" "go_dreamfactory/utils" ) -func (this *Api_Comp) Create_Check(session comm.IUserSession, req *pb.UserCreateReq) (result map[string]interface{}, code pb.ErrorCode) { +func (this *Api_Comp) Create_Check(session comm.IUserSession, req *pb.UserCreateReq) (result map[string]interface{}, code comm.ErrorCode) { return } @@ -16,9 +17,9 @@ func (this *Api_Comp) Create(session comm.IUserSession, result map[string]interf defer utils.TraceFunc(session.GetUserId(), string(this.module.GetType()), User_SubType_Create, req, nil) self := &pb.DB_UserData{} - + defer func() { - session.SendMsg(string(this.module.GetType()), User_SubType_Create, &pb.UserCreateRsp{}) + session.SendMsg(string(this.module.GetType()), User_SubType_Create, &pb.UserCreateRsp{}) }() //更新昵称 @@ -31,7 +32,7 @@ func (this *Api_Comp) Create(session comm.IUserSession, result map[string]interf return } self.Name = req.NickName - err = this.module.modelUser.SetObj(session.GetUserId(), self, false, true) + err = this.module.modelUser.SetObj(session.GetUserId(), self, cache.WithND()) if err != nil { code = pb.ErrorCode_DBError return diff --git a/modules/user/api_login.go b/modules/user/api_login.go index 4a61b4430..6ff4433e5 100644 --- a/modules/user/api_login.go +++ b/modules/user/api_login.go @@ -6,6 +6,7 @@ import ( "go_dreamfactory/lego/sys/event" "go_dreamfactory/lego/sys/log" "go_dreamfactory/pb" + "go_dreamfactory/sys/cache" "go_dreamfactory/utils" "time" @@ -35,7 +36,7 @@ func decodeUserData(base64Str string) *pb.DB_UserData { } //参数校验 -func (this *Api_Comp) Login_Check(session comm.IUserSession, req *pb.UserLoginReq) (result map[string]interface{}, code pb.ErrorCode) { +func (this *Api_Comp) Login_Check(session comm.IUserSession, req *pb.UserLoginReq) (result map[string]interface{}, code comm.ErrorCode) { result = map[string]interface{}{} return } @@ -93,12 +94,12 @@ func (this *Api_Comp) Login(session comm.IUserSession, result map[string]interfa SessionId: cache_user.SessionId, GatewayServiceId: cache_user.GatewayServiceId, } - err = this.module.modelSession.SetObj(cache_user.Uid, data, true, true) + err = this.module.modelSession.SetObj(cache_user.Uid, data) if err != nil { code = pb.ErrorCode_DBError return } - err = this.module.modelUser.SetObj(cache_user.Uid, user, true, true) + err = this.module.modelUser.SetObj(cache_user.Uid, user, cache.WithND()) if err != nil { code = pb.ErrorCode_DBError return @@ -114,13 +115,13 @@ func (this *Api_Comp) Login(session comm.IUserSession, result map[string]interfa // "sessionId": cache_user.SessionId, // "gatewayServiceId": cache_user.GatewayServiceId, // } - err = this.module.modelSession.SetObj(db_user.Uid, data, false, false) + err = this.module.modelSession.SetObj(db_user.Uid, data) if err != nil { code = pb.ErrorCode_DBError return } - err = this.module.modelUser.SetObj(db_user.Uid, db_user, false, true) + err = this.module.modelUser.SetObj(db_user.Uid, db_user) if err != nil { code = pb.ErrorCode_DBError return diff --git a/modules/user/api_logout.go b/modules/user/api_logout.go index 058f8eb18..24cd06c59 100644 --- a/modules/user/api_logout.go +++ b/modules/user/api_logout.go @@ -6,13 +6,13 @@ import ( "go_dreamfactory/pb" ) -func (this *Api_Comp) Logout_Check(session comm.IUserSession, req *pb.UserLoginReq) (result map[string]interface{}, code pb.ErrorCode) { +func (this *Api_Comp) Logout_Check(session comm.IUserSession, req *pb.UserLoginReq) (result map[string]interface{}, code comm.ErrorCode) { return } //注销 -func (this *Api_Comp) Logout(session comm.IUserSession, result map[string]interface{}, rsp *pb.UserLoginReq) error { +func (this *Api_Comp) Logout(session comm.IUserSession, result map[string]interface{}, rsp *pb.UserLoginReq) (code pb.ErrorCode) { log.Debugf("User - Logout: session:%v rsp:%v", session.ToString(), rsp) - return nil + return } diff --git a/pb/friend_msg.pb.go b/pb/friend_msg.pb.go index 4885e5909..0564d382d 100644 --- a/pb/friend_msg.pb.go +++ b/pb/friend_msg.pb.go @@ -25,7 +25,7 @@ type FriendBase struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId"` //ID + UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId"` // ID NickName string `protobuf:"bytes,2,opt,name=NickName,proto3" json:"NickName"` //昵称 Level int32 `protobuf:"varint,3,opt,name=level,proto3" json:"level"` //等级 Avatar int32 `protobuf:"varint,4,opt,name=avatar,proto3" json:"avatar"` //头像 @@ -116,14 +116,14 @@ func (x *FriendBase) GetOfflineTime() int64 { } //好友列表 -type FriendListReq struct { +type Friend_List_Req struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *FriendListReq) Reset() { - *x = FriendListReq{} +func (x *Friend_List_Req) Reset() { + *x = Friend_List_Req{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -131,13 +131,13 @@ func (x *FriendListReq) Reset() { } } -func (x *FriendListReq) String() string { +func (x *Friend_List_Req) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendListReq) ProtoMessage() {} +func (*Friend_List_Req) ProtoMessage() {} -func (x *FriendListReq) ProtoReflect() protoreflect.Message { +func (x *Friend_List_Req) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -149,12 +149,12 @@ func (x *FriendListReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendListReq.ProtoReflect.Descriptor instead. -func (*FriendListReq) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_List_Req.ProtoReflect.Descriptor instead. +func (*Friend_List_Req) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{1} } -type FriendListRsp struct { +type Friend_List_Rsp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -162,8 +162,8 @@ type FriendListRsp struct { List []*FriendBase `protobuf:"bytes,1,rep,name=list,proto3" json:"list"` } -func (x *FriendListRsp) Reset() { - *x = FriendListRsp{} +func (x *Friend_List_Rsp) Reset() { + *x = Friend_List_Rsp{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -171,13 +171,13 @@ func (x *FriendListRsp) Reset() { } } -func (x *FriendListRsp) String() string { +func (x *Friend_List_Rsp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendListRsp) ProtoMessage() {} +func (*Friend_List_Rsp) ProtoMessage() {} -func (x *FriendListRsp) ProtoReflect() protoreflect.Message { +func (x *Friend_List_Rsp) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -189,12 +189,12 @@ func (x *FriendListRsp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendListRsp.ProtoReflect.Descriptor instead. -func (*FriendListRsp) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_List_Rsp.ProtoReflect.Descriptor instead. +func (*Friend_List_Rsp) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{2} } -func (x *FriendListRsp) GetList() []*FriendBase { +func (x *Friend_List_Rsp) GetList() []*FriendBase { if x != nil { return x.List } @@ -202,7 +202,7 @@ func (x *FriendListRsp) GetList() []*FriendBase { } //申请好友 -type FriendApplyReq struct { +type Friend_Apply_Req struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -210,8 +210,8 @@ type FriendApplyReq struct { FriendId string `protobuf:"bytes,1,opt,name=friendId,proto3" json:"friendId"` //好友ID } -func (x *FriendApplyReq) Reset() { - *x = FriendApplyReq{} +func (x *Friend_Apply_Req) Reset() { + *x = Friend_Apply_Req{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -219,13 +219,13 @@ func (x *FriendApplyReq) Reset() { } } -func (x *FriendApplyReq) String() string { +func (x *Friend_Apply_Req) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendApplyReq) ProtoMessage() {} +func (*Friend_Apply_Req) ProtoMessage() {} -func (x *FriendApplyReq) ProtoReflect() protoreflect.Message { +func (x *Friend_Apply_Req) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -237,19 +237,19 @@ func (x *FriendApplyReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendApplyReq.ProtoReflect.Descriptor instead. -func (*FriendApplyReq) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_Apply_Req.ProtoReflect.Descriptor instead. +func (*Friend_Apply_Req) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{3} } -func (x *FriendApplyReq) GetFriendId() string { +func (x *Friend_Apply_Req) GetFriendId() string { if x != nil { return x.FriendId } return "" } -type FriendApplyRsp struct { +type Friend_Apply_Rsp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -258,8 +258,8 @@ type FriendApplyRsp struct { FriendId string `protobuf:"bytes,2,opt,name=friendId,proto3" json:"friendId"` //好友ID } -func (x *FriendApplyRsp) Reset() { - *x = FriendApplyRsp{} +func (x *Friend_Apply_Rsp) Reset() { + *x = Friend_Apply_Rsp{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -267,13 +267,13 @@ func (x *FriendApplyRsp) Reset() { } } -func (x *FriendApplyRsp) String() string { +func (x *Friend_Apply_Rsp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendApplyRsp) ProtoMessage() {} +func (*Friend_Apply_Rsp) ProtoMessage() {} -func (x *FriendApplyRsp) ProtoReflect() protoreflect.Message { +func (x *Friend_Apply_Rsp) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -285,19 +285,19 @@ func (x *FriendApplyRsp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendApplyRsp.ProtoReflect.Descriptor instead. -func (*FriendApplyRsp) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_Apply_Rsp.ProtoReflect.Descriptor instead. +func (*Friend_Apply_Rsp) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{4} } -func (x *FriendApplyRsp) GetUserId() string { +func (x *Friend_Apply_Rsp) GetUserId() string { if x != nil { return x.UserId } return "" } -func (x *FriendApplyRsp) GetFriendId() string { +func (x *Friend_Apply_Rsp) GetFriendId() string { if x != nil { return x.FriendId } @@ -305,7 +305,7 @@ func (x *FriendApplyRsp) GetFriendId() string { } //删除好友 -type FriendDelReq struct { +type Friend_Del_Req struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -313,8 +313,8 @@ type FriendDelReq struct { FriendId string `protobuf:"bytes,1,opt,name=friendId,proto3" json:"friendId"` //好友ID } -func (x *FriendDelReq) Reset() { - *x = FriendDelReq{} +func (x *Friend_Del_Req) Reset() { + *x = Friend_Del_Req{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -322,13 +322,13 @@ func (x *FriendDelReq) Reset() { } } -func (x *FriendDelReq) String() string { +func (x *Friend_Del_Req) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendDelReq) ProtoMessage() {} +func (*Friend_Del_Req) ProtoMessage() {} -func (x *FriendDelReq) ProtoReflect() protoreflect.Message { +func (x *Friend_Del_Req) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -340,19 +340,19 @@ func (x *FriendDelReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendDelReq.ProtoReflect.Descriptor instead. -func (*FriendDelReq) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_Del_Req.ProtoReflect.Descriptor instead. +func (*Friend_Del_Req) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{5} } -func (x *FriendDelReq) GetFriendId() string { +func (x *Friend_Del_Req) GetFriendId() string { if x != nil { return x.FriendId } return "" } -type FriendDelRsp struct { +type Friend_Del_Rsp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -361,8 +361,8 @@ type FriendDelRsp struct { UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId"` //用户ID } -func (x *FriendDelRsp) Reset() { - *x = FriendDelRsp{} +func (x *Friend_Del_Rsp) Reset() { + *x = Friend_Del_Rsp{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -370,13 +370,13 @@ func (x *FriendDelRsp) Reset() { } } -func (x *FriendDelRsp) String() string { +func (x *Friend_Del_Rsp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendDelRsp) ProtoMessage() {} +func (*Friend_Del_Rsp) ProtoMessage() {} -func (x *FriendDelRsp) ProtoReflect() protoreflect.Message { +func (x *Friend_Del_Rsp) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -388,19 +388,19 @@ func (x *FriendDelRsp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendDelRsp.ProtoReflect.Descriptor instead. -func (*FriendDelRsp) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_Del_Rsp.ProtoReflect.Descriptor instead. +func (*Friend_Del_Rsp) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{6} } -func (x *FriendDelRsp) GetFriendId() string { +func (x *Friend_Del_Rsp) GetFriendId() string { if x != nil { return x.FriendId } return "" } -func (x *FriendDelRsp) GetUserId() string { +func (x *Friend_Del_Rsp) GetUserId() string { if x != nil { return x.UserId } @@ -408,7 +408,7 @@ func (x *FriendDelRsp) GetUserId() string { } //同意 -type FriendAgreeReq struct { +type Friend_Agree_Req struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -416,8 +416,8 @@ type FriendAgreeReq struct { FriendIds []string `protobuf:"bytes,1,rep,name=friendIds,proto3" json:"friendIds"` //被同意的用户 } -func (x *FriendAgreeReq) Reset() { - *x = FriendAgreeReq{} +func (x *Friend_Agree_Req) Reset() { + *x = Friend_Agree_Req{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -425,13 +425,13 @@ func (x *FriendAgreeReq) Reset() { } } -func (x *FriendAgreeReq) String() string { +func (x *Friend_Agree_Req) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendAgreeReq) ProtoMessage() {} +func (*Friend_Agree_Req) ProtoMessage() {} -func (x *FriendAgreeReq) ProtoReflect() protoreflect.Message { +func (x *Friend_Agree_Req) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -443,19 +443,19 @@ func (x *FriendAgreeReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendAgreeReq.ProtoReflect.Descriptor instead. -func (*FriendAgreeReq) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_Agree_Req.ProtoReflect.Descriptor instead. +func (*Friend_Agree_Req) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{7} } -func (x *FriendAgreeReq) GetFriendIds() []string { +func (x *Friend_Agree_Req) GetFriendIds() []string { if x != nil { return x.FriendIds } return nil } -type FriendAgreeRsp struct { +type Friend_Agree_Rsp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -463,8 +463,8 @@ type FriendAgreeRsp struct { Num int32 `protobuf:"varint,1,opt,name=Num,proto3" json:"Num"` //操作的数量 } -func (x *FriendAgreeRsp) Reset() { - *x = FriendAgreeRsp{} +func (x *Friend_Agree_Rsp) Reset() { + *x = Friend_Agree_Rsp{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -472,13 +472,13 @@ func (x *FriendAgreeRsp) Reset() { } } -func (x *FriendAgreeRsp) String() string { +func (x *Friend_Agree_Rsp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendAgreeRsp) ProtoMessage() {} +func (*Friend_Agree_Rsp) ProtoMessage() {} -func (x *FriendAgreeRsp) ProtoReflect() protoreflect.Message { +func (x *Friend_Agree_Rsp) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -490,12 +490,12 @@ func (x *FriendAgreeRsp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendAgreeRsp.ProtoReflect.Descriptor instead. -func (*FriendAgreeRsp) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_Agree_Rsp.ProtoReflect.Descriptor instead. +func (*Friend_Agree_Rsp) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{8} } -func (x *FriendAgreeRsp) GetNum() int32 { +func (x *Friend_Agree_Rsp) GetNum() int32 { if x != nil { return x.Num } @@ -503,7 +503,7 @@ func (x *FriendAgreeRsp) GetNum() int32 { } //拒绝 -type FriendRefuseReq struct { +type Friend_Refuse_Req struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -511,8 +511,8 @@ type FriendRefuseReq struct { FriendIds []string `protobuf:"bytes,1,rep,name=friendIds,proto3" json:"friendIds"` //被拒绝的用户 } -func (x *FriendRefuseReq) Reset() { - *x = FriendRefuseReq{} +func (x *Friend_Refuse_Req) Reset() { + *x = Friend_Refuse_Req{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -520,13 +520,13 @@ func (x *FriendRefuseReq) Reset() { } } -func (x *FriendRefuseReq) String() string { +func (x *Friend_Refuse_Req) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendRefuseReq) ProtoMessage() {} +func (*Friend_Refuse_Req) ProtoMessage() {} -func (x *FriendRefuseReq) ProtoReflect() protoreflect.Message { +func (x *Friend_Refuse_Req) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -538,19 +538,19 @@ func (x *FriendRefuseReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendRefuseReq.ProtoReflect.Descriptor instead. -func (*FriendRefuseReq) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_Refuse_Req.ProtoReflect.Descriptor instead. +func (*Friend_Refuse_Req) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{9} } -func (x *FriendRefuseReq) GetFriendIds() []string { +func (x *Friend_Refuse_Req) GetFriendIds() []string { if x != nil { return x.FriendIds } return nil } -type FriendRefuseRsp struct { +type Friend_Refuse_Rsp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -558,8 +558,8 @@ type FriendRefuseRsp struct { Num int32 `protobuf:"varint,1,opt,name=Num,proto3" json:"Num"` //操作的数量 } -func (x *FriendRefuseRsp) Reset() { - *x = FriendRefuseRsp{} +func (x *Friend_Refuse_Rsp) Reset() { + *x = Friend_Refuse_Rsp{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -567,13 +567,13 @@ func (x *FriendRefuseRsp) Reset() { } } -func (x *FriendRefuseRsp) String() string { +func (x *Friend_Refuse_Rsp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendRefuseRsp) ProtoMessage() {} +func (*Friend_Refuse_Rsp) ProtoMessage() {} -func (x *FriendRefuseRsp) ProtoReflect() protoreflect.Message { +func (x *Friend_Refuse_Rsp) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -585,12 +585,12 @@ func (x *FriendRefuseRsp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendRefuseRsp.ProtoReflect.Descriptor instead. -func (*FriendRefuseRsp) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_Refuse_Rsp.ProtoReflect.Descriptor instead. +func (*Friend_Refuse_Rsp) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{10} } -func (x *FriendRefuseRsp) GetNum() int32 { +func (x *Friend_Refuse_Rsp) GetNum() int32 { if x != nil { return x.Num } @@ -598,14 +598,14 @@ func (x *FriendRefuseRsp) GetNum() int32 { } //好友申请列表 -type FriendApplyListReq struct { +type Friend_ApplyList_Req struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *FriendApplyListReq) Reset() { - *x = FriendApplyListReq{} +func (x *Friend_ApplyList_Req) Reset() { + *x = Friend_ApplyList_Req{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -613,13 +613,13 @@ func (x *FriendApplyListReq) Reset() { } } -func (x *FriendApplyListReq) String() string { +func (x *Friend_ApplyList_Req) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendApplyListReq) ProtoMessage() {} +func (*Friend_ApplyList_Req) ProtoMessage() {} -func (x *FriendApplyListReq) ProtoReflect() protoreflect.Message { +func (x *Friend_ApplyList_Req) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -631,12 +631,12 @@ func (x *FriendApplyListReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendApplyListReq.ProtoReflect.Descriptor instead. -func (*FriendApplyListReq) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_ApplyList_Req.ProtoReflect.Descriptor instead. +func (*Friend_ApplyList_Req) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{11} } -type FriendApplyListRsp struct { +type Friend_ApplyList_Rsp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -644,8 +644,8 @@ type FriendApplyListRsp struct { List []*FriendBase `protobuf:"bytes,1,rep,name=list,proto3" json:"list"` } -func (x *FriendApplyListRsp) Reset() { - *x = FriendApplyListRsp{} +func (x *Friend_ApplyList_Rsp) Reset() { + *x = Friend_ApplyList_Rsp{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -653,13 +653,13 @@ func (x *FriendApplyListRsp) Reset() { } } -func (x *FriendApplyListRsp) String() string { +func (x *Friend_ApplyList_Rsp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendApplyListRsp) ProtoMessage() {} +func (*Friend_ApplyList_Rsp) ProtoMessage() {} -func (x *FriendApplyListRsp) ProtoReflect() protoreflect.Message { +func (x *Friend_ApplyList_Rsp) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -671,12 +671,12 @@ func (x *FriendApplyListRsp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendApplyListRsp.ProtoReflect.Descriptor instead. -func (*FriendApplyListRsp) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_ApplyList_Rsp.ProtoReflect.Descriptor instead. +func (*Friend_ApplyList_Rsp) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{12} } -func (x *FriendApplyListRsp) GetList() []*FriendBase { +func (x *Friend_ApplyList_Rsp) GetList() []*FriendBase { if x != nil { return x.List } @@ -684,7 +684,7 @@ func (x *FriendApplyListRsp) GetList() []*FriendBase { } //好友搜索 -type FriendSearchReq struct { +type Friend_Search_Req struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -692,8 +692,8 @@ type FriendSearchReq struct { NickName string `protobuf:"bytes,1,opt,name=nickName,proto3" json:"nickName"` //好友昵称 } -func (x *FriendSearchReq) Reset() { - *x = FriendSearchReq{} +func (x *Friend_Search_Req) Reset() { + *x = Friend_Search_Req{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -701,13 +701,13 @@ func (x *FriendSearchReq) Reset() { } } -func (x *FriendSearchReq) String() string { +func (x *Friend_Search_Req) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendSearchReq) ProtoMessage() {} +func (*Friend_Search_Req) ProtoMessage() {} -func (x *FriendSearchReq) ProtoReflect() protoreflect.Message { +func (x *Friend_Search_Req) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -719,19 +719,19 @@ func (x *FriendSearchReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendSearchReq.ProtoReflect.Descriptor instead. -func (*FriendSearchReq) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_Search_Req.ProtoReflect.Descriptor instead. +func (*Friend_Search_Req) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{13} } -func (x *FriendSearchReq) GetNickName() string { +func (x *Friend_Search_Req) GetNickName() string { if x != nil { return x.NickName } return "" } -type FriendSearchRsp struct { +type Friend_Search_Rsp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -739,8 +739,8 @@ type FriendSearchRsp struct { Friend *FriendBase `protobuf:"bytes,1,opt,name=friend,proto3" json:"friend"` } -func (x *FriendSearchRsp) Reset() { - *x = FriendSearchRsp{} +func (x *Friend_Search_Rsp) Reset() { + *x = Friend_Search_Rsp{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -748,13 +748,13 @@ func (x *FriendSearchRsp) Reset() { } } -func (x *FriendSearchRsp) String() string { +func (x *Friend_Search_Rsp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendSearchRsp) ProtoMessage() {} +func (*Friend_Search_Rsp) ProtoMessage() {} -func (x *FriendSearchRsp) ProtoReflect() protoreflect.Message { +func (x *Friend_Search_Rsp) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -766,12 +766,12 @@ func (x *FriendSearchRsp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendSearchRsp.ProtoReflect.Descriptor instead. -func (*FriendSearchRsp) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_Search_Rsp.ProtoReflect.Descriptor instead. +func (*Friend_Search_Rsp) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{14} } -func (x *FriendSearchRsp) GetFriend() *FriendBase { +func (x *Friend_Search_Rsp) GetFriend() *FriendBase { if x != nil { return x.Friend } @@ -779,14 +779,14 @@ func (x *FriendSearchRsp) GetFriend() *FriendBase { } //黑名单 -type FriendBlackListReq struct { +type Friend_BlackList_Req struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *FriendBlackListReq) Reset() { - *x = FriendBlackListReq{} +func (x *Friend_BlackList_Req) Reset() { + *x = Friend_BlackList_Req{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -794,13 +794,13 @@ func (x *FriendBlackListReq) Reset() { } } -func (x *FriendBlackListReq) String() string { +func (x *Friend_BlackList_Req) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendBlackListReq) ProtoMessage() {} +func (*Friend_BlackList_Req) ProtoMessage() {} -func (x *FriendBlackListReq) ProtoReflect() protoreflect.Message { +func (x *Friend_BlackList_Req) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -812,12 +812,12 @@ func (x *FriendBlackListReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendBlackListReq.ProtoReflect.Descriptor instead. -func (*FriendBlackListReq) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_BlackList_Req.ProtoReflect.Descriptor instead. +func (*Friend_BlackList_Req) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{15} } -type FriendBlackListRsp struct { +type Friend_BlackList_Rsp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -825,8 +825,8 @@ type FriendBlackListRsp struct { Friends []*FriendBase `protobuf:"bytes,1,rep,name=friends,proto3" json:"friends"` } -func (x *FriendBlackListRsp) Reset() { - *x = FriendBlackListRsp{} +func (x *Friend_BlackList_Rsp) Reset() { + *x = Friend_BlackList_Rsp{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -834,13 +834,13 @@ func (x *FriendBlackListRsp) Reset() { } } -func (x *FriendBlackListRsp) String() string { +func (x *Friend_BlackList_Rsp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendBlackListRsp) ProtoMessage() {} +func (*Friend_BlackList_Rsp) ProtoMessage() {} -func (x *FriendBlackListRsp) ProtoReflect() protoreflect.Message { +func (x *Friend_BlackList_Rsp) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -852,12 +852,12 @@ func (x *FriendBlackListRsp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendBlackListRsp.ProtoReflect.Descriptor instead. -func (*FriendBlackListRsp) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_BlackList_Rsp.ProtoReflect.Descriptor instead. +func (*Friend_BlackList_Rsp) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{16} } -func (x *FriendBlackListRsp) GetFriends() []*FriendBase { +func (x *Friend_BlackList_Rsp) GetFriends() []*FriendBase { if x != nil { return x.Friends } @@ -865,7 +865,7 @@ func (x *FriendBlackListRsp) GetFriends() []*FriendBase { } //添加黑名单 -type FriendBlackAddReq struct { +type Friend_BlackAdd_Req struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -873,8 +873,8 @@ type FriendBlackAddReq struct { FriendId string `protobuf:"bytes,1,opt,name=friendId,proto3" json:"friendId"` } -func (x *FriendBlackAddReq) Reset() { - *x = FriendBlackAddReq{} +func (x *Friend_BlackAdd_Req) Reset() { + *x = Friend_BlackAdd_Req{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -882,13 +882,13 @@ func (x *FriendBlackAddReq) Reset() { } } -func (x *FriendBlackAddReq) String() string { +func (x *Friend_BlackAdd_Req) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendBlackAddReq) ProtoMessage() {} +func (*Friend_BlackAdd_Req) ProtoMessage() {} -func (x *FriendBlackAddReq) ProtoReflect() protoreflect.Message { +func (x *Friend_BlackAdd_Req) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -900,19 +900,19 @@ func (x *FriendBlackAddReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendBlackAddReq.ProtoReflect.Descriptor instead. -func (*FriendBlackAddReq) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_BlackAdd_Req.ProtoReflect.Descriptor instead. +func (*Friend_BlackAdd_Req) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{17} } -func (x *FriendBlackAddReq) GetFriendId() string { +func (x *Friend_BlackAdd_Req) GetFriendId() string { if x != nil { return x.FriendId } return "" } -type FriendBlackAddRsp struct { +type Friend_BlackAdd_Rsp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -921,8 +921,8 @@ type FriendBlackAddRsp struct { UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId"` } -func (x *FriendBlackAddRsp) Reset() { - *x = FriendBlackAddRsp{} +func (x *Friend_BlackAdd_Rsp) Reset() { + *x = Friend_BlackAdd_Rsp{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -930,13 +930,13 @@ func (x *FriendBlackAddRsp) Reset() { } } -func (x *FriendBlackAddRsp) String() string { +func (x *Friend_BlackAdd_Rsp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendBlackAddRsp) ProtoMessage() {} +func (*Friend_BlackAdd_Rsp) ProtoMessage() {} -func (x *FriendBlackAddRsp) ProtoReflect() protoreflect.Message { +func (x *Friend_BlackAdd_Rsp) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -948,19 +948,19 @@ func (x *FriendBlackAddRsp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendBlackAddRsp.ProtoReflect.Descriptor instead. -func (*FriendBlackAddRsp) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_BlackAdd_Rsp.ProtoReflect.Descriptor instead. +func (*Friend_BlackAdd_Rsp) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{18} } -func (x *FriendBlackAddRsp) GetFriendId() string { +func (x *Friend_BlackAdd_Rsp) GetFriendId() string { if x != nil { return x.FriendId } return "" } -func (x *FriendBlackAddRsp) GetUserId() string { +func (x *Friend_BlackAdd_Rsp) GetUserId() string { if x != nil { return x.UserId } @@ -968,7 +968,7 @@ func (x *FriendBlackAddRsp) GetUserId() string { } //删除黑名单 -type FriendDelBlackReq struct { +type Friend_DelBlack_Req struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -976,8 +976,8 @@ type FriendDelBlackReq struct { FriendId string `protobuf:"bytes,1,opt,name=friendId,proto3" json:"friendId"` } -func (x *FriendDelBlackReq) Reset() { - *x = FriendDelBlackReq{} +func (x *Friend_DelBlack_Req) Reset() { + *x = Friend_DelBlack_Req{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -985,13 +985,13 @@ func (x *FriendDelBlackReq) Reset() { } } -func (x *FriendDelBlackReq) String() string { +func (x *Friend_DelBlack_Req) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendDelBlackReq) ProtoMessage() {} +func (*Friend_DelBlack_Req) ProtoMessage() {} -func (x *FriendDelBlackReq) ProtoReflect() protoreflect.Message { +func (x *Friend_DelBlack_Req) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1003,19 +1003,19 @@ func (x *FriendDelBlackReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendDelBlackReq.ProtoReflect.Descriptor instead. -func (*FriendDelBlackReq) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_DelBlack_Req.ProtoReflect.Descriptor instead. +func (*Friend_DelBlack_Req) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{19} } -func (x *FriendDelBlackReq) GetFriendId() string { +func (x *Friend_DelBlack_Req) GetFriendId() string { if x != nil { return x.FriendId } return "" } -type FriendDelBlackRsp struct { +type Friend_DelBlack_Rsp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1024,8 +1024,8 @@ type FriendDelBlackRsp struct { UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId"` } -func (x *FriendDelBlackRsp) Reset() { - *x = FriendDelBlackRsp{} +func (x *Friend_DelBlack_Rsp) Reset() { + *x = Friend_DelBlack_Rsp{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1033,13 +1033,13 @@ func (x *FriendDelBlackRsp) Reset() { } } -func (x *FriendDelBlackRsp) String() string { +func (x *Friend_DelBlack_Rsp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendDelBlackRsp) ProtoMessage() {} +func (*Friend_DelBlack_Rsp) ProtoMessage() {} -func (x *FriendDelBlackRsp) ProtoReflect() protoreflect.Message { +func (x *Friend_DelBlack_Rsp) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1051,19 +1051,19 @@ func (x *FriendDelBlackRsp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendDelBlackRsp.ProtoReflect.Descriptor instead. -func (*FriendDelBlackRsp) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_DelBlack_Rsp.ProtoReflect.Descriptor instead. +func (*Friend_DelBlack_Rsp) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{20} } -func (x *FriendDelBlackRsp) GetFriendId() string { +func (x *Friend_DelBlack_Rsp) GetFriendId() string { if x != nil { return x.FriendId } return "" } -func (x *FriendDelBlackRsp) GetUserId() string { +func (x *Friend_DelBlack_Rsp) GetUserId() string { if x != nil { return x.UserId } @@ -1071,7 +1071,7 @@ func (x *FriendDelBlackRsp) GetUserId() string { } //接收 -type FriendReceiveReq struct { +type Friend_Receive_Req struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1079,8 +1079,8 @@ type FriendReceiveReq struct { FriendId string `protobuf:"bytes,1,opt,name=friendId,proto3" json:"friendId"` } -func (x *FriendReceiveReq) Reset() { - *x = FriendReceiveReq{} +func (x *Friend_Receive_Req) Reset() { + *x = Friend_Receive_Req{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1088,13 +1088,13 @@ func (x *FriendReceiveReq) Reset() { } } -func (x *FriendReceiveReq) String() string { +func (x *Friend_Receive_Req) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendReceiveReq) ProtoMessage() {} +func (*Friend_Receive_Req) ProtoMessage() {} -func (x *FriendReceiveReq) ProtoReflect() protoreflect.Message { +func (x *Friend_Receive_Req) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1106,19 +1106,19 @@ func (x *FriendReceiveReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendReceiveReq.ProtoReflect.Descriptor instead. -func (*FriendReceiveReq) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_Receive_Req.ProtoReflect.Descriptor instead. +func (*Friend_Receive_Req) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{21} } -func (x *FriendReceiveReq) GetFriendId() string { +func (x *Friend_Receive_Req) GetFriendId() string { if x != nil { return x.FriendId } return "" } -type FriendReceiveRsp struct { +type Friend_Receive_Rsp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1127,8 +1127,8 @@ type FriendReceiveRsp struct { UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId"` } -func (x *FriendReceiveRsp) Reset() { - *x = FriendReceiveRsp{} +func (x *Friend_Receive_Rsp) Reset() { + *x = Friend_Receive_Rsp{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1136,13 +1136,13 @@ func (x *FriendReceiveRsp) Reset() { } } -func (x *FriendReceiveRsp) String() string { +func (x *Friend_Receive_Rsp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendReceiveRsp) ProtoMessage() {} +func (*Friend_Receive_Rsp) ProtoMessage() {} -func (x *FriendReceiveRsp) ProtoReflect() protoreflect.Message { +func (x *Friend_Receive_Rsp) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1154,19 +1154,19 @@ func (x *FriendReceiveRsp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendReceiveRsp.ProtoReflect.Descriptor instead. -func (*FriendReceiveRsp) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_Receive_Rsp.ProtoReflect.Descriptor instead. +func (*Friend_Receive_Rsp) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{22} } -func (x *FriendReceiveRsp) GetFriendId() string { +func (x *Friend_Receive_Rsp) GetFriendId() string { if x != nil { return x.FriendId } return "" } -func (x *FriendReceiveRsp) GetUserId() string { +func (x *Friend_Receive_Rsp) GetUserId() string { if x != nil { return x.UserId } @@ -1174,7 +1174,7 @@ func (x *FriendReceiveRsp) GetUserId() string { } //赠送 -type FriendGiveReq struct { +type Friend_Give_Req struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1182,8 +1182,8 @@ type FriendGiveReq struct { FriendId string `protobuf:"bytes,1,opt,name=friendId,proto3" json:"friendId"` } -func (x *FriendGiveReq) Reset() { - *x = FriendGiveReq{} +func (x *Friend_Give_Req) Reset() { + *x = Friend_Give_Req{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1191,13 +1191,13 @@ func (x *FriendGiveReq) Reset() { } } -func (x *FriendGiveReq) String() string { +func (x *Friend_Give_Req) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendGiveReq) ProtoMessage() {} +func (*Friend_Give_Req) ProtoMessage() {} -func (x *FriendGiveReq) ProtoReflect() protoreflect.Message { +func (x *Friend_Give_Req) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1209,19 +1209,19 @@ func (x *FriendGiveReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendGiveReq.ProtoReflect.Descriptor instead. -func (*FriendGiveReq) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_Give_Req.ProtoReflect.Descriptor instead. +func (*Friend_Give_Req) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{23} } -func (x *FriendGiveReq) GetFriendId() string { +func (x *Friend_Give_Req) GetFriendId() string { if x != nil { return x.FriendId } return "" } -type FriendGiveRsp struct { +type Friend_Give_Rsp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1230,8 +1230,8 @@ type FriendGiveRsp struct { UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId"` } -func (x *FriendGiveRsp) Reset() { - *x = FriendGiveRsp{} +func (x *Friend_Give_Rsp) Reset() { + *x = Friend_Give_Rsp{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1239,13 +1239,13 @@ func (x *FriendGiveRsp) Reset() { } } -func (x *FriendGiveRsp) String() string { +func (x *Friend_Give_Rsp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendGiveRsp) ProtoMessage() {} +func (*Friend_Give_Rsp) ProtoMessage() {} -func (x *FriendGiveRsp) ProtoReflect() protoreflect.Message { +func (x *Friend_Give_Rsp) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1257,19 +1257,19 @@ func (x *FriendGiveRsp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendGiveRsp.ProtoReflect.Descriptor instead. -func (*FriendGiveRsp) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_Give_Rsp.ProtoReflect.Descriptor instead. +func (*Friend_Give_Rsp) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{24} } -func (x *FriendGiveRsp) GetFriendId() string { +func (x *Friend_Give_Rsp) GetFriendId() string { if x != nil { return x.FriendId } return "" } -func (x *FriendGiveRsp) GetUserId() string { +func (x *Friend_Give_Rsp) GetUserId() string { if x != nil { return x.UserId } @@ -1277,7 +1277,7 @@ func (x *FriendGiveRsp) GetUserId() string { } //好友数量 -type FriendTotalReq struct { +type Friend_Total_Req struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1285,8 +1285,8 @@ type FriendTotalReq struct { FriendId string `protobuf:"bytes,1,opt,name=friendId,proto3" json:"friendId"` } -func (x *FriendTotalReq) Reset() { - *x = FriendTotalReq{} +func (x *Friend_Total_Req) Reset() { + *x = Friend_Total_Req{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1294,13 +1294,13 @@ func (x *FriendTotalReq) Reset() { } } -func (x *FriendTotalReq) String() string { +func (x *Friend_Total_Req) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendTotalReq) ProtoMessage() {} +func (*Friend_Total_Req) ProtoMessage() {} -func (x *FriendTotalReq) ProtoReflect() protoreflect.Message { +func (x *Friend_Total_Req) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1312,19 +1312,19 @@ func (x *FriendTotalReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendTotalReq.ProtoReflect.Descriptor instead. -func (*FriendTotalReq) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_Total_Req.ProtoReflect.Descriptor instead. +func (*Friend_Total_Req) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{25} } -func (x *FriendTotalReq) GetFriendId() string { +func (x *Friend_Total_Req) GetFriendId() string { if x != nil { return x.FriendId } return "" } -type FriendTotalRsp struct { +type Friend_Total_Rsp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1333,8 +1333,8 @@ type FriendTotalRsp struct { Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total"` //好友数量 } -func (x *FriendTotalRsp) Reset() { - *x = FriendTotalRsp{} +func (x *Friend_Total_Rsp) Reset() { + *x = Friend_Total_Rsp{} if protoimpl.UnsafeEnabled { mi := &file_friend_friend_msg_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1342,13 +1342,13 @@ func (x *FriendTotalRsp) Reset() { } } -func (x *FriendTotalRsp) String() string { +func (x *Friend_Total_Rsp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*FriendTotalRsp) ProtoMessage() {} +func (*Friend_Total_Rsp) ProtoMessage() {} -func (x *FriendTotalRsp) ProtoReflect() protoreflect.Message { +func (x *Friend_Total_Rsp) ProtoReflect() protoreflect.Message { mi := &file_friend_friend_msg_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1360,19 +1360,19 @@ func (x *FriendTotalRsp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use FriendTotalRsp.ProtoReflect.Descriptor instead. -func (*FriendTotalRsp) Descriptor() ([]byte, []int) { +// Deprecated: Use Friend_Total_Rsp.ProtoReflect.Descriptor instead. +func (*Friend_Total_Rsp) Descriptor() ([]byte, []int) { return file_friend_friend_msg_proto_rawDescGZIP(), []int{26} } -func (x *FriendTotalRsp) GetFriendId() string { +func (x *Friend_Total_Rsp) GetFriendId() string { if x != nil { return x.FriendId } return "" } -func (x *FriendTotalRsp) GetTotal() int32 { +func (x *Friend_Total_Rsp) GetTotal() int32 { if x != nil { return x.Total } @@ -1396,90 +1396,93 @@ var file_friend_friend_msg_proto_rawDesc = []byte{ 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, - 0x54, 0x69, 0x6d, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x30, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x61, 0x73, - 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x2c, 0x0a, 0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x49, 0x64, 0x22, 0x44, 0x0a, 0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, - 0x70, 0x70, 0x6c, 0x79, 0x52, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x22, 0x2a, 0x0a, 0x0c, 0x46, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x66, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x22, 0x42, 0x0a, 0x0c, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x44, 0x65, 0x6c, 0x52, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x2e, 0x0a, 0x0e, 0x46, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x67, 0x72, 0x65, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, - 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x73, 0x22, 0x22, 0x0a, 0x0e, 0x46, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x67, 0x72, 0x65, 0x65, 0x52, 0x73, 0x70, 0x12, 0x10, 0x0a, + 0x54, 0x69, 0x6d, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x4c, + 0x69, 0x73, 0x74, 0x5f, 0x52, 0x65, 0x71, 0x22, 0x32, 0x0a, 0x0f, 0x46, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x5f, 0x4c, 0x69, 0x73, 0x74, 0x5f, 0x52, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x6c, 0x69, + 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x42, 0x61, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x2e, 0x0a, 0x10, 0x46, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x5f, 0x52, 0x65, 0x71, 0x12, + 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x22, 0x46, 0x0a, 0x10, 0x46, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x5f, 0x52, 0x73, 0x70, 0x12, + 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x49, 0x64, 0x22, 0x2c, 0x0a, 0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x44, 0x65, + 0x6c, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, + 0x64, 0x22, 0x44, 0x0a, 0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x44, 0x65, 0x6c, 0x5f, + 0x52, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x12, + 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x30, 0x0a, 0x10, 0x46, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x5f, 0x41, 0x67, 0x72, 0x65, 0x65, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x66, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, + 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x73, 0x22, 0x24, 0x0a, 0x10, 0x46, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x5f, 0x41, 0x67, 0x72, 0x65, 0x65, 0x5f, 0x52, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x22, - 0x2f, 0x0a, 0x0f, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x75, 0x73, 0x65, 0x52, - 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x73, - 0x22, 0x23, 0x0a, 0x0f, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x75, 0x73, 0x65, - 0x52, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x22, 0x14, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, - 0x70, 0x70, 0x6c, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x35, 0x0a, 0x12, 0x46, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x73, - 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0b, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x61, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x69, - 0x73, 0x74, 0x22, 0x2d, 0x0a, 0x0f, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, - 0x65, 0x22, 0x36, 0x0a, 0x0f, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x61, 0x72, 0x63, - 0x68, 0x52, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x61, 0x73, - 0x65, 0x52, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x46, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, - 0x3b, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x07, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, + 0x31, 0x0a, 0x11, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x52, 0x65, 0x66, 0x75, 0x73, 0x65, + 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, + 0x64, 0x73, 0x22, 0x25, 0x0a, 0x11, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x52, 0x65, 0x66, + 0x75, 0x73, 0x65, 0x5f, 0x52, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x75, 0x6d, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x22, 0x16, 0x0a, 0x14, 0x46, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x5f, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x5f, 0x52, 0x65, + 0x71, 0x22, 0x37, 0x0a, 0x14, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x41, 0x70, 0x70, 0x6c, + 0x79, 0x4c, 0x69, 0x73, 0x74, 0x5f, 0x52, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x6c, 0x69, 0x73, + 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x42, 0x61, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x2f, 0x0a, 0x11, 0x46, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x52, 0x65, 0x71, 0x12, + 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x38, 0x0a, 0x11, 0x46, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x52, 0x73, 0x70, + 0x12, 0x23, 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0b, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x61, 0x73, 0x65, 0x52, 0x06, 0x66, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, + 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x5f, 0x52, 0x65, 0x71, 0x22, 0x3d, 0x0a, + 0x14, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x4c, 0x69, 0x73, + 0x74, 0x5f, 0x52, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x07, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, - 0x61, 0x73, 0x65, 0x52, 0x07, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x22, 0x2f, 0x0a, 0x11, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x41, 0x64, 0x64, 0x52, 0x65, - 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x22, 0x47, 0x0a, - 0x11, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x41, 0x64, 0x64, 0x52, - 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x16, - 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x2f, 0x0a, 0x11, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x44, 0x65, 0x6c, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x66, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x22, 0x47, 0x0a, 0x11, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x44, 0x65, 0x6c, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x52, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, - 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, - 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, - 0x22, 0x2e, 0x0a, 0x10, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, - 0x22, 0x46, 0x0a, 0x10, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x52, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x2b, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x47, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x47, - 0x69, 0x76, 0x65, 0x52, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x61, 0x73, 0x65, 0x52, 0x07, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x22, 0x31, 0x0a, 0x13, + 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x41, 0x64, 0x64, 0x5f, + 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x22, + 0x49, 0x0a, 0x13, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x41, + 0x64, 0x64, 0x5f, 0x52, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x2c, 0x0a, 0x0e, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, - 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x22, 0x42, 0x0a, 0x0e, 0x46, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x06, 0x5a, 0x04, - 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x31, 0x0a, 0x13, 0x46, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x44, 0x65, 0x6c, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x5f, 0x52, 0x65, + 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x22, 0x49, 0x0a, + 0x13, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x44, 0x65, 0x6c, 0x42, 0x6c, 0x61, 0x63, 0x6b, + 0x5f, 0x52, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, + 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x30, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, + 0x6e, 0x64, 0x5f, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1a, + 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x22, 0x48, 0x0a, 0x12, 0x46, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x5f, 0x52, 0x73, 0x70, + 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x22, 0x2d, 0x0a, 0x0f, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x47, + 0x69, 0x76, 0x65, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x49, 0x64, 0x22, 0x45, 0x0a, 0x0f, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x47, 0x69, + 0x76, 0x65, 0x5f, 0x52, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x2e, 0x0a, 0x10, 0x46, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1a, + 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x22, 0x44, 0x0a, 0x10, 0x46, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x52, 0x73, 0x70, 0x12, 0x1a, + 0x0a, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1496,39 +1499,39 @@ func file_friend_friend_msg_proto_rawDescGZIP() []byte { var file_friend_friend_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 27) var file_friend_friend_msg_proto_goTypes = []interface{}{ - (*FriendBase)(nil), // 0: FriendBase - (*FriendListReq)(nil), // 1: FriendListReq - (*FriendListRsp)(nil), // 2: FriendListRsp - (*FriendApplyReq)(nil), // 3: FriendApplyReq - (*FriendApplyRsp)(nil), // 4: FriendApplyRsp - (*FriendDelReq)(nil), // 5: FriendDelReq - (*FriendDelRsp)(nil), // 6: FriendDelRsp - (*FriendAgreeReq)(nil), // 7: FriendAgreeReq - (*FriendAgreeRsp)(nil), // 8: FriendAgreeRsp - (*FriendRefuseReq)(nil), // 9: FriendRefuseReq - (*FriendRefuseRsp)(nil), // 10: FriendRefuseRsp - (*FriendApplyListReq)(nil), // 11: FriendApplyListReq - (*FriendApplyListRsp)(nil), // 12: FriendApplyListRsp - (*FriendSearchReq)(nil), // 13: FriendSearchReq - (*FriendSearchRsp)(nil), // 14: FriendSearchRsp - (*FriendBlackListReq)(nil), // 15: FriendBlackListReq - (*FriendBlackListRsp)(nil), // 16: FriendBlackListRsp - (*FriendBlackAddReq)(nil), // 17: FriendBlackAddReq - (*FriendBlackAddRsp)(nil), // 18: FriendBlackAddRsp - (*FriendDelBlackReq)(nil), // 19: FriendDelBlackReq - (*FriendDelBlackRsp)(nil), // 20: FriendDelBlackRsp - (*FriendReceiveReq)(nil), // 21: FriendReceiveReq - (*FriendReceiveRsp)(nil), // 22: FriendReceiveRsp - (*FriendGiveReq)(nil), // 23: FriendGiveReq - (*FriendGiveRsp)(nil), // 24: FriendGiveRsp - (*FriendTotalReq)(nil), // 25: FriendTotalReq - (*FriendTotalRsp)(nil), // 26: FriendTotalRsp + (*FriendBase)(nil), // 0: FriendBase + (*Friend_List_Req)(nil), // 1: Friend_List_Req + (*Friend_List_Rsp)(nil), // 2: Friend_List_Rsp + (*Friend_Apply_Req)(nil), // 3: Friend_Apply_Req + (*Friend_Apply_Rsp)(nil), // 4: Friend_Apply_Rsp + (*Friend_Del_Req)(nil), // 5: Friend_Del_Req + (*Friend_Del_Rsp)(nil), // 6: Friend_Del_Rsp + (*Friend_Agree_Req)(nil), // 7: Friend_Agree_Req + (*Friend_Agree_Rsp)(nil), // 8: Friend_Agree_Rsp + (*Friend_Refuse_Req)(nil), // 9: Friend_Refuse_Req + (*Friend_Refuse_Rsp)(nil), // 10: Friend_Refuse_Rsp + (*Friend_ApplyList_Req)(nil), // 11: Friend_ApplyList_Req + (*Friend_ApplyList_Rsp)(nil), // 12: Friend_ApplyList_Rsp + (*Friend_Search_Req)(nil), // 13: Friend_Search_Req + (*Friend_Search_Rsp)(nil), // 14: Friend_Search_Rsp + (*Friend_BlackList_Req)(nil), // 15: Friend_BlackList_Req + (*Friend_BlackList_Rsp)(nil), // 16: Friend_BlackList_Rsp + (*Friend_BlackAdd_Req)(nil), // 17: Friend_BlackAdd_Req + (*Friend_BlackAdd_Rsp)(nil), // 18: Friend_BlackAdd_Rsp + (*Friend_DelBlack_Req)(nil), // 19: Friend_DelBlack_Req + (*Friend_DelBlack_Rsp)(nil), // 20: Friend_DelBlack_Rsp + (*Friend_Receive_Req)(nil), // 21: Friend_Receive_Req + (*Friend_Receive_Rsp)(nil), // 22: Friend_Receive_Rsp + (*Friend_Give_Req)(nil), // 23: Friend_Give_Req + (*Friend_Give_Rsp)(nil), // 24: Friend_Give_Rsp + (*Friend_Total_Req)(nil), // 25: Friend_Total_Req + (*Friend_Total_Rsp)(nil), // 26: Friend_Total_Rsp } var file_friend_friend_msg_proto_depIdxs = []int32{ - 0, // 0: FriendListRsp.list:type_name -> FriendBase - 0, // 1: FriendApplyListRsp.list:type_name -> FriendBase - 0, // 2: FriendSearchRsp.friend:type_name -> FriendBase - 0, // 3: FriendBlackListRsp.friends:type_name -> FriendBase + 0, // 0: Friend_List_Rsp.list:type_name -> FriendBase + 0, // 1: Friend_ApplyList_Rsp.list:type_name -> FriendBase + 0, // 2: Friend_Search_Rsp.friend:type_name -> FriendBase + 0, // 3: Friend_BlackList_Rsp.friends:type_name -> FriendBase 4, // [4:4] is the sub-list for method output_type 4, // [4:4] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name @@ -1555,7 +1558,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendListReq); i { + switch v := v.(*Friend_List_Req); i { case 0: return &v.state case 1: @@ -1567,7 +1570,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendListRsp); i { + switch v := v.(*Friend_List_Rsp); i { case 0: return &v.state case 1: @@ -1579,7 +1582,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendApplyReq); i { + switch v := v.(*Friend_Apply_Req); i { case 0: return &v.state case 1: @@ -1591,7 +1594,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendApplyRsp); i { + switch v := v.(*Friend_Apply_Rsp); i { case 0: return &v.state case 1: @@ -1603,7 +1606,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendDelReq); i { + switch v := v.(*Friend_Del_Req); i { case 0: return &v.state case 1: @@ -1615,7 +1618,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendDelRsp); i { + switch v := v.(*Friend_Del_Rsp); i { case 0: return &v.state case 1: @@ -1627,7 +1630,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendAgreeReq); i { + switch v := v.(*Friend_Agree_Req); i { case 0: return &v.state case 1: @@ -1639,7 +1642,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendAgreeRsp); i { + switch v := v.(*Friend_Agree_Rsp); i { case 0: return &v.state case 1: @@ -1651,7 +1654,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendRefuseReq); i { + switch v := v.(*Friend_Refuse_Req); i { case 0: return &v.state case 1: @@ -1663,7 +1666,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendRefuseRsp); i { + switch v := v.(*Friend_Refuse_Rsp); i { case 0: return &v.state case 1: @@ -1675,7 +1678,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendApplyListReq); i { + switch v := v.(*Friend_ApplyList_Req); i { case 0: return &v.state case 1: @@ -1687,7 +1690,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendApplyListRsp); i { + switch v := v.(*Friend_ApplyList_Rsp); i { case 0: return &v.state case 1: @@ -1699,7 +1702,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendSearchReq); i { + switch v := v.(*Friend_Search_Req); i { case 0: return &v.state case 1: @@ -1711,7 +1714,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendSearchRsp); i { + switch v := v.(*Friend_Search_Rsp); i { case 0: return &v.state case 1: @@ -1723,7 +1726,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendBlackListReq); i { + switch v := v.(*Friend_BlackList_Req); i { case 0: return &v.state case 1: @@ -1735,7 +1738,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendBlackListRsp); i { + switch v := v.(*Friend_BlackList_Rsp); i { case 0: return &v.state case 1: @@ -1747,7 +1750,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendBlackAddReq); i { + switch v := v.(*Friend_BlackAdd_Req); i { case 0: return &v.state case 1: @@ -1759,7 +1762,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendBlackAddRsp); i { + switch v := v.(*Friend_BlackAdd_Rsp); i { case 0: return &v.state case 1: @@ -1771,7 +1774,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendDelBlackReq); i { + switch v := v.(*Friend_DelBlack_Req); i { case 0: return &v.state case 1: @@ -1783,7 +1786,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendDelBlackRsp); i { + switch v := v.(*Friend_DelBlack_Rsp); i { case 0: return &v.state case 1: @@ -1795,7 +1798,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendReceiveReq); i { + switch v := v.(*Friend_Receive_Req); i { case 0: return &v.state case 1: @@ -1807,7 +1810,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendReceiveRsp); i { + switch v := v.(*Friend_Receive_Rsp); i { case 0: return &v.state case 1: @@ -1819,7 +1822,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendGiveReq); i { + switch v := v.(*Friend_Give_Req); i { case 0: return &v.state case 1: @@ -1831,7 +1834,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendGiveRsp); i { + switch v := v.(*Friend_Give_Rsp); i { case 0: return &v.state case 1: @@ -1843,7 +1846,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendTotalReq); i { + switch v := v.(*Friend_Total_Req); i { case 0: return &v.state case 1: @@ -1855,7 +1858,7 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendTotalRsp); i { + switch v := v.(*Friend_Total_Rsp); i { case 0: return &v.state case 1: diff --git a/pb/proto/friend/friend_msg.proto b/pb/proto/friend/friend_msg.proto index 924a40e3c..4498a9984 100644 --- a/pb/proto/friend/friend_msg.proto +++ b/pb/proto/friend/friend_msg.proto @@ -2,134 +2,107 @@ syntax = "proto3"; option go_package = ".;pb"; message FriendBase { - string userId = 1; //ID - string NickName = 2; //昵称 - int32 level = 3; //等级 - int32 avatar = 4; //头像 - int64 strength = 5; //战力 - int32 serverId = 6;//服务编号 - int64 offlineTime =7;//最近一次下线时间 0在线 + string userId = 1; // ID + string NickName = 2; //昵称 + int32 level = 3; //等级 + int32 avatar = 4; //头像 + int64 strength = 5; //战力 + int32 serverId = 6; //服务编号 + int64 offlineTime = 7; //最近一次下线时间 0在线 } //好友列表 -message FriendListReq{ +message Friend_List_Req {} -} - -message FriendListRsp{ - repeated FriendBase list = 1; -} +message Friend_List_Rsp { repeated FriendBase list = 1; } //申请好友 -message FriendApplyReq{ - string friendId = 1; //好友ID +message Friend_Apply_Req { + string friendId = 1; //好友ID } -message FriendApplyRsp{ - string userId = 1; //用户ID - string friendId =2;//好友ID +message Friend_Apply_Rsp { + string userId = 1; //用户ID + string friendId = 2; //好友ID } //删除好友 -message FriendDelReq{ - string friendId = 1;//好友ID - +message Friend_Del_Req { + string friendId = 1; //好友ID } -message FriendDelRsp{ - string friendId = 1;//好友ID - string userId = 2; //用户ID +message Friend_Del_Rsp { + string friendId = 1; //好友ID + string userId = 2; //用户ID } //同意 -message FriendAgreeReq{ - repeated string friendIds = 1; //被同意的用户 +message Friend_Agree_Req { + repeated string friendIds = 1; //被同意的用户 } -message FriendAgreeRsp{ - int32 Num = 1;//操作的数量 +message Friend_Agree_Rsp { + int32 Num = 1; //操作的数量 } //拒绝 -message FriendRefuseReq{ - repeated string friendIds = 1; //被拒绝的用户 +message Friend_Refuse_Req { + repeated string friendIds = 1; //被拒绝的用户 } -message FriendRefuseRsp{ - int32 Num = 1;//操作的数量 +message Friend_Refuse_Rsp { + int32 Num = 1; //操作的数量 } - //好友申请列表 -message FriendApplyListReq{ - -} -message FriendApplyListRsp{ - repeated FriendBase list = 1; -} +message Friend_ApplyList_Req {} +message Friend_ApplyList_Rsp { repeated FriendBase list = 1; } //好友搜索 -message FriendSearchReq{ - string nickName = 1; //好友昵称 +message Friend_Search_Req { + string nickName = 1; //好友昵称 } -message FriendSearchRsp{ - FriendBase friend = 1; -} +message Friend_Search_Rsp { FriendBase friend = 1; } //黑名单 -message FriendBlackListReq{ +message Friend_BlackList_Req {} -} - -message FriendBlackListRsp{ - repeated FriendBase friends = 1; -} +message Friend_BlackList_Rsp { repeated FriendBase friends = 1; } //添加黑名单 -message FriendBlackAddReq{ - string friendId = 1; -} +message Friend_BlackAdd_Req { string friendId = 1; } -message FriendBlackAddRsp{ - string friendId = 1; - string userId = 2; +message Friend_BlackAdd_Rsp { + string friendId = 1; + string userId = 2; } //删除黑名单 -message FriendDelBlackReq{ - string friendId = 1; -} +message Friend_DelBlack_Req { string friendId = 1; } -message FriendDelBlackRsp{ - string friendId = 1; - string userId = 2; +message Friend_DelBlack_Rsp { + string friendId = 1; + string userId = 2; } //接收 -message FriendReceiveReq{ - string friendId = 1; -} +message Friend_Receive_Req { string friendId = 1; } -message FriendReceiveRsp{ - string friendId = 1; - string userId = 2; +message Friend_Receive_Rsp { + string friendId = 1; + string userId = 2; } //赠送 -message FriendGiveReq{ - string friendId = 1; -} +message Friend_Give_Req { string friendId = 1; } -message FriendGiveRsp{ - string friendId = 1; - string userId = 2; +message Friend_Give_Rsp { + string friendId = 1; + string userId = 2; } - //好友数量 -message FriendTotalReq{ - string friendId = 1; -} +message Friend_Total_Req { string friendId = 1; } -message FriendTotalRsp{ - string friendId = 1; - int32 total = 2; //好友数量 +message Friend_Total_Rsp { + string friendId = 1; + int32 total = 2; //好友数量 } \ No newline at end of file diff --git a/services/comp_gateroute.go b/services/comp_gateroute.go index 1b7e1df2a..74701f3ec 100644 --- a/services/comp_gateroute.go +++ b/services/comp_gateroute.go @@ -159,7 +159,7 @@ func (this *SComp_GateRouteComp) ReceiveMsg(ctx context.Context, args *pb.AgentM } result := returnValues[0].Interface().(map[string]interface{}) returnValues = msghandle.fn.Func.Call([]reflect.Value{msghandle.rcvr, reflect.ValueOf(session), reflect.ValueOf(result), reflect.ValueOf(msg)}) - errcode := pb.ErrorCode(returnValues[1].Int()) + errcode := pb.ErrorCode(returnValues[0].Int()) if errcode != pb.ErrorCode_Success { log.Errorf("HandleUserMsg:%s msg:%v code:%d", args.Method, msg, code) reply.Code = errcode diff --git a/sys/cache/interfaceResult.go b/sys/cache/interfaceResult.go new file mode 100644 index 000000000..6e526c594 --- /dev/null +++ b/sys/cache/interfaceResult.go @@ -0,0 +1,17 @@ +package cache + +type InterfaceResult struct { + Result interface{} + Err error +} + +func NewInterfaceResult(result interface{}, err error) *InterfaceResult { + return &InterfaceResult{Result: result, Err: err} +} + +func (ths *InterfaceResult) Unwrap_Or(v interface{}) interface{} { + if ths.Err != nil { + return v + } + return ths.Result +} diff --git a/sys/cache/optionAttr.go b/sys/cache/optionAttr.go new file mode 100644 index 000000000..39a8745cb --- /dev/null +++ b/sys/cache/optionAttr.go @@ -0,0 +1,47 @@ +package cache + +import "fmt" + +const ( + ATTR_MGOLOG = "mgolog" + ATTR_INSERT = "insert" + + OpenMgoLog = false //true表示不禁用Mgolog,即不传入WithDisabledMgoLog()时也表示禁用 +) + +type empty struct { +} + +type OperationAttr struct { + Name string + Value interface{} +} + +type OperationAttrs []*OperationAttr + +func (this OperationAttrs) Find(name string) *InterfaceResult { + for _, v := range this { + if v.Name == name { + return NewInterfaceResult(v.Value, nil) + } + } + + if OpenMgoLog { + return NewInterfaceResult(ATTR_MGOLOG, nil) + } + return NewInterfaceResult(nil, fmt.Errorf("Operationattrs not found err: %v", name)) +} + +func WithDisabledMgoLog() *OperationAttr { + return &OperationAttr{ + Name: ATTR_MGOLOG, + Value: empty{}, + } +} + +func WithND() *OperationAttr { + return &OperationAttr{ + Name: ATTR_INSERT, + Value: true, + } +}