From c5e99c66045aa75b42374e3ab3ce54ee5bdd2d47 Mon Sep 17 00:00:00 2001 From: zhaocy Date: Tue, 7 Jun 2022 19:45:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A5=BD=E5=8F=8B=E5=8D=8F=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/core.go | 11 +- modules/friend/friend_comp.go | 67 ++ modules/friend/module.go | 33 + pb/friend_db.pb.go | 146 ++++ pb/friend_msg.pb.go | 1520 +++++++++++++++++++++++++++++++++ pb/mail_db.pb.go | 2 +- pb/proto/friend_db.proto | 8 + pb/proto/friend_msg.proto | 111 +++ pb/proto/user_db.proto | 1 + pb/user_db.pb.go | 15 +- pb_2.7.py | 4 +- 11 files changed, 1908 insertions(+), 10 deletions(-) create mode 100644 modules/friend/friend_comp.go create mode 100644 modules/friend/module.go create mode 100644 pb/friend_db.pb.go create mode 100644 pb/friend_msg.pb.go create mode 100644 pb/proto/friend_db.proto create mode 100644 pb/proto/friend_msg.proto diff --git a/comm/core.go b/comm/core.go index 48650a254..f2357dc7b 100644 --- a/comm/core.go +++ b/comm/core.go @@ -14,11 +14,12 @@ const ( ) const ( - SM_GateModule core.M_Modules = "gateway" //gate模块 网关服务模块 - SM_WebModule core.M_Modules = "web" //web模块 - SM_UserModule core.M_Modules = "user" //用户模块 - SM_PackModule core.M_Modules = "pack" //背包模块 - SM_MailModule core.M_Modules = "mail" //邮件模块 + SM_GateModule core.M_Modules = "gateway" //gate模块 网关服务模块 + SM_WebModule core.M_Modules = "web" //web模块 + SM_UserModule core.M_Modules = "user" //用户模块 + SM_PackModule core.M_Modules = "pack" //背包模块 + SM_MailModule core.M_Modules = "mail" //邮件模块 + SM_FriendModule core.M_Modules = "friend" //好友模块 ) const ( //Rpc diff --git a/modules/friend/friend_comp.go b/modules/friend/friend_comp.go new file mode 100644 index 000000000..b7b51d720 --- /dev/null +++ b/modules/friend/friend_comp.go @@ -0,0 +1,67 @@ +package friend + +import ( + "context" + "go_dreamfactory/comm" + "go_dreamfactory/modules" + "go_dreamfactory/pb" +) + +type FriendComp struct { + modules.MComp_GateComp +} + +//搜索 +func (this *FriendComp) Search(ctx context.Context, session comm.IUserSession, req *pb.FriendSearchReq) error { + return nil +} + +//添加好友 +func (this *FriendComp) Add(ctx context.Context, session comm.IUserSession, req *pb.FriendAddReq) error { + return nil +} + +//删除好友 +func (this *FriendComp) Del(ctx context.Context, session comm.IUserSession, req *pb.FriendDelReq) error { + return nil +} + +//好友列表 +func (this *FriendComp) List(ctx context.Context, session comm.IUserSession, req *pb.FriendListReq) error { + return nil +} + +//同意或拒绝 +func (this *FriendComp) Check(ctx context.Context, session comm.IUserSession, req *pb.FriendAgreeOrRefuseReq) error { + return nil +} + +//批量同意或拒绝 +func (this *FriendComp) CheckAll(ctx context.Context, session comm.IUserSession, req *pb.FriendAgreeOrRefuseReq) error { + return nil +} + +//赠送或接收 +func (this *FriendComp) ReceSend(ctx context.Context, session comm.IUserSession, req *pb.FriendReceiveOrSendReq) error { + return nil +} + +//好友数量 +func (this *FriendComp) Total(ctx context.Context, session comm.IUserSession, req *pb.FriendTotalReq) error { + return nil +} + +//好友详情 +func (this *FriendComp) Detail(ctx context.Context, session comm.IUserSession, req *pb.FriendTotalReq) error { + return nil +} + +//黑名单 +func (this *FriendComp) Blacklist(ctx context.Context, session comm.IUserSession, req *pb.FriendBlackListReq) error { + return nil +} + +//加入黑名单 +func (this *FriendComp) Addblack(ctx context.Context, session comm.IUserSession, req *pb.FriendBlackAddReq) error { + return nil +} diff --git a/modules/friend/module.go b/modules/friend/module.go new file mode 100644 index 000000000..8ff8b3e6a --- /dev/null +++ b/modules/friend/module.go @@ -0,0 +1,33 @@ +package friend + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/modules" + + "github.com/liwei1dao/lego/core" +) + +func NewModule() core.IModule { + m := new(Friend) + return m +} + +type Friend struct { + modules.ModuleBase + +} + +func (this *Friend) GetType() core.M_Modules { + return comm.SM_UserModule +} + +func (this *Friend) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { + err = this.ModuleBase.Init(service, module, options) + + return +} + +func (this *Friend) OnInstallComp() { + this.ModuleBase.OnInstallComp() + +} diff --git a/pb/friend_db.pb.go b/pb/friend_db.pb.go new file mode 100644 index 000000000..6112889fe --- /dev/null +++ b/pb/friend_db.pb.go @@ -0,0 +1,146 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.20.0 +// source: friend_db.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Friend struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserData *DB_UserData `protobuf:"bytes,1,opt,name=UserData,proto3" json:"UserData,omitempty"` //用户 +} + +func (x *Friend) Reset() { + *x = Friend{} + if protoimpl.UnsafeEnabled { + mi := &file_friend_db_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Friend) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Friend) ProtoMessage() {} + +func (x *Friend) ProtoReflect() protoreflect.Message { + mi := &file_friend_db_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Friend.ProtoReflect.Descriptor instead. +func (*Friend) Descriptor() ([]byte, []int) { + return file_friend_db_proto_rawDescGZIP(), []int{0} +} + +func (x *Friend) GetUserData() *DB_UserData { + if x != nil { + return x.UserData + } + return nil +} + +var File_friend_db_proto protoreflect.FileDescriptor + +var file_friend_db_proto_rawDesc = []byte{ + 0x0a, 0x0f, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x32, 0x0a, 0x06, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x28, 0x0a, 0x08, 0x55, 0x73, + 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, + 0x42, 0x5f, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x55, 0x73, 0x65, 0x72, + 0x44, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_friend_db_proto_rawDescOnce sync.Once + file_friend_db_proto_rawDescData = file_friend_db_proto_rawDesc +) + +func file_friend_db_proto_rawDescGZIP() []byte { + file_friend_db_proto_rawDescOnce.Do(func() { + file_friend_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_friend_db_proto_rawDescData) + }) + return file_friend_db_proto_rawDescData +} + +var file_friend_db_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_friend_db_proto_goTypes = []interface{}{ + (*Friend)(nil), // 0: Friend + (*DB_UserData)(nil), // 1: DB_UserData +} +var file_friend_db_proto_depIdxs = []int32{ + 1, // 0: Friend.UserData:type_name -> DB_UserData + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_friend_db_proto_init() } +func file_friend_db_proto_init() { + if File_friend_db_proto != nil { + return + } + file_user_db_proto_init() + if !protoimpl.UnsafeEnabled { + file_friend_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Friend); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_friend_db_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_friend_db_proto_goTypes, + DependencyIndexes: file_friend_db_proto_depIdxs, + MessageInfos: file_friend_db_proto_msgTypes, + }.Build() + File_friend_db_proto = out.File + file_friend_db_proto_rawDesc = nil + file_friend_db_proto_goTypes = nil + file_friend_db_proto_depIdxs = nil +} diff --git a/pb/friend_msg.pb.go b/pb/friend_msg.pb.go new file mode 100644 index 000000000..da58871e6 --- /dev/null +++ b/pb/friend_msg.pb.go @@ -0,0 +1,1520 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.20.0 +// source: friend_msg.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type FriendBase struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` //ID + NickName string `protobuf:"bytes,2,opt,name=NickName,proto3" json:"NickName,omitempty"` //昵称 + Level int32 `protobuf:"varint,3,opt,name=level,proto3" json:"level,omitempty"` //等级 + Avatar int32 `protobuf:"varint,4,opt,name=avatar,proto3" json:"avatar,omitempty"` //头像 + Strength int64 `protobuf:"varint,5,opt,name=strength,proto3" json:"strength,omitempty"` //战力 + ServerId int32 `protobuf:"varint,6,opt,name=serverId,proto3" json:"serverId,omitempty"` //服务编号 + OfflineTime int64 `protobuf:"varint,7,opt,name=offlineTime,proto3" json:"offlineTime,omitempty"` //最近一次下线时间 0在线 +} + +func (x *FriendBase) Reset() { + *x = FriendBase{} + if protoimpl.UnsafeEnabled { + mi := &file_friend_msg_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FriendBase) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FriendBase) ProtoMessage() {} + +func (x *FriendBase) ProtoReflect() protoreflect.Message { + mi := &file_friend_msg_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FriendBase.ProtoReflect.Descriptor instead. +func (*FriendBase) Descriptor() ([]byte, []int) { + return file_friend_msg_proto_rawDescGZIP(), []int{0} +} + +func (x *FriendBase) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *FriendBase) GetNickName() string { + if x != nil { + return x.NickName + } + return "" +} + +func (x *FriendBase) GetLevel() int32 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *FriendBase) GetAvatar() int32 { + if x != nil { + return x.Avatar + } + return 0 +} + +func (x *FriendBase) GetStrength() int64 { + if x != nil { + return x.Strength + } + return 0 +} + +func (x *FriendBase) GetServerId() int32 { + if x != nil { + return x.ServerId + } + return 0 +} + +func (x *FriendBase) GetOfflineTime() int64 { + if x != nil { + return x.OfflineTime + } + return 0 +} + +//好友列表 +type FriendListReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *FriendListReq) Reset() { + *x = FriendListReq{} + if protoimpl.UnsafeEnabled { + mi := &file_friend_msg_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FriendListReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FriendListReq) ProtoMessage() {} + +func (x *FriendListReq) ProtoReflect() protoreflect.Message { + mi := &file_friend_msg_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FriendListReq.ProtoReflect.Descriptor instead. +func (*FriendListReq) Descriptor() ([]byte, []int) { + return file_friend_msg_proto_rawDescGZIP(), []int{1} +} + +type FriendListRsp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + List []*Friend `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` +} + +func (x *FriendListRsp) Reset() { + *x = FriendListRsp{} + if protoimpl.UnsafeEnabled { + mi := &file_friend_msg_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FriendListRsp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FriendListRsp) ProtoMessage() {} + +func (x *FriendListRsp) ProtoReflect() protoreflect.Message { + mi := &file_friend_msg_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FriendListRsp.ProtoReflect.Descriptor instead. +func (*FriendListRsp) Descriptor() ([]byte, []int) { + return file_friend_msg_proto_rawDescGZIP(), []int{2} +} + +func (x *FriendListRsp) GetList() []*Friend { + if x != nil { + return x.List + } + return nil +} + +//添加好友 +type FriendAddReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FriendId string `protobuf:"bytes,1,opt,name=friendId,proto3" json:"friendId,omitempty"` //好友ID +} + +func (x *FriendAddReq) Reset() { + *x = FriendAddReq{} + if protoimpl.UnsafeEnabled { + mi := &file_friend_msg_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FriendAddReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FriendAddReq) ProtoMessage() {} + +func (x *FriendAddReq) ProtoReflect() protoreflect.Message { + mi := &file_friend_msg_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FriendAddReq.ProtoReflect.Descriptor instead. +func (*FriendAddReq) Descriptor() ([]byte, []int) { + return file_friend_msg_proto_rawDescGZIP(), []int{3} +} + +func (x *FriendAddReq) GetFriendId() string { + if x != nil { + return x.FriendId + } + return "" +} + +type FriendAddRsp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` //用户ID +} + +func (x *FriendAddRsp) Reset() { + *x = FriendAddRsp{} + if protoimpl.UnsafeEnabled { + mi := &file_friend_msg_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FriendAddRsp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FriendAddRsp) ProtoMessage() {} + +func (x *FriendAddRsp) ProtoReflect() protoreflect.Message { + mi := &file_friend_msg_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FriendAddRsp.ProtoReflect.Descriptor instead. +func (*FriendAddRsp) Descriptor() ([]byte, []int) { + return file_friend_msg_proto_rawDescGZIP(), []int{4} +} + +func (x *FriendAddRsp) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +//删除好友 +type FriendDelReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FriendId string `protobuf:"bytes,1,opt,name=friendId,proto3" json:"friendId,omitempty"` //好友ID +} + +func (x *FriendDelReq) Reset() { + *x = FriendDelReq{} + if protoimpl.UnsafeEnabled { + mi := &file_friend_msg_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FriendDelReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FriendDelReq) ProtoMessage() {} + +func (x *FriendDelReq) ProtoReflect() protoreflect.Message { + mi := &file_friend_msg_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FriendDelReq.ProtoReflect.Descriptor instead. +func (*FriendDelReq) Descriptor() ([]byte, []int) { + return file_friend_msg_proto_rawDescGZIP(), []int{5} +} + +func (x *FriendDelReq) GetFriendId() string { + if x != nil { + return x.FriendId + } + return "" +} + +type FriendDelRsp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FriendId string `protobuf:"bytes,1,opt,name=friendId,proto3" json:"friendId,omitempty"` //好友ID + UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"` //用户ID +} + +func (x *FriendDelRsp) Reset() { + *x = FriendDelRsp{} + if protoimpl.UnsafeEnabled { + mi := &file_friend_msg_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FriendDelRsp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FriendDelRsp) ProtoMessage() {} + +func (x *FriendDelRsp) ProtoReflect() protoreflect.Message { + mi := &file_friend_msg_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FriendDelRsp.ProtoReflect.Descriptor instead. +func (*FriendDelRsp) Descriptor() ([]byte, []int) { + return file_friend_msg_proto_rawDescGZIP(), []int{6} +} + +func (x *FriendDelRsp) GetFriendId() string { + if x != nil { + return x.FriendId + } + return "" +} + +func (x *FriendDelRsp) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +//同意或拒绝 +type FriendAgreeOrRefuseReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FriendId string `protobuf:"bytes,1,opt,name=friendId,proto3" json:"friendId,omitempty"` //被同意或拒绝的用户 + IsAgree bool `protobuf:"varint,2,opt,name=isAgree,proto3" json:"isAgree,omitempty"` +} + +func (x *FriendAgreeOrRefuseReq) Reset() { + *x = FriendAgreeOrRefuseReq{} + if protoimpl.UnsafeEnabled { + mi := &file_friend_msg_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FriendAgreeOrRefuseReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FriendAgreeOrRefuseReq) ProtoMessage() {} + +func (x *FriendAgreeOrRefuseReq) ProtoReflect() protoreflect.Message { + mi := &file_friend_msg_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FriendAgreeOrRefuseReq.ProtoReflect.Descriptor instead. +func (*FriendAgreeOrRefuseReq) Descriptor() ([]byte, []int) { + return file_friend_msg_proto_rawDescGZIP(), []int{7} +} + +func (x *FriendAgreeOrRefuseReq) GetFriendId() string { + if x != nil { + return x.FriendId + } + return "" +} + +func (x *FriendAgreeOrRefuseReq) GetIsAgree() bool { + if x != nil { + return x.IsAgree + } + return false +} + +type FriendAgressOrRefuseRsp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Num int32 `protobuf:"varint,1,opt,name=Num,proto3" json:"Num,omitempty"` //操作的数量 + IsAgree bool `protobuf:"varint,2,opt,name=isAgree,proto3" json:"isAgree,omitempty"` +} + +func (x *FriendAgressOrRefuseRsp) Reset() { + *x = FriendAgressOrRefuseRsp{} + if protoimpl.UnsafeEnabled { + mi := &file_friend_msg_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FriendAgressOrRefuseRsp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FriendAgressOrRefuseRsp) ProtoMessage() {} + +func (x *FriendAgressOrRefuseRsp) ProtoReflect() protoreflect.Message { + mi := &file_friend_msg_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FriendAgressOrRefuseRsp.ProtoReflect.Descriptor instead. +func (*FriendAgressOrRefuseRsp) Descriptor() ([]byte, []int) { + return file_friend_msg_proto_rawDescGZIP(), []int{8} +} + +func (x *FriendAgressOrRefuseRsp) GetNum() int32 { + if x != nil { + return x.Num + } + return 0 +} + +func (x *FriendAgressOrRefuseRsp) GetIsAgree() bool { + if x != nil { + return x.IsAgree + } + return false +} + +//好友申请列表 +type FriendApplyListReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *FriendApplyListReq) Reset() { + *x = FriendApplyListReq{} + if protoimpl.UnsafeEnabled { + mi := &file_friend_msg_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FriendApplyListReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FriendApplyListReq) ProtoMessage() {} + +func (x *FriendApplyListReq) ProtoReflect() protoreflect.Message { + mi := &file_friend_msg_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FriendApplyListReq.ProtoReflect.Descriptor instead. +func (*FriendApplyListReq) Descriptor() ([]byte, []int) { + return file_friend_msg_proto_rawDescGZIP(), []int{9} +} + +type FriendApplyListRsp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *FriendApplyListRsp) Reset() { + *x = FriendApplyListRsp{} + if protoimpl.UnsafeEnabled { + mi := &file_friend_msg_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FriendApplyListRsp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FriendApplyListRsp) ProtoMessage() {} + +func (x *FriendApplyListRsp) ProtoReflect() protoreflect.Message { + mi := &file_friend_msg_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FriendApplyListRsp.ProtoReflect.Descriptor instead. +func (*FriendApplyListRsp) Descriptor() ([]byte, []int) { + return file_friend_msg_proto_rawDescGZIP(), []int{10} +} + +//好友搜索 +type FriendSearchReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FriendId string `protobuf:"bytes,1,opt,name=friendId,proto3" json:"friendId,omitempty"` + NickName string `protobuf:"bytes,2,opt,name=nickName,proto3" json:"nickName,omitempty"` //好友昵称 +} + +func (x *FriendSearchReq) Reset() { + *x = FriendSearchReq{} + if protoimpl.UnsafeEnabled { + mi := &file_friend_msg_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FriendSearchReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FriendSearchReq) ProtoMessage() {} + +func (x *FriendSearchReq) ProtoReflect() protoreflect.Message { + mi := &file_friend_msg_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FriendSearchReq.ProtoReflect.Descriptor instead. +func (*FriendSearchReq) Descriptor() ([]byte, []int) { + return file_friend_msg_proto_rawDescGZIP(), []int{11} +} + +func (x *FriendSearchReq) GetFriendId() string { + if x != nil { + return x.FriendId + } + return "" +} + +func (x *FriendSearchReq) GetNickName() string { + if x != nil { + return x.NickName + } + return "" +} + +type FriendSearchRsp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Friends []*FriendBase `protobuf:"bytes,1,rep,name=friends,proto3" json:"friends,omitempty"` +} + +func (x *FriendSearchRsp) Reset() { + *x = FriendSearchRsp{} + if protoimpl.UnsafeEnabled { + mi := &file_friend_msg_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FriendSearchRsp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FriendSearchRsp) ProtoMessage() {} + +func (x *FriendSearchRsp) ProtoReflect() protoreflect.Message { + mi := &file_friend_msg_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FriendSearchRsp.ProtoReflect.Descriptor instead. +func (*FriendSearchRsp) Descriptor() ([]byte, []int) { + return file_friend_msg_proto_rawDescGZIP(), []int{12} +} + +func (x *FriendSearchRsp) GetFriends() []*FriendBase { + if x != nil { + return x.Friends + } + return nil +} + +//黑名单 +type FriendBlackListReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *FriendBlackListReq) Reset() { + *x = FriendBlackListReq{} + if protoimpl.UnsafeEnabled { + mi := &file_friend_msg_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FriendBlackListReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FriendBlackListReq) ProtoMessage() {} + +func (x *FriendBlackListReq) ProtoReflect() protoreflect.Message { + mi := &file_friend_msg_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FriendBlackListReq.ProtoReflect.Descriptor instead. +func (*FriendBlackListReq) Descriptor() ([]byte, []int) { + return file_friend_msg_proto_rawDescGZIP(), []int{13} +} + +type FriendBlackListRsp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Friends []*FriendBase `protobuf:"bytes,1,rep,name=friends,proto3" json:"friends,omitempty"` +} + +func (x *FriendBlackListRsp) Reset() { + *x = FriendBlackListRsp{} + if protoimpl.UnsafeEnabled { + mi := &file_friend_msg_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FriendBlackListRsp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FriendBlackListRsp) ProtoMessage() {} + +func (x *FriendBlackListRsp) ProtoReflect() protoreflect.Message { + mi := &file_friend_msg_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FriendBlackListRsp.ProtoReflect.Descriptor instead. +func (*FriendBlackListRsp) Descriptor() ([]byte, []int) { + return file_friend_msg_proto_rawDescGZIP(), []int{14} +} + +func (x *FriendBlackListRsp) GetFriends() []*FriendBase { + if x != nil { + return x.Friends + } + return nil +} + +//添加黑名单 +type FriendBlackAddReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FriendId string `protobuf:"bytes,1,opt,name=friendId,proto3" json:"friendId,omitempty"` +} + +func (x *FriendBlackAddReq) Reset() { + *x = FriendBlackAddReq{} + if protoimpl.UnsafeEnabled { + mi := &file_friend_msg_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FriendBlackAddReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FriendBlackAddReq) ProtoMessage() {} + +func (x *FriendBlackAddReq) ProtoReflect() protoreflect.Message { + mi := &file_friend_msg_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FriendBlackAddReq.ProtoReflect.Descriptor instead. +func (*FriendBlackAddReq) Descriptor() ([]byte, []int) { + return file_friend_msg_proto_rawDescGZIP(), []int{15} +} + +func (x *FriendBlackAddReq) GetFriendId() string { + if x != nil { + return x.FriendId + } + return "" +} + +type FriendBlackAddRsp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FriendId string `protobuf:"bytes,1,opt,name=friendId,proto3" json:"friendId,omitempty"` + UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"` +} + +func (x *FriendBlackAddRsp) Reset() { + *x = FriendBlackAddRsp{} + if protoimpl.UnsafeEnabled { + mi := &file_friend_msg_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FriendBlackAddRsp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FriendBlackAddRsp) ProtoMessage() {} + +func (x *FriendBlackAddRsp) ProtoReflect() protoreflect.Message { + mi := &file_friend_msg_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FriendBlackAddRsp.ProtoReflect.Descriptor instead. +func (*FriendBlackAddRsp) Descriptor() ([]byte, []int) { + return file_friend_msg_proto_rawDescGZIP(), []int{16} +} + +func (x *FriendBlackAddRsp) GetFriendId() string { + if x != nil { + return x.FriendId + } + return "" +} + +func (x *FriendBlackAddRsp) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +//赠送或接收 +type FriendReceiveOrSendReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FriendId string `protobuf:"bytes,1,opt,name=friendId,proto3" json:"friendId,omitempty"` + IsReceive bool `protobuf:"varint,2,opt,name=isReceive,proto3" json:"isReceive,omitempty"` +} + +func (x *FriendReceiveOrSendReq) Reset() { + *x = FriendReceiveOrSendReq{} + if protoimpl.UnsafeEnabled { + mi := &file_friend_msg_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FriendReceiveOrSendReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FriendReceiveOrSendReq) ProtoMessage() {} + +func (x *FriendReceiveOrSendReq) ProtoReflect() protoreflect.Message { + mi := &file_friend_msg_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FriendReceiveOrSendReq.ProtoReflect.Descriptor instead. +func (*FriendReceiveOrSendReq) Descriptor() ([]byte, []int) { + return file_friend_msg_proto_rawDescGZIP(), []int{17} +} + +func (x *FriendReceiveOrSendReq) GetFriendId() string { + if x != nil { + return x.FriendId + } + return "" +} + +func (x *FriendReceiveOrSendReq) GetIsReceive() bool { + if x != nil { + return x.IsReceive + } + return false +} + +type FriendReceiveOrSendRsp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FriendId string `protobuf:"bytes,1,opt,name=friendId,proto3" json:"friendId,omitempty"` + UserId string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"` + IsReceive bool `protobuf:"varint,3,opt,name=isReceive,proto3" json:"isReceive,omitempty"` +} + +func (x *FriendReceiveOrSendRsp) Reset() { + *x = FriendReceiveOrSendRsp{} + if protoimpl.UnsafeEnabled { + mi := &file_friend_msg_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FriendReceiveOrSendRsp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FriendReceiveOrSendRsp) ProtoMessage() {} + +func (x *FriendReceiveOrSendRsp) ProtoReflect() protoreflect.Message { + mi := &file_friend_msg_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FriendReceiveOrSendRsp.ProtoReflect.Descriptor instead. +func (*FriendReceiveOrSendRsp) Descriptor() ([]byte, []int) { + return file_friend_msg_proto_rawDescGZIP(), []int{18} +} + +func (x *FriendReceiveOrSendRsp) GetFriendId() string { + if x != nil { + return x.FriendId + } + return "" +} + +func (x *FriendReceiveOrSendRsp) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *FriendReceiveOrSendRsp) GetIsReceive() bool { + if x != nil { + return x.IsReceive + } + return false +} + +//好友数量 +type FriendTotalReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FriendId string `protobuf:"bytes,1,opt,name=friendId,proto3" json:"friendId,omitempty"` +} + +func (x *FriendTotalReq) Reset() { + *x = FriendTotalReq{} + if protoimpl.UnsafeEnabled { + mi := &file_friend_msg_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FriendTotalReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FriendTotalReq) ProtoMessage() {} + +func (x *FriendTotalReq) ProtoReflect() protoreflect.Message { + mi := &file_friend_msg_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FriendTotalReq.ProtoReflect.Descriptor instead. +func (*FriendTotalReq) Descriptor() ([]byte, []int) { + return file_friend_msg_proto_rawDescGZIP(), []int{19} +} + +func (x *FriendTotalReq) GetFriendId() string { + if x != nil { + return x.FriendId + } + return "" +} + +type FriendTotalRsp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FriendId string `protobuf:"bytes,1,opt,name=friendId,proto3" json:"friendId,omitempty"` + Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` //好友数量 +} + +func (x *FriendTotalRsp) Reset() { + *x = FriendTotalRsp{} + if protoimpl.UnsafeEnabled { + mi := &file_friend_msg_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FriendTotalRsp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FriendTotalRsp) ProtoMessage() {} + +func (x *FriendTotalRsp) ProtoReflect() protoreflect.Message { + mi := &file_friend_msg_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FriendTotalRsp.ProtoReflect.Descriptor instead. +func (*FriendTotalRsp) Descriptor() ([]byte, []int) { + return file_friend_msg_proto_rawDescGZIP(), []int{20} +} + +func (x *FriendTotalRsp) GetFriendId() string { + if x != nil { + return x.FriendId + } + return "" +} + +func (x *FriendTotalRsp) GetTotal() int32 { + if x != nil { + return x.Total + } + return 0 +} + +var File_friend_msg_proto protoreflect.FileDescriptor + +var file_friend_msg_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x0f, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xc8, 0x01, 0x0a, 0x0a, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x61, + 0x73, 0x65, 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, 0x4e, 0x69, + 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4e, 0x69, + 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x06, + 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x61, 0x76, + 0x61, 0x74, 0x61, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 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, + 0x2c, 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x73, 0x70, + 0x12, 0x1b, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, + 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x2a, 0x0a, + 0x0c, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 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, 0x26, 0x0a, 0x0c, 0x46, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x41, 0x64, 0x64, 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, 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, 0x4e, 0x0a, 0x16, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x67, 0x72, 0x65, 0x65, + 0x4f, 0x72, 0x52, 0x65, 0x66, 0x75, 0x73, 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, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x41, 0x67, 0x72, + 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x41, 0x67, 0x72, 0x65, + 0x65, 0x22, 0x45, 0x0a, 0x17, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x67, 0x72, 0x65, 0x73, + 0x73, 0x4f, 0x72, 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, 0x12, 0x18, + 0x0a, 0x07, 0x69, 0x73, 0x41, 0x67, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x07, 0x69, 0x73, 0x41, 0x67, 0x72, 0x65, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, + 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x14, + 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x73, 0x70, 0x22, 0x49, 0x0a, 0x0f, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, + 0x61, 0x72, 0x63, 0x68, 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, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x22, + 0x38, 0x0a, 0x0f, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 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, 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, + 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, 0x52, 0x0a, 0x16, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4f, 0x72, 0x53, 0x65, 0x6e, 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, 0x12, 0x1c, 0x0a, 0x09, + 0x69, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x09, 0x69, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x22, 0x6a, 0x0a, 0x16, 0x46, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4f, 0x72, 0x53, 0x65, 0x6e, + 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, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x52, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x52, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 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, +} + +var ( + file_friend_msg_proto_rawDescOnce sync.Once + file_friend_msg_proto_rawDescData = file_friend_msg_proto_rawDesc +) + +func file_friend_msg_proto_rawDescGZIP() []byte { + file_friend_msg_proto_rawDescOnce.Do(func() { + file_friend_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_friend_msg_proto_rawDescData) + }) + return file_friend_msg_proto_rawDescData +} + +var file_friend_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_friend_msg_proto_goTypes = []interface{}{ + (*FriendBase)(nil), // 0: FriendBase + (*FriendListReq)(nil), // 1: FriendListReq + (*FriendListRsp)(nil), // 2: FriendListRsp + (*FriendAddReq)(nil), // 3: FriendAddReq + (*FriendAddRsp)(nil), // 4: FriendAddRsp + (*FriendDelReq)(nil), // 5: FriendDelReq + (*FriendDelRsp)(nil), // 6: FriendDelRsp + (*FriendAgreeOrRefuseReq)(nil), // 7: FriendAgreeOrRefuseReq + (*FriendAgressOrRefuseRsp)(nil), // 8: FriendAgressOrRefuseRsp + (*FriendApplyListReq)(nil), // 9: FriendApplyListReq + (*FriendApplyListRsp)(nil), // 10: FriendApplyListRsp + (*FriendSearchReq)(nil), // 11: FriendSearchReq + (*FriendSearchRsp)(nil), // 12: FriendSearchRsp + (*FriendBlackListReq)(nil), // 13: FriendBlackListReq + (*FriendBlackListRsp)(nil), // 14: FriendBlackListRsp + (*FriendBlackAddReq)(nil), // 15: FriendBlackAddReq + (*FriendBlackAddRsp)(nil), // 16: FriendBlackAddRsp + (*FriendReceiveOrSendReq)(nil), // 17: FriendReceiveOrSendReq + (*FriendReceiveOrSendRsp)(nil), // 18: FriendReceiveOrSendRsp + (*FriendTotalReq)(nil), // 19: FriendTotalReq + (*FriendTotalRsp)(nil), // 20: FriendTotalRsp + (*Friend)(nil), // 21: Friend +} +var file_friend_msg_proto_depIdxs = []int32{ + 21, // 0: FriendListRsp.list:type_name -> Friend + 0, // 1: FriendSearchRsp.friends:type_name -> FriendBase + 0, // 2: FriendBlackListRsp.friends:type_name -> FriendBase + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_friend_msg_proto_init() } +func file_friend_msg_proto_init() { + if File_friend_msg_proto != nil { + return + } + file_friend_db_proto_init() + if !protoimpl.UnsafeEnabled { + file_friend_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FriendBase); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_friend_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FriendListReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_friend_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FriendListRsp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_friend_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FriendAddReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_friend_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FriendAddRsp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_friend_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FriendDelReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_friend_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FriendDelRsp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_friend_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FriendAgreeOrRefuseReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_friend_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FriendAgressOrRefuseRsp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_friend_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FriendApplyListReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_friend_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FriendApplyListRsp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_friend_msg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FriendSearchReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_friend_msg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FriendSearchRsp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_friend_msg_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FriendBlackListReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_friend_msg_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FriendBlackListRsp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_friend_msg_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FriendBlackAddReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_friend_msg_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FriendBlackAddRsp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_friend_msg_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FriendReceiveOrSendReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_friend_msg_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FriendReceiveOrSendRsp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_friend_msg_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FriendTotalReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_friend_msg_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FriendTotalRsp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_friend_msg_proto_rawDesc, + NumEnums: 0, + NumMessages: 21, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_friend_msg_proto_goTypes, + DependencyIndexes: file_friend_msg_proto_depIdxs, + MessageInfos: file_friend_msg_proto_msgTypes, + }.Build() + File_friend_msg_proto = out.File + file_friend_msg_proto_rawDesc = nil + file_friend_msg_proto_goTypes = nil + file_friend_msg_proto_depIdxs = nil +} diff --git a/pb/mail_db.pb.go b/pb/mail_db.pb.go index 629a68696..e46beba84 100644 --- a/pb/mail_db.pb.go +++ b/pb/mail_db.pb.go @@ -80,7 +80,7 @@ type DB_MailData struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ObjId string `bson:"_id" json:"ObjId,omitempty" protobuf:"bytes,1,opt,name=ObjId,proto3"` // tags:{bson:"_id"} + ObjId string `protobuf:"bytes,1,opt,name=ObjId,proto3" json:"ObjId,omitempty" bson:"_id"` // tags:{bson:"_id"} UserId string `protobuf:"bytes,2,opt,name=UserId,proto3" json:"UserId,omitempty"` Title string `protobuf:"bytes,3,opt,name=Title,proto3" json:"Title,omitempty"` // 邮件标题 Contex string `protobuf:"bytes,4,opt,name=Contex,proto3" json:"Contex,omitempty"` // 邮件内容 diff --git a/pb/proto/friend_db.proto b/pb/proto/friend_db.proto new file mode 100644 index 000000000..c9c3d38d5 --- /dev/null +++ b/pb/proto/friend_db.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; +option go_package = ".;pb"; +import "user_db.proto"; + +message Friend { + DB_UserData UserData = 1;//用户 + //工会 +} \ No newline at end of file diff --git a/pb/proto/friend_msg.proto b/pb/proto/friend_msg.proto new file mode 100644 index 000000000..52e90fc43 --- /dev/null +++ b/pb/proto/friend_msg.proto @@ -0,0 +1,111 @@ +syntax = "proto3"; +option go_package = ".;pb"; +import "friend_db.proto"; + +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在线 +} + +//好友列表 +message FriendListReq{ + +} +message FriendListRsp{ + repeated Friend list = 1; +} + +//添加好友 +message FriendAddReq{ + string friendId = 1; //好友ID +} +message FriendAddRsp{ + string userId = 1; //用户ID +} + +//删除好友 +message FriendDelReq{ + string friendId = 1;//好友ID + +} + +message FriendDelRsp{ + string friendId = 1;//好友ID + string userId = 2; //用户ID +} + +//同意或拒绝 +message FriendAgreeOrRefuseReq{ + string friendId = 1; //被同意或拒绝的用户 + bool isAgree = 2; + +} +message FriendAgressOrRefuseRsp{ + int32 Num = 1;//操作的数量 + bool isAgree = 2; +} + + +//好友申请列表 +message FriendApplyListReq{ + +} +message FriendApplyListRsp{ + +} + +//好友搜索 +message FriendSearchReq{ + string friendId = 1; + string nickName = 2; //好友昵称 +} + +message FriendSearchRsp{ + repeated FriendBase friends = 1; +} + +//黑名单 +message FriendBlackListReq{ + +} + +message FriendBlackListRsp{ + repeated FriendBase friends = 1; +} + +//添加黑名单 +message FriendBlackAddReq{ + string friendId = 1; +} + +message FriendBlackAddRsp{ + string friendId = 1; + string userId = 2; +} + +//赠送或接收 +message FriendReceiveOrSendReq{ + string friendId = 1; + bool isReceive = 2; +} + +message FriendReceiveOrSendRsp{ + string friendId = 1; + string userId = 2; + bool isReceive = 3; +} + +//好友数量 +message FriendTotalReq{ + string friendId = 1; +} + +message FriendTotalRsp{ + string friendId = 1; + int32 total = 2; //好友数量 +} \ No newline at end of file diff --git a/pb/proto/user_db.proto b/pb/proto/user_db.proto index 95ce91c15..8af1ddedd 100644 --- a/pb/proto/user_db.proto +++ b/pb/proto/user_db.proto @@ -13,4 +13,5 @@ message DB_UserData { string NiceName = 3; int32 ServerId = 4; int32 FriendPoint = 5;//友情点 + int32 avatar = 6;//头像 } \ No newline at end of file diff --git a/pb/user_db.pb.go b/pb/user_db.pb.go index 44e8928d7..f7897e40a 100644 --- a/pb/user_db.pb.go +++ b/pb/user_db.pb.go @@ -93,6 +93,7 @@ type DB_UserData struct { NiceName string `protobuf:"bytes,3,opt,name=NiceName,proto3" json:"NiceName,omitempty"` ServerId int32 `protobuf:"varint,4,opt,name=ServerId,proto3" json:"ServerId,omitempty"` FriendPoint int32 `protobuf:"varint,5,opt,name=FriendPoint,proto3" json:"FriendPoint,omitempty"` //友情点 + Avatar int32 `protobuf:"varint,6,opt,name=avatar,proto3" json:"avatar,omitempty"` //头像 } func (x *DB_UserData) Reset() { @@ -162,6 +163,13 @@ func (x *DB_UserData) GetFriendPoint() int32 { return 0 } +func (x *DB_UserData) GetAvatar() int32 { + if x != nil { + return x.Avatar + } + return 0 +} + var File_user_db_proto protoreflect.FileDescriptor var file_user_db_proto_rawDesc = []byte{ @@ -174,7 +182,7 @@ var file_user_db_proto_rawDesc = []byte{ 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x5f, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x55, 0x73, - 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x22, 0x99, 0x01, 0x0a, 0x0b, 0x44, 0x42, 0x5f, 0x55, 0x73, + 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x22, 0xb1, 0x01, 0x0a, 0x0b, 0x44, 0x42, 0x5f, 0x55, 0x73, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, @@ -184,8 +192,9 @@ var file_user_db_proto_rawDesc = []byte{ 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x50, 0x6f, 0x69, - 0x6e, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, + 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pb_2.7.py b/pb_2.7.py index 8d377aab1..9f19bee65 100644 --- a/pb_2.7.py +++ b/pb_2.7.py @@ -32,4 +32,6 @@ buildProto('./pb/proto','./pb','user_msg') buildProto('./pb/proto','./pb','pack_db') buildProto('./pb/proto','./pb','pack_msg') buildProto('./pb/proto','./pb','mail_db') -buildProto('./pb/proto','./pb','mail_msg') \ No newline at end of file +buildProto('./pb/proto','./pb','mail_msg') +buildProto('./pb/proto','./pb','friend_db') +buildProto('./pb/proto','./pb','friend_msg') \ No newline at end of file