瀏覽代碼

随机获取陪聊

wfz 3 年之前
父節點
當前提交
858b9e3694
共有 5 個文件被更改,包括 265 次插入41 次删除
  1. 202 40
      api/partner/partner.pb.go
  2. 12 0
      api/partner/partner.proto
  3. 36 0
      api/partner/partner_grpc.pb.go
  4. 1 1
      js/api/partner/partner_http_pb.ts
  5. 14 0
      js/api/partner/partner_pb.ts

+ 202 - 40
api/partner/partner.pb.go

@@ -244,6 +244,124 @@ func (x *PartnerInfo) GetPictures() []string {
 	return nil
 }
 
+type RandomPartnerInfo struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Id        string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"`               // id
+	Nickname  string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname"`   // 昵称
+	AvatarUrl string `protobuf:"bytes,3,opt,name=avatarUrl,proto3" json:"avatarUrl"` // 头像链接
+	Sex       int64  `protobuf:"varint,4,opt,name=sex,proto3" json:"sex"`            // 性别
+}
+
+func (x *RandomPartnerInfo) Reset() {
+	*x = RandomPartnerInfo{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_partner_proto_msgTypes[3]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *RandomPartnerInfo) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RandomPartnerInfo) ProtoMessage() {}
+
+func (x *RandomPartnerInfo) ProtoReflect() protoreflect.Message {
+	mi := &file_partner_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 RandomPartnerInfo.ProtoReflect.Descriptor instead.
+func (*RandomPartnerInfo) Descriptor() ([]byte, []int) {
+	return file_partner_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *RandomPartnerInfo) GetId() string {
+	if x != nil {
+		return x.Id
+	}
+	return ""
+}
+
+func (x *RandomPartnerInfo) GetNickname() string {
+	if x != nil {
+		return x.Nickname
+	}
+	return ""
+}
+
+func (x *RandomPartnerInfo) GetAvatarUrl() string {
+	if x != nil {
+		return x.AvatarUrl
+	}
+	return ""
+}
+
+func (x *RandomPartnerInfo) GetSex() int64 {
+	if x != nil {
+		return x.Sex
+	}
+	return 0
+}
+
+type GetRandomPartnerRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Sex int64 `protobuf:"varint,1,opt,name=sex,proto3" json:"sex"` // 性别
+}
+
+func (x *GetRandomPartnerRequest) Reset() {
+	*x = GetRandomPartnerRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_partner_proto_msgTypes[4]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *GetRandomPartnerRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetRandomPartnerRequest) ProtoMessage() {}
+
+func (x *GetRandomPartnerRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_partner_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 GetRandomPartnerRequest.ProtoReflect.Descriptor instead.
+func (*GetRandomPartnerRequest) Descriptor() ([]byte, []int) {
+	return file_partner_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *GetRandomPartnerRequest) GetSex() int64 {
+	if x != nil {
+		return x.Sex
+	}
+	return 0
+}
+
 var File_partner_proto protoreflect.FileDescriptor
 
 var file_partner_proto_rawDesc = []byte{
@@ -278,35 +396,51 @@ var file_partner_proto_rawDesc = []byte{
 	0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x04,
 	0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x69, 0x63,
 	0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x69, 0x63,
-	0x74, 0x75, 0x72, 0x65, 0x73, 0x32, 0xf0, 0x02, 0x0a, 0x07, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65,
-	0x72, 0x12, 0x60, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49,
-	0x6e, 0x66, 0x6f, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
-	0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x18, 0x2e, 0x61, 0x70,
-	0x69, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65,
-	0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x11, 0x2f,
-	0x61, 0x70, 0x69, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x66, 0x6f,
-	0x3a, 0x01, 0x2a, 0x12, 0x77, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65,
-	0x72, 0x43, 0x69, 0x72, 0x63, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x2e, 0x61, 0x70,
-	0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72,
-	0x49, 0x44, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x1a, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x61,
-	0x72, 0x74, 0x6e, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x43, 0x69, 0x72,
-	0x63, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22,
-	0x18, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x63, 0x69,
-	0x72, 0x63, 0x6c, 0x65, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x3a, 0x01, 0x2a, 0x12, 0x89, 0x01, 0x0a,
-	0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x6e,
-	0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x2e,
-	0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61,
-	0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e,
-	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
-	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22,
-	0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73,
-	0x65, 0x72, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d,
-	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x01, 0x2a, 0x42, 0x46, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x2e,
-	0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x2e, 0x69,
-	0x6b, 0x75, 0x62, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
-	0x2f, 0x70, 0x77, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x70, 0x69,
-	0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x3b, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72,
-	0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0x6f, 0x0a, 0x11, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50,
+	0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69,
+	0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69,
+	0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72,
+	0x55, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61,
+	0x72, 0x55, 0x72, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x03, 0x73, 0x65, 0x78, 0x22, 0x2b, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e,
+	0x64, 0x6f, 0x6d, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+	0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03,
+	0x73, 0x65, 0x78, 0x32, 0xce, 0x03, 0x0a, 0x07, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x12,
+	0x60, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x66,
+	0x6f, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+	0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e,
+	0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49,
+	0x6e, 0x66, 0x6f, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x11, 0x2f, 0x61, 0x70,
+	0x69, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x3a, 0x01,
+	0x2a, 0x12, 0x77, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x43,
+	0x69, 0x72, 0x63, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e,
+	0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x44,
+	0x50, 0x61, 0x72, 0x61, 0x6d, 0x1a, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x61, 0x72, 0x74,
+	0x6e, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x43, 0x69, 0x72, 0x63, 0x6c,
+	0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x18, 0x2f,
+	0x61, 0x70, 0x69, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x63, 0x69, 0x72, 0x63,
+	0x6c, 0x65, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x3a, 0x01, 0x2a, 0x12, 0x89, 0x01, 0x0a, 0x18, 0x55,
+	0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f,
+	0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x61,
+	0x72, 0x74, 0x6e, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x74,
+	0x6e, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
+	0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+	0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x27, 0x82,
+	0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72,
+	0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
+	0x69, 0x6f, 0x6e, 0x3a, 0x01, 0x2a, 0x12, 0x5c, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e,
+	0x64, 0x6f, 0x6d, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24,
+	0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74,
+	0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71,
+	0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e,
+	0x65, 0x72, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72,
+	0x49, 0x6e, 0x66, 0x6f, 0x42, 0x46, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x61, 0x72, 0x74,
+	0x6e, 0x65, 0x72, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x2e, 0x69, 0x6b, 0x75, 0x62, 0x61,
+	0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x77, 0x2d,
+	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x61, 0x72,
+	0x74, 0x6e, 0x65, 0x72, 0x3b, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72,
+	0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -321,23 +455,27 @@ func file_partner_proto_rawDescGZIP() []byte {
 	return file_partner_proto_rawDescData
 }
 
-var file_partner_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_partner_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
 var file_partner_proto_goTypes = []interface{}{
 	(*UpdatePartnerInformationRequest)(nil), // 0: api.partner.UpdatePartnerInformationRequest
 	(*PartnerCircleInfo)(nil),               // 1: api.partner.PartnerCircleInfo
 	(*PartnerInfo)(nil),                     // 2: api.partner.PartnerInfo
-	(*emptypb.Empty)(nil),                   // 3: google.protobuf.Empty
-	(*common.PartnerIDParam)(nil),           // 4: api.common.PartnerIDParam
+	(*RandomPartnerInfo)(nil),               // 3: api.partner.RandomPartnerInfo
+	(*GetRandomPartnerRequest)(nil),         // 4: api.partner.GetRandomPartnerRequest
+	(*emptypb.Empty)(nil),                   // 5: google.protobuf.Empty
+	(*common.PartnerIDParam)(nil),           // 6: api.common.PartnerIDParam
 }
 var file_partner_proto_depIdxs = []int32{
-	3, // 0: api.partner.Partner.GetPartnerInfo:input_type -> google.protobuf.Empty
-	4, // 1: api.partner.Partner.GetPartnerCircleInfo:input_type -> api.common.PartnerIDParam
+	5, // 0: api.partner.Partner.GetPartnerInfo:input_type -> google.protobuf.Empty
+	6, // 1: api.partner.Partner.GetPartnerCircleInfo:input_type -> api.common.PartnerIDParam
 	0, // 2: api.partner.Partner.UpdatePartnerInformation:input_type -> api.partner.UpdatePartnerInformationRequest
-	2, // 3: api.partner.Partner.GetPartnerInfo:output_type -> api.partner.PartnerInfo
-	1, // 4: api.partner.Partner.GetPartnerCircleInfo:output_type -> api.partner.PartnerCircleInfo
-	3, // 5: api.partner.Partner.UpdatePartnerInformation:output_type -> google.protobuf.Empty
-	3, // [3:6] is the sub-list for method output_type
-	0, // [0:3] is the sub-list for method input_type
+	4, // 3: api.partner.Partner.GetRandomPartnerInfo:input_type -> api.partner.GetRandomPartnerRequest
+	2, // 4: api.partner.Partner.GetPartnerInfo:output_type -> api.partner.PartnerInfo
+	1, // 5: api.partner.Partner.GetPartnerCircleInfo:output_type -> api.partner.PartnerCircleInfo
+	5, // 6: api.partner.Partner.UpdatePartnerInformation:output_type -> google.protobuf.Empty
+	3, // 7: api.partner.Partner.GetRandomPartnerInfo:output_type -> api.partner.RandomPartnerInfo
+	4, // [4:8] is the sub-list for method output_type
+	0, // [0:4] is the sub-list for method input_type
 	0, // [0:0] is the sub-list for extension type_name
 	0, // [0:0] is the sub-list for extension extendee
 	0, // [0:0] is the sub-list for field type_name
@@ -385,6 +523,30 @@ func file_partner_proto_init() {
 				return nil
 			}
 		}
+		file_partner_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*RandomPartnerInfo); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_partner_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*GetRandomPartnerRequest); 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{
@@ -392,7 +554,7 @@ func file_partner_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_partner_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   3,
+			NumMessages:   5,
 			NumExtensions: 0,
 			NumServices:   1,
 		},

+ 12 - 0
api/partner/partner.proto

@@ -30,6 +30,7 @@ service Partner {
       body:"*"
     };
   };
+  rpc GetRandomPartnerInfo (GetRandomPartnerRequest) returns (RandomPartnerInfo);
 }
 
 message UpdatePartnerInformationRequest {
@@ -53,4 +54,15 @@ message PartnerInfo{
   string avatarUrl =3;// 头像链接
   int64 sex = 4;// 性别
   repeated string pictures = 5; // 图片
+}
+
+message RandomPartnerInfo{
+  string id = 1; // id
+  string nickname = 2;// 昵称
+  string avatarUrl =3;// 头像链接
+  int64 sex = 4;// 性别
+}
+
+message GetRandomPartnerRequest{
+  int64 sex = 1;// 性别
 }

+ 36 - 0
api/partner/partner_grpc.pb.go

@@ -23,6 +23,7 @@ type PartnerClient interface {
 	GetPartnerInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PartnerInfo, error)
 	GetPartnerCircleInfo(ctx context.Context, in *common.PartnerIDParam, opts ...grpc.CallOption) (*PartnerCircleInfo, error)
 	UpdatePartnerInformation(ctx context.Context, in *UpdatePartnerInformationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
+	GetRandomPartnerInfo(ctx context.Context, in *GetRandomPartnerRequest, opts ...grpc.CallOption) (*RandomPartnerInfo, error)
 }
 
 type partnerClient struct {
@@ -60,6 +61,15 @@ func (c *partnerClient) UpdatePartnerInformation(ctx context.Context, in *Update
 	return out, nil
 }
 
+func (c *partnerClient) GetRandomPartnerInfo(ctx context.Context, in *GetRandomPartnerRequest, opts ...grpc.CallOption) (*RandomPartnerInfo, error) {
+	out := new(RandomPartnerInfo)
+	err := c.cc.Invoke(ctx, "/api.partner.Partner/GetRandomPartnerInfo", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // PartnerServer is the server API for Partner service.
 // All implementations must embed UnimplementedPartnerServer
 // for forward compatibility
@@ -67,6 +77,7 @@ type PartnerServer interface {
 	GetPartnerInfo(context.Context, *emptypb.Empty) (*PartnerInfo, error)
 	GetPartnerCircleInfo(context.Context, *common.PartnerIDParam) (*PartnerCircleInfo, error)
 	UpdatePartnerInformation(context.Context, *UpdatePartnerInformationRequest) (*emptypb.Empty, error)
+	GetRandomPartnerInfo(context.Context, *GetRandomPartnerRequest) (*RandomPartnerInfo, error)
 	mustEmbedUnimplementedPartnerServer()
 }
 
@@ -83,6 +94,9 @@ func (UnimplementedPartnerServer) GetPartnerCircleInfo(context.Context, *common.
 func (UnimplementedPartnerServer) UpdatePartnerInformation(context.Context, *UpdatePartnerInformationRequest) (*emptypb.Empty, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method UpdatePartnerInformation not implemented")
 }
+func (UnimplementedPartnerServer) GetRandomPartnerInfo(context.Context, *GetRandomPartnerRequest) (*RandomPartnerInfo, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method GetRandomPartnerInfo not implemented")
+}
 func (UnimplementedPartnerServer) mustEmbedUnimplementedPartnerServer() {}
 
 // UnsafePartnerServer may be embedded to opt out of forward compatibility for this service.
@@ -150,6 +164,24 @@ func _Partner_UpdatePartnerInformation_Handler(srv interface{}, ctx context.Cont
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Partner_GetRandomPartnerInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(GetRandomPartnerRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(PartnerServer).GetRandomPartnerInfo(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.partner.Partner/GetRandomPartnerInfo",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(PartnerServer).GetRandomPartnerInfo(ctx, req.(*GetRandomPartnerRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 // Partner_ServiceDesc is the grpc.ServiceDesc for Partner service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
@@ -169,6 +201,10 @@ var Partner_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "UpdatePartnerInformation",
 			Handler:    _Partner_UpdatePartnerInformation_Handler,
 		},
+		{
+			MethodName: "GetRandomPartnerInfo",
+			Handler:    _Partner_GetRandomPartnerInfo_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "partner.proto",

+ 1 - 1
js/api/partner/partner_http_pb.ts

@@ -1,6 +1,6 @@
 // @ts-ignore
 import { request } from 'ice';
-import {PartnerInfo,PartnerCircleInfo,UpdatePartnerInformationRequest} from "./partner_pb";
+import {PartnerInfo,PartnerCircleInfo,UpdatePartnerInformationRequest,GetRandomPartnerRequest,RandomPartnerInfo} from "./partner_pb";
 import {PartnerIDParam} from "../common/common_pb";
 
 const PartnerService = {

+ 14 - 0
js/api/partner/partner_pb.ts

@@ -27,4 +27,18 @@ export interface PartnerInfo{
     /**  图片 */
     pictures?:Array<string>;
 }
+export interface RandomPartnerInfo{
+    /**  id */
+    id?:string;
+    /**  昵称 */
+    nickname?:string;
+    /**  头像链接 */
+    avatarUrl?:string;
+    /**  性别 */
+    sex?:number;
+}
+export interface GetRandomPartnerRequest{
+    /**  性别 */
+    sex?:number;
+}