fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

indexserver: remove unused GetRepoRank (#604)

I think this is our older ranking stuff.

Test Plan: go test

+126 -395
-9
cmd/zoekt-sourcegraph-indexserver/index_test.go
··· 874 874 type mockGRPCClient struct { 875 875 mockSearchConfiguration func(context.Context, *proto.SearchConfigurationRequest, ...grpc.CallOption) (*proto.SearchConfigurationResponse, error) 876 876 mockList func(context.Context, *proto.ListRequest, ...grpc.CallOption) (*proto.ListResponse, error) 877 - mockRepositoryRank func(context.Context, *proto.RepositoryRankRequest, ...grpc.CallOption) (*proto.RepositoryRankResponse, error) 878 877 mockDocumentRanks func(context.Context, *proto.DocumentRanksRequest, ...grpc.CallOption) (*proto.DocumentRanksResponse, error) 879 878 mockUpdateIndexStatus func(context.Context, *proto.UpdateIndexStatusRequest, ...grpc.CallOption) (*proto.UpdateIndexStatusResponse, error) 880 879 } ··· 893 892 } 894 893 895 894 return nil, fmt.Errorf("mock RPC List not implemented") 896 - } 897 - 898 - func (m *mockGRPCClient) RepositoryRank(ctx context.Context, in *proto.RepositoryRankRequest, opts ...grpc.CallOption) (*proto.RepositoryRankResponse, error) { 899 - if m.mockRepositoryRank != nil { 900 - return m.mockRepositoryRank(ctx, in, opts...) 901 - } 902 - 903 - return nil, fmt.Errorf("mock RPC RepositoryRank not implemented") 904 895 } 905 896 906 897 func (m *mockGRPCClient) DocumentRanks(ctx context.Context, in *proto.DocumentRanksRequest, opts ...grpc.CallOption) (*proto.DocumentRanksResponse, error) {
+126 -268
cmd/zoekt-sourcegraph-indexserver/protos/sourcegraph/zoekt/configuration/v1/configuration.pb.go
··· 632 632 return nil 633 633 } 634 634 635 - // RepositoryRankRequest is the request to the RepositoryRank RPC. 636 - type RepositoryRankRequest struct { 637 - state protoimpl.MessageState 638 - sizeCache protoimpl.SizeCache 639 - unknownFields protoimpl.UnknownFields 640 - 641 - // repository is the repository name. 642 - Repository string `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"` 643 - } 644 - 645 - func (x *RepositoryRankRequest) Reset() { 646 - *x = RepositoryRankRequest{} 647 - if protoimpl.UnsafeEnabled { 648 - mi := &file_configuration_proto_msgTypes[8] 649 - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 650 - ms.StoreMessageInfo(mi) 651 - } 652 - } 653 - 654 - func (x *RepositoryRankRequest) String() string { 655 - return protoimpl.X.MessageStringOf(x) 656 - } 657 - 658 - func (*RepositoryRankRequest) ProtoMessage() {} 659 - 660 - func (x *RepositoryRankRequest) ProtoReflect() protoreflect.Message { 661 - mi := &file_configuration_proto_msgTypes[8] 662 - if protoimpl.UnsafeEnabled && x != nil { 663 - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 664 - if ms.LoadMessageInfo() == nil { 665 - ms.StoreMessageInfo(mi) 666 - } 667 - return ms 668 - } 669 - return mi.MessageOf(x) 670 - } 671 - 672 - // Deprecated: Use RepositoryRankRequest.ProtoReflect.Descriptor instead. 673 - func (*RepositoryRankRequest) Descriptor() ([]byte, []int) { 674 - return file_configuration_proto_rawDescGZIP(), []int{8} 675 - } 676 - 677 - func (x *RepositoryRankRequest) GetRepository() string { 678 - if x != nil { 679 - return x.Repository 680 - } 681 - return "" 682 - } 683 - 684 - type RepositoryRankResponse struct { 685 - state protoimpl.MessageState 686 - sizeCache protoimpl.SizeCache 687 - unknownFields protoimpl.UnknownFields 688 - 689 - // rank is the rank vector for the given repository. Repositories are assumed to 690 - // be ordered by each pairwise component of the resulting vector, higher ranks coming earlier. 691 - // We currently rank first by user-defined scores, then by GitHub star count. 692 - Rank []float64 `protobuf:"fixed64,1,rep,packed,name=rank,proto3" json:"rank,omitempty"` 693 - } 694 - 695 - func (x *RepositoryRankResponse) Reset() { 696 - *x = RepositoryRankResponse{} 697 - if protoimpl.UnsafeEnabled { 698 - mi := &file_configuration_proto_msgTypes[9] 699 - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 700 - ms.StoreMessageInfo(mi) 701 - } 702 - } 703 - 704 - func (x *RepositoryRankResponse) String() string { 705 - return protoimpl.X.MessageStringOf(x) 706 - } 707 - 708 - func (*RepositoryRankResponse) ProtoMessage() {} 709 - 710 - func (x *RepositoryRankResponse) ProtoReflect() protoreflect.Message { 711 - mi := &file_configuration_proto_msgTypes[9] 712 - if protoimpl.UnsafeEnabled && x != nil { 713 - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 714 - if ms.LoadMessageInfo() == nil { 715 - ms.StoreMessageInfo(mi) 716 - } 717 - return ms 718 - } 719 - return mi.MessageOf(x) 720 - } 721 - 722 - // Deprecated: Use RepositoryRankResponse.ProtoReflect.Descriptor instead. 723 - func (*RepositoryRankResponse) Descriptor() ([]byte, []int) { 724 - return file_configuration_proto_rawDescGZIP(), []int{9} 725 - } 726 - 727 - func (x *RepositoryRankResponse) GetRank() []float64 { 728 - if x != nil { 729 - return x.Rank 730 - } 731 - return nil 732 - } 733 - 734 635 // DocumentRanksRequest is the request to the DocumentRanks RPC. 735 636 type DocumentRanksRequest struct { 736 637 state protoimpl.MessageState ··· 744 645 func (x *DocumentRanksRequest) Reset() { 745 646 *x = DocumentRanksRequest{} 746 647 if protoimpl.UnsafeEnabled { 747 - mi := &file_configuration_proto_msgTypes[10] 648 + mi := &file_configuration_proto_msgTypes[8] 748 649 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 749 650 ms.StoreMessageInfo(mi) 750 651 } ··· 757 658 func (*DocumentRanksRequest) ProtoMessage() {} 758 659 759 660 func (x *DocumentRanksRequest) ProtoReflect() protoreflect.Message { 760 - mi := &file_configuration_proto_msgTypes[10] 661 + mi := &file_configuration_proto_msgTypes[8] 761 662 if protoimpl.UnsafeEnabled && x != nil { 762 663 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 763 664 if ms.LoadMessageInfo() == nil { ··· 770 671 771 672 // Deprecated: Use DocumentRanksRequest.ProtoReflect.Descriptor instead. 772 673 func (*DocumentRanksRequest) Descriptor() ([]byte, []int) { 773 - return file_configuration_proto_rawDescGZIP(), []int{10} 674 + return file_configuration_proto_rawDescGZIP(), []int{8} 774 675 } 775 676 776 677 func (x *DocumentRanksRequest) GetRepository() string { ··· 798 699 func (x *DocumentRanksResponse) Reset() { 799 700 *x = DocumentRanksResponse{} 800 701 if protoimpl.UnsafeEnabled { 801 - mi := &file_configuration_proto_msgTypes[11] 702 + mi := &file_configuration_proto_msgTypes[9] 802 703 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 803 704 ms.StoreMessageInfo(mi) 804 705 } ··· 811 712 func (*DocumentRanksResponse) ProtoMessage() {} 812 713 813 714 func (x *DocumentRanksResponse) ProtoReflect() protoreflect.Message { 814 - mi := &file_configuration_proto_msgTypes[11] 715 + mi := &file_configuration_proto_msgTypes[9] 815 716 if protoimpl.UnsafeEnabled && x != nil { 816 717 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 817 718 if ms.LoadMessageInfo() == nil { ··· 824 725 825 726 // Deprecated: Use DocumentRanksResponse.ProtoReflect.Descriptor instead. 826 727 func (*DocumentRanksResponse) Descriptor() ([]byte, []int) { 827 - return file_configuration_proto_rawDescGZIP(), []int{11} 728 + return file_configuration_proto_rawDescGZIP(), []int{9} 828 729 } 829 730 830 731 func (x *DocumentRanksResponse) GetPaths() map[string]float64 { ··· 853 754 func (x *UpdateIndexStatusRequest) Reset() { 854 755 *x = UpdateIndexStatusRequest{} 855 756 if protoimpl.UnsafeEnabled { 856 - mi := &file_configuration_proto_msgTypes[12] 757 + mi := &file_configuration_proto_msgTypes[10] 857 758 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 858 759 ms.StoreMessageInfo(mi) 859 760 } ··· 866 767 func (*UpdateIndexStatusRequest) ProtoMessage() {} 867 768 868 769 func (x *UpdateIndexStatusRequest) ProtoReflect() protoreflect.Message { 869 - mi := &file_configuration_proto_msgTypes[12] 770 + mi := &file_configuration_proto_msgTypes[10] 870 771 if protoimpl.UnsafeEnabled && x != nil { 871 772 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 872 773 if ms.LoadMessageInfo() == nil { ··· 879 780 880 781 // Deprecated: Use UpdateIndexStatusRequest.ProtoReflect.Descriptor instead. 881 782 func (*UpdateIndexStatusRequest) Descriptor() ([]byte, []int) { 882 - return file_configuration_proto_rawDescGZIP(), []int{12} 783 + return file_configuration_proto_rawDescGZIP(), []int{10} 883 784 } 884 785 885 786 func (x *UpdateIndexStatusRequest) GetRepositories() []*UpdateIndexStatusRequest_Repository { ··· 899 800 func (x *UpdateIndexStatusResponse) Reset() { 900 801 *x = UpdateIndexStatusResponse{} 901 802 if protoimpl.UnsafeEnabled { 902 - mi := &file_configuration_proto_msgTypes[13] 803 + mi := &file_configuration_proto_msgTypes[11] 903 804 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 904 805 ms.StoreMessageInfo(mi) 905 806 } ··· 912 813 func (*UpdateIndexStatusResponse) ProtoMessage() {} 913 814 914 815 func (x *UpdateIndexStatusResponse) ProtoReflect() protoreflect.Message { 915 - mi := &file_configuration_proto_msgTypes[13] 816 + mi := &file_configuration_proto_msgTypes[11] 916 817 if protoimpl.UnsafeEnabled && x != nil { 917 818 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 918 819 if ms.LoadMessageInfo() == nil { ··· 925 826 926 827 // Deprecated: Use UpdateIndexStatusResponse.ProtoReflect.Descriptor instead. 927 828 func (*UpdateIndexStatusResponse) Descriptor() ([]byte, []int) { 928 - return file_configuration_proto_rawDescGZIP(), []int{13} 829 + return file_configuration_proto_rawDescGZIP(), []int{11} 929 830 } 930 831 931 832 type UpdateIndexStatusRequest_Repository struct { ··· 944 845 func (x *UpdateIndexStatusRequest_Repository) Reset() { 945 846 *x = UpdateIndexStatusRequest_Repository{} 946 847 if protoimpl.UnsafeEnabled { 947 - mi := &file_configuration_proto_msgTypes[15] 848 + mi := &file_configuration_proto_msgTypes[13] 948 849 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 949 850 ms.StoreMessageInfo(mi) 950 851 } ··· 957 858 func (*UpdateIndexStatusRequest_Repository) ProtoMessage() {} 958 859 959 860 func (x *UpdateIndexStatusRequest_Repository) ProtoReflect() protoreflect.Message { 960 - mi := &file_configuration_proto_msgTypes[15] 861 + mi := &file_configuration_proto_msgTypes[13] 961 862 if protoimpl.UnsafeEnabled && x != nil { 962 863 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 963 864 if ms.LoadMessageInfo() == nil { ··· 970 871 971 872 // Deprecated: Use UpdateIndexStatusRequest_Repository.ProtoReflect.Descriptor instead. 972 873 func (*UpdateIndexStatusRequest_Repository) Descriptor() ([]byte, []int) { 973 - return file_configuration_proto_rawDescGZIP(), []int{12, 0} 874 + return file_configuration_proto_rawDescGZIP(), []int{10, 0} 974 875 } 975 876 976 877 func (x *UpdateIndexStatusRequest_Repository) GetRepoId() uint32 { ··· 1080 981 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x49, 1081 982 0x64, 0x73, 0x22, 0x29, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 1082 983 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 1083 - 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x49, 0x64, 0x73, 0x22, 0x37, 0x0a, 1084 - 0x15, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x61, 0x6e, 0x6b, 0x52, 1085 - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 1086 - 0x74, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 1087 - 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x2c, 0x0a, 0x16, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 1088 - 0x74, 0x6f, 0x72, 0x79, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 1089 - 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x03, 0x28, 0x01, 0x52, 0x04, 1090 - 0x72, 0x61, 0x6e, 0x6b, 0x22, 0x36, 0x0a, 0x14, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 1091 - 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 1092 - 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 1093 - 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x22, 0xca, 0x01, 0x0a, 1094 - 0x15, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x52, 0x65, 1095 - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 1096 - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 984 + 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x49, 0x64, 0x73, 0x22, 0x36, 0x0a, 985 + 0x14, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x52, 0x65, 986 + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 987 + 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 988 + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x22, 0xca, 0x01, 0x0a, 0x15, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 989 + 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 990 + 0x5a, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 991 + 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x7a, 0x6f, 0x65, 992 + 0x6b, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 993 + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x6b, 994 + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x73, 0x45, 995 + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 996 + 0x65, 0x61, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 997 + 0x6d, 0x65, 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x1a, 0x38, 0x0a, 0x0a, 0x50, 0x61, 0x74, 0x68, 998 + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 999 + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 1000 + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 1001 + 0x38, 0x01, 0x22, 0xae, 0x02, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 1002 + 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 1003 + 0x6b, 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 1004 + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 1097 1005 0x61, 0x70, 0x68, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 1098 - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 1099 - 0x65, 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 1100 - 0x2e, 0x50, 0x61, 0x74, 0x68, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x70, 0x61, 0x74, 1101 - 0x68, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x6b, 0x18, 1102 - 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x61, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x1a, 1103 - 0x38, 0x0a, 0x0a, 0x50, 0x61, 0x74, 0x68, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 1104 - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 1105 - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 1106 - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xae, 0x02, 0x0a, 0x18, 0x55, 0x70, 1107 - 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 1108 - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x6b, 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 1109 - 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x73, 1110 - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 1111 - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 1112 - 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x74, 0x61, 1113 - 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 1114 - 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 1115 - 0x69, 0x65, 0x73, 0x1a, 0xa4, 0x01, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 1116 - 0x72, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 1117 - 0x01, 0x28, 0x0d, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x49, 0x64, 0x12, 0x55, 0x0a, 0x08, 0x62, 1118 - 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 1119 - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 1120 - 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 1121 - 0x76, 0x31, 0x2e, 0x5a, 0x6f, 0x65, 0x6b, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 1122 - 0x72, 0x79, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x08, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 1123 - 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x74, 0x69, 0x6d, 0x65, 1124 - 0x5f, 0x75, 0x6e, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x69, 0x6e, 0x64, 1125 - 0x65, 0x78, 0x54, 0x69, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x78, 0x22, 0x1b, 0x0a, 0x19, 0x55, 0x70, 1126 - 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 1127 - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x91, 0x01, 0x0a, 0x0f, 0x43, 0x54, 0x61, 0x67, 1128 - 0x73, 0x50, 0x61, 0x72, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x1e, 0x43, 1129 - 0x5f, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x50, 0x41, 0x52, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 1130 - 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 1131 - 0x1b, 0x0a, 0x17, 0x43, 0x5f, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x50, 0x41, 0x52, 0x53, 0x45, 0x52, 1132 - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 1133 - 0x43, 0x5f, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x50, 0x41, 0x52, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 1134 - 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x56, 0x45, 0x52, 0x53, 0x41, 0x4c, 0x10, 0x02, 0x12, 0x1b, 1135 - 0x0a, 0x17, 0x43, 0x5f, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x50, 0x41, 0x52, 0x53, 0x45, 0x52, 0x5f, 1136 - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x43, 0x49, 0x50, 0x10, 0x03, 0x32, 0xcd, 0x05, 0x0a, 0x19, 1137 - 0x5a, 0x6f, 0x65, 0x6b, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 1138 - 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x98, 0x01, 0x0a, 0x13, 0x53, 0x65, 1139 - 0x61, 0x72, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 1140 - 0x6e, 0x12, 0x3e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 1141 - 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 1142 - 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x6f, 0x6e, 1143 - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 1144 - 0x74, 0x1a, 0x3f, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 1145 - 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 1146 - 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x6f, 0x6e, 1147 - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 1148 - 0x73, 0x65, 0x22, 0x00, 0x12, 0x6b, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2f, 0x2e, 0x73, 1006 + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 1007 + 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 1008 + 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x0c, 1009 + 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x1a, 0xa4, 0x01, 0x0a, 1010 + 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x72, 1011 + 0x65, 0x70, 0x6f, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x72, 0x65, 1012 + 0x70, 0x6f, 0x49, 0x64, 0x12, 0x55, 0x0a, 0x08, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 1013 + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 1014 + 0x72, 0x61, 0x70, 0x68, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 1015 + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x5a, 0x6f, 0x65, 0x6b, 1016 + 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x72, 0x61, 0x6e, 0x63, 1017 + 0x68, 0x52, 0x08, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x69, 1018 + 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x75, 0x6e, 0x69, 0x78, 0x18, 0x03, 1019 + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x54, 0x69, 0x6d, 0x65, 0x55, 1020 + 0x6e, 0x69, 0x78, 0x22, 0x1b, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 1021 + 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 1022 + 0x2a, 0x91, 0x01, 0x0a, 0x0f, 0x43, 0x54, 0x61, 0x67, 0x73, 0x50, 0x61, 0x72, 0x73, 0x65, 0x72, 1023 + 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x1e, 0x43, 0x5f, 0x54, 0x41, 0x47, 0x53, 0x5f, 0x50, 1024 + 0x41, 0x52, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 1025 + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x5f, 0x54, 0x41, 1026 + 0x47, 0x53, 0x5f, 0x50, 0x41, 0x52, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 1027 + 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x43, 0x5f, 0x54, 0x41, 0x47, 0x53, 0x5f, 1028 + 0x50, 0x41, 0x52, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x56, 1029 + 0x45, 0x52, 0x53, 0x41, 0x4c, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x5f, 0x54, 0x41, 0x47, 1030 + 0x53, 0x5f, 0x50, 0x41, 0x52, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x43, 1031 + 0x49, 0x50, 0x10, 0x03, 0x32, 0xc1, 0x04, 0x0a, 0x19, 0x5a, 0x6f, 0x65, 0x6b, 0x74, 0x43, 0x6f, 1032 + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 1033 + 0x63, 0x65, 0x12, 0x98, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x6f, 0x6e, 1034 + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x2e, 0x73, 0x6f, 0x75, 1035 + 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x63, 1036 + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 1037 + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 1038 + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x73, 0x6f, 0x75, 1039 + 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x63, 1040 + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 1041 + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 1042 + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6b, 0x0a, 1043 + 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2f, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 1044 + 0x61, 0x70, 0x68, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 1045 + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 1046 + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 1047 + 0x72, 0x61, 0x70, 0x68, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 1048 + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 1049 + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x86, 0x01, 0x0a, 0x0d, 0x44, 1050 + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x12, 0x38, 0x2e, 0x73, 1149 1051 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 1150 1052 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 1151 - 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 1152 - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 1153 - 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 1154 - 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 1155 - 0x00, 0x12, 0x89, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 1156 - 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x39, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 1157 - 0x70, 0x68, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 1158 - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 1159 - 0x74, 0x6f, 0x72, 0x79, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 1160 - 0x3a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x7a, 0x6f, 1161 - 0x65, 0x6b, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 1162 - 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 1163 - 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x86, 0x01, 1164 - 0x0a, 0x0d, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x12, 1165 - 0x38, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x7a, 0x6f, 1166 - 0x65, 0x6b, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 1167 - 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x6e, 1168 - 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x73, 0x6f, 0x75, 0x72, 1053 + 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x52, 1054 + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 1055 + 0x72, 0x61, 0x70, 0x68, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 1056 + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 1057 + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 1058 + 0x65, 0x22, 0x00, 0x12, 0x92, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 1059 + 0x64, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3c, 0x2e, 0x73, 0x6f, 0x75, 0x72, 1169 1060 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x63, 0x6f, 1170 - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 1171 - 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 1172 - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x92, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 1173 - 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3c, 0x2e, 0x73, 1174 - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 1175 - 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 1176 - 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x74, 0x61, 1177 - 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x73, 0x6f, 0x75, 1178 - 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x63, 1179 - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 1180 - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 1181 - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x6a, 0x5a, 0x68, 0x67, 1182 - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 1183 - 0x67, 0x72, 0x61, 0x70, 0x68, 0x2f, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2f, 0x63, 0x6d, 0x64, 0x2f, 1184 - 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 1185 - 0x68, 0x2d, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x72, 1186 - 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 1187 - 0x2f, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 1188 - 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 1061 + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x55, 1062 + 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 1063 + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 1064 + 0x67, 0x72, 0x61, 0x70, 0x68, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 1065 + 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 1066 + 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 1067 + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x6a, 0x5a, 0x68, 0x67, 0x69, 0x74, 0x68, 1068 + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 1069 + 0x70, 0x68, 0x2f, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2f, 0x63, 0x6d, 0x64, 0x2f, 0x7a, 0x6f, 0x65, 1070 + 0x6b, 0x74, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2d, 0x69, 1071 + 0x6e, 0x64, 0x65, 0x78, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 1072 + 0x73, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2f, 0x7a, 0x6f, 1073 + 0x65, 0x6b, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 1074 + 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 1189 1075 } 1190 1076 1191 1077 var ( ··· 1201 1087 } 1202 1088 1203 1089 var file_configuration_proto_enumTypes = make([]protoimpl.EnumInfo, 1) 1204 - var file_configuration_proto_msgTypes = make([]protoimpl.MessageInfo, 16) 1090 + var file_configuration_proto_msgTypes = make([]protoimpl.MessageInfo, 14) 1205 1091 var file_configuration_proto_goTypes = []interface{}{ 1206 1092 (CTagsParserType)(0), // 0: sourcegraph.zoekt.configuration.v1.CTagsParserType 1207 1093 (*SearchConfigurationRequest)(nil), // 1: sourcegraph.zoekt.configuration.v1.SearchConfigurationRequest ··· 1212 1098 (*ZoektRepositoryBranch)(nil), // 6: sourcegraph.zoekt.configuration.v1.ZoektRepositoryBranch 1213 1099 (*ListRequest)(nil), // 7: sourcegraph.zoekt.configuration.v1.ListRequest 1214 1100 (*ListResponse)(nil), // 8: sourcegraph.zoekt.configuration.v1.ListResponse 1215 - (*RepositoryRankRequest)(nil), // 9: sourcegraph.zoekt.configuration.v1.RepositoryRankRequest 1216 - (*RepositoryRankResponse)(nil), // 10: sourcegraph.zoekt.configuration.v1.RepositoryRankResponse 1217 - (*DocumentRanksRequest)(nil), // 11: sourcegraph.zoekt.configuration.v1.DocumentRanksRequest 1218 - (*DocumentRanksResponse)(nil), // 12: sourcegraph.zoekt.configuration.v1.DocumentRanksResponse 1219 - (*UpdateIndexStatusRequest)(nil), // 13: sourcegraph.zoekt.configuration.v1.UpdateIndexStatusRequest 1220 - (*UpdateIndexStatusResponse)(nil), // 14: sourcegraph.zoekt.configuration.v1.UpdateIndexStatusResponse 1221 - nil, // 15: sourcegraph.zoekt.configuration.v1.DocumentRanksResponse.PathsEntry 1222 - (*UpdateIndexStatusRequest_Repository)(nil), // 16: sourcegraph.zoekt.configuration.v1.UpdateIndexStatusRequest.Repository 1223 - (*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp 1101 + (*DocumentRanksRequest)(nil), // 9: sourcegraph.zoekt.configuration.v1.DocumentRanksRequest 1102 + (*DocumentRanksResponse)(nil), // 10: sourcegraph.zoekt.configuration.v1.DocumentRanksResponse 1103 + (*UpdateIndexStatusRequest)(nil), // 11: sourcegraph.zoekt.configuration.v1.UpdateIndexStatusRequest 1104 + (*UpdateIndexStatusResponse)(nil), // 12: sourcegraph.zoekt.configuration.v1.UpdateIndexStatusResponse 1105 + nil, // 13: sourcegraph.zoekt.configuration.v1.DocumentRanksResponse.PathsEntry 1106 + (*UpdateIndexStatusRequest_Repository)(nil), // 14: sourcegraph.zoekt.configuration.v1.UpdateIndexStatusRequest.Repository 1107 + (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp 1224 1108 } 1225 1109 var file_configuration_proto_depIdxs = []int32{ 1226 1110 3, // 0: sourcegraph.zoekt.configuration.v1.SearchConfigurationRequest.fingerprint:type_name -> sourcegraph.zoekt.configuration.v1.Fingerprint 1227 1111 3, // 1: sourcegraph.zoekt.configuration.v1.SearchConfigurationResponse.fingerprint:type_name -> sourcegraph.zoekt.configuration.v1.Fingerprint 1228 1112 5, // 2: sourcegraph.zoekt.configuration.v1.SearchConfigurationResponse.updated_options:type_name -> sourcegraph.zoekt.configuration.v1.ZoektIndexOptions 1229 - 17, // 3: sourcegraph.zoekt.configuration.v1.Fingerprint.generated_at:type_name -> google.protobuf.Timestamp 1113 + 15, // 3: sourcegraph.zoekt.configuration.v1.Fingerprint.generated_at:type_name -> google.protobuf.Timestamp 1230 1114 0, // 4: sourcegraph.zoekt.configuration.v1.LanguageMapping.ctags:type_name -> sourcegraph.zoekt.configuration.v1.CTagsParserType 1231 1115 6, // 5: sourcegraph.zoekt.configuration.v1.ZoektIndexOptions.branches:type_name -> sourcegraph.zoekt.configuration.v1.ZoektRepositoryBranch 1232 1116 4, // 6: sourcegraph.zoekt.configuration.v1.ZoektIndexOptions.language_map:type_name -> sourcegraph.zoekt.configuration.v1.LanguageMapping 1233 - 15, // 7: sourcegraph.zoekt.configuration.v1.DocumentRanksResponse.paths:type_name -> sourcegraph.zoekt.configuration.v1.DocumentRanksResponse.PathsEntry 1234 - 16, // 8: sourcegraph.zoekt.configuration.v1.UpdateIndexStatusRequest.repositories:type_name -> sourcegraph.zoekt.configuration.v1.UpdateIndexStatusRequest.Repository 1117 + 13, // 7: sourcegraph.zoekt.configuration.v1.DocumentRanksResponse.paths:type_name -> sourcegraph.zoekt.configuration.v1.DocumentRanksResponse.PathsEntry 1118 + 14, // 8: sourcegraph.zoekt.configuration.v1.UpdateIndexStatusRequest.repositories:type_name -> sourcegraph.zoekt.configuration.v1.UpdateIndexStatusRequest.Repository 1235 1119 6, // 9: sourcegraph.zoekt.configuration.v1.UpdateIndexStatusRequest.Repository.branches:type_name -> sourcegraph.zoekt.configuration.v1.ZoektRepositoryBranch 1236 1120 1, // 10: sourcegraph.zoekt.configuration.v1.ZoektConfigurationService.SearchConfiguration:input_type -> sourcegraph.zoekt.configuration.v1.SearchConfigurationRequest 1237 1121 7, // 11: sourcegraph.zoekt.configuration.v1.ZoektConfigurationService.List:input_type -> sourcegraph.zoekt.configuration.v1.ListRequest 1238 - 9, // 12: sourcegraph.zoekt.configuration.v1.ZoektConfigurationService.RepositoryRank:input_type -> sourcegraph.zoekt.configuration.v1.RepositoryRankRequest 1239 - 11, // 13: sourcegraph.zoekt.configuration.v1.ZoektConfigurationService.DocumentRanks:input_type -> sourcegraph.zoekt.configuration.v1.DocumentRanksRequest 1240 - 13, // 14: sourcegraph.zoekt.configuration.v1.ZoektConfigurationService.UpdateIndexStatus:input_type -> sourcegraph.zoekt.configuration.v1.UpdateIndexStatusRequest 1241 - 2, // 15: sourcegraph.zoekt.configuration.v1.ZoektConfigurationService.SearchConfiguration:output_type -> sourcegraph.zoekt.configuration.v1.SearchConfigurationResponse 1242 - 8, // 16: sourcegraph.zoekt.configuration.v1.ZoektConfigurationService.List:output_type -> sourcegraph.zoekt.configuration.v1.ListResponse 1243 - 10, // 17: sourcegraph.zoekt.configuration.v1.ZoektConfigurationService.RepositoryRank:output_type -> sourcegraph.zoekt.configuration.v1.RepositoryRankResponse 1244 - 12, // 18: sourcegraph.zoekt.configuration.v1.ZoektConfigurationService.DocumentRanks:output_type -> sourcegraph.zoekt.configuration.v1.DocumentRanksResponse 1245 - 14, // 19: sourcegraph.zoekt.configuration.v1.ZoektConfigurationService.UpdateIndexStatus:output_type -> sourcegraph.zoekt.configuration.v1.UpdateIndexStatusResponse 1246 - 15, // [15:20] is the sub-list for method output_type 1247 - 10, // [10:15] is the sub-list for method input_type 1122 + 9, // 12: sourcegraph.zoekt.configuration.v1.ZoektConfigurationService.DocumentRanks:input_type -> sourcegraph.zoekt.configuration.v1.DocumentRanksRequest 1123 + 11, // 13: sourcegraph.zoekt.configuration.v1.ZoektConfigurationService.UpdateIndexStatus:input_type -> sourcegraph.zoekt.configuration.v1.UpdateIndexStatusRequest 1124 + 2, // 14: sourcegraph.zoekt.configuration.v1.ZoektConfigurationService.SearchConfiguration:output_type -> sourcegraph.zoekt.configuration.v1.SearchConfigurationResponse 1125 + 8, // 15: sourcegraph.zoekt.configuration.v1.ZoektConfigurationService.List:output_type -> sourcegraph.zoekt.configuration.v1.ListResponse 1126 + 10, // 16: sourcegraph.zoekt.configuration.v1.ZoektConfigurationService.DocumentRanks:output_type -> sourcegraph.zoekt.configuration.v1.DocumentRanksResponse 1127 + 12, // 17: sourcegraph.zoekt.configuration.v1.ZoektConfigurationService.UpdateIndexStatus:output_type -> sourcegraph.zoekt.configuration.v1.UpdateIndexStatusResponse 1128 + 14, // [14:18] is the sub-list for method output_type 1129 + 10, // [10:14] is the sub-list for method input_type 1248 1130 10, // [10:10] is the sub-list for extension type_name 1249 1131 10, // [10:10] is the sub-list for extension extendee 1250 1132 0, // [0:10] is the sub-list for field type_name ··· 1353 1235 } 1354 1236 } 1355 1237 file_configuration_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { 1356 - switch v := v.(*RepositoryRankRequest); i { 1357 - case 0: 1358 - return &v.state 1359 - case 1: 1360 - return &v.sizeCache 1361 - case 2: 1362 - return &v.unknownFields 1363 - default: 1364 - return nil 1365 - } 1366 - } 1367 - file_configuration_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { 1368 - switch v := v.(*RepositoryRankResponse); i { 1369 - case 0: 1370 - return &v.state 1371 - case 1: 1372 - return &v.sizeCache 1373 - case 2: 1374 - return &v.unknownFields 1375 - default: 1376 - return nil 1377 - } 1378 - } 1379 - file_configuration_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { 1380 1238 switch v := v.(*DocumentRanksRequest); i { 1381 1239 case 0: 1382 1240 return &v.state ··· 1388 1246 return nil 1389 1247 } 1390 1248 } 1391 - file_configuration_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { 1249 + file_configuration_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { 1392 1250 switch v := v.(*DocumentRanksResponse); i { 1393 1251 case 0: 1394 1252 return &v.state ··· 1400 1258 return nil 1401 1259 } 1402 1260 } 1403 - file_configuration_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { 1261 + file_configuration_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { 1404 1262 switch v := v.(*UpdateIndexStatusRequest); i { 1405 1263 case 0: 1406 1264 return &v.state ··· 1412 1270 return nil 1413 1271 } 1414 1272 } 1415 - file_configuration_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { 1273 + file_configuration_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { 1416 1274 switch v := v.(*UpdateIndexStatusResponse); i { 1417 1275 case 0: 1418 1276 return &v.state ··· 1424 1282 return nil 1425 1283 } 1426 1284 } 1427 - file_configuration_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { 1285 + file_configuration_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { 1428 1286 switch v := v.(*UpdateIndexStatusRequest_Repository); i { 1429 1287 case 0: 1430 1288 return &v.state ··· 1443 1301 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 1444 1302 RawDescriptor: file_configuration_proto_rawDesc, 1445 1303 NumEnums: 1, 1446 - NumMessages: 16, 1304 + NumMessages: 14, 1447 1305 NumExtensions: 0, 1448 1306 NumServices: 1, 1449 1307 },
-16
cmd/zoekt-sourcegraph-indexserver/protos/sourcegraph/zoekt/configuration/v1/configuration.proto
··· 13 13 // List returns the list of repositories that the client should index. 14 14 rpc List(ListRequest) returns (ListResponse) {} 15 15 16 - // RepositoryRank returns the rank vector for the specified repository. 17 - rpc RepositoryRank(RepositoryRankRequest) returns (RepositoryRankResponse) {} 18 - 19 16 // DocumentRanks returns the rank vectors for all documents in the specified repository. 20 17 rpc DocumentRanks(DocumentRanksRequest) returns (DocumentRanksResponse) {} 21 18 ··· 141 138 message ListResponse { 142 139 // repo_ids is the list of repository IDs that the client should index. 143 140 repeated int32 repo_ids = 1; 144 - } 145 - 146 - // RepositoryRankRequest is the request to the RepositoryRank RPC. 147 - message RepositoryRankRequest { 148 - // repository is the repository name. 149 - string repository = 1; 150 - } 151 - 152 - message RepositoryRankResponse { 153 - // rank is the rank vector for the given repository. Repositories are assumed to 154 - // be ordered by each pairwise component of the resulting vector, higher ranks coming earlier. 155 - // We currently rank first by user-defined scores, then by GitHub star count. 156 - repeated double rank = 1; 157 141 } 158 142 159 143 // DocumentRanksRequest is the request to the DocumentRanks RPC.
-39
cmd/zoekt-sourcegraph-indexserver/protos/sourcegraph/zoekt/configuration/v1/configuration_grpc.pb.go
··· 21 21 const ( 22 22 ZoektConfigurationService_SearchConfiguration_FullMethodName = "/sourcegraph.zoekt.configuration.v1.ZoektConfigurationService/SearchConfiguration" 23 23 ZoektConfigurationService_List_FullMethodName = "/sourcegraph.zoekt.configuration.v1.ZoektConfigurationService/List" 24 - ZoektConfigurationService_RepositoryRank_FullMethodName = "/sourcegraph.zoekt.configuration.v1.ZoektConfigurationService/RepositoryRank" 25 24 ZoektConfigurationService_DocumentRanks_FullMethodName = "/sourcegraph.zoekt.configuration.v1.ZoektConfigurationService/DocumentRanks" 26 25 ZoektConfigurationService_UpdateIndexStatus_FullMethodName = "/sourcegraph.zoekt.configuration.v1.ZoektConfigurationService/UpdateIndexStatus" 27 26 ) ··· 34 33 SearchConfiguration(ctx context.Context, in *SearchConfigurationRequest, opts ...grpc.CallOption) (*SearchConfigurationResponse, error) 35 34 // List returns the list of repositories that the client should index. 36 35 List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) 37 - // RepositoryRank returns the rank vector for the specified repository. 38 - RepositoryRank(ctx context.Context, in *RepositoryRankRequest, opts ...grpc.CallOption) (*RepositoryRankResponse, error) 39 36 // DocumentRanks returns the rank vectors for all documents in the specified repository. 40 37 DocumentRanks(ctx context.Context, in *DocumentRanksRequest, opts ...grpc.CallOption) (*DocumentRanksResponse, error) 41 38 // UpdateIndexStatus informs the server that the caller has indexed the specified repositories ··· 69 66 return out, nil 70 67 } 71 68 72 - func (c *zoektConfigurationServiceClient) RepositoryRank(ctx context.Context, in *RepositoryRankRequest, opts ...grpc.CallOption) (*RepositoryRankResponse, error) { 73 - out := new(RepositoryRankResponse) 74 - err := c.cc.Invoke(ctx, ZoektConfigurationService_RepositoryRank_FullMethodName, in, out, opts...) 75 - if err != nil { 76 - return nil, err 77 - } 78 - return out, nil 79 - } 80 - 81 69 func (c *zoektConfigurationServiceClient) DocumentRanks(ctx context.Context, in *DocumentRanksRequest, opts ...grpc.CallOption) (*DocumentRanksResponse, error) { 82 70 out := new(DocumentRanksResponse) 83 71 err := c.cc.Invoke(ctx, ZoektConfigurationService_DocumentRanks_FullMethodName, in, out, opts...) ··· 104 92 SearchConfiguration(context.Context, *SearchConfigurationRequest) (*SearchConfigurationResponse, error) 105 93 // List returns the list of repositories that the client should index. 106 94 List(context.Context, *ListRequest) (*ListResponse, error) 107 - // RepositoryRank returns the rank vector for the specified repository. 108 - RepositoryRank(context.Context, *RepositoryRankRequest) (*RepositoryRankResponse, error) 109 95 // DocumentRanks returns the rank vectors for all documents in the specified repository. 110 96 DocumentRanks(context.Context, *DocumentRanksRequest) (*DocumentRanksResponse, error) 111 97 // UpdateIndexStatus informs the server that the caller has indexed the specified repositories ··· 123 109 } 124 110 func (UnimplementedZoektConfigurationServiceServer) List(context.Context, *ListRequest) (*ListResponse, error) { 125 111 return nil, status.Errorf(codes.Unimplemented, "method List not implemented") 126 - } 127 - func (UnimplementedZoektConfigurationServiceServer) RepositoryRank(context.Context, *RepositoryRankRequest) (*RepositoryRankResponse, error) { 128 - return nil, status.Errorf(codes.Unimplemented, "method RepositoryRank not implemented") 129 112 } 130 113 func (UnimplementedZoektConfigurationServiceServer) DocumentRanks(context.Context, *DocumentRanksRequest) (*DocumentRanksResponse, error) { 131 114 return nil, status.Errorf(codes.Unimplemented, "method DocumentRanks not implemented") ··· 183 166 return interceptor(ctx, in, info, handler) 184 167 } 185 168 186 - func _ZoektConfigurationService_RepositoryRank_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 187 - in := new(RepositoryRankRequest) 188 - if err := dec(in); err != nil { 189 - return nil, err 190 - } 191 - if interceptor == nil { 192 - return srv.(ZoektConfigurationServiceServer).RepositoryRank(ctx, in) 193 - } 194 - info := &grpc.UnaryServerInfo{ 195 - Server: srv, 196 - FullMethod: ZoektConfigurationService_RepositoryRank_FullMethodName, 197 - } 198 - handler := func(ctx context.Context, req interface{}) (interface{}, error) { 199 - return srv.(ZoektConfigurationServiceServer).RepositoryRank(ctx, req.(*RepositoryRankRequest)) 200 - } 201 - return interceptor(ctx, in, info, handler) 202 - } 203 - 204 169 func _ZoektConfigurationService_DocumentRanks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 205 170 in := new(DocumentRanksRequest) 206 171 if err := dec(in); err != nil { ··· 251 216 { 252 217 MethodName: "List", 253 218 Handler: _ZoektConfigurationService_List_Handler, 254 - }, 255 - { 256 - MethodName: "RepositoryRank", 257 - Handler: _ZoektConfigurationService_RepositoryRank_Handler, 258 219 }, 259 220 { 260 221 MethodName: "DocumentRanks",
-63
cmd/zoekt-sourcegraph-indexserver/sg.go
··· 72 72 // options for each id in repos. 73 73 ForceIterateIndexOptions(onSuccess func(IndexOptions), onError func(uint32, error), repos ...uint32) 74 74 75 - // GetRepoRank returns a rank vector for the given repository. Repositories are 76 - // assumed to be ordered by each pairwise component of the resulting vector, 77 - // higher ranks coming earlier. 78 - GetRepoRank(ctx context.Context, repoName string) ([]float64, error) 79 - 80 75 // GetDocumentRanks returns a map from paths within the given repo to their 81 76 // rank vectors. Paths are assumed to be ordered by each pairwise component of 82 77 // the resulting vector, higher ranks coming earlier ··· 193 188 194 189 // useGRPC indicates whether we should use a gRPC client to communicate with Sourcegraph. 195 190 useGRPC bool 196 - } 197 - 198 - // GetRepoRank asks Sourcegraph for the rank vector of repoName. 199 - func (s *sourcegraphClient) GetRepoRank(ctx context.Context, repoName string) ([]float64, error) { 200 - if s.useGRPC { 201 - return s.getRepoRankGRPC(ctx, repoName) 202 - } 203 - 204 - return s.getRepoRankREST(ctx, repoName) 205 - } 206 - 207 - func (s *sourcegraphClient) getRepoRankGRPC(ctx context.Context, repoName string) ([]float64, error) { 208 - resp, err := s.grpcClient.RepositoryRank(ctx, &proto.RepositoryRankRequest{Repository: repoName}) 209 - if err != nil { 210 - return nil, err 211 - } 212 - 213 - return resp.GetRank(), nil 214 - } 215 - 216 - func (s *sourcegraphClient) getRepoRankREST(ctx context.Context, repoName string) ([]float64, error) { 217 - u := s.Root.ResolveReference(&url.URL{ 218 - Path: "/.internal/ranks/" + strings.Trim(repoName, "/"), 219 - }) 220 - 221 - b, err := s.get(ctx, u) 222 - if err != nil { 223 - return nil, err 224 - } 225 - 226 - var ranks []float64 227 - err = json.Unmarshal(b, &ranks) 228 - if err != nil { 229 - return nil, err 230 - } 231 - 232 - return ranks, nil 233 191 } 234 192 235 193 // GetDocumentRanks asks Sourcegraph for a mapping of file paths to rank ··· 852 810 Log *log.Logger 853 811 } 854 812 855 - // GetRepoRank expects a file with exactly 1 line containing a comma separated 856 - // list of float64 as ranks. 857 - func (sf sourcegraphFake) GetRepoRank(ctx context.Context, repoName string) ([]float64, error) { 858 - dir := filepath.Join(sf.RootDir, filepath.FromSlash(repoName)) 859 - 860 - b, err := os.ReadFile(filepath.Join(dir, "SG_REPO_RANKS")) 861 - if err != nil { 862 - return nil, err 863 - } 864 - 865 - return floats64(string(b)), nil 866 - } 867 - 868 813 // GetDocumentRanks expects a file where each line has the following format: 869 814 // path<tab>rank... where rank is a float64. 870 815 func (sf sourcegraphFake) GetDocumentRanks(ctx context.Context, repoName string) (RepoPathRanks, error) { ··· 1142 1087 return 1143 1088 } 1144 1089 1145 - func (s sourcegraphNop) GetRepoRank(ctx context.Context, repoName string) ([]float64, error) { 1146 - return nil, nil 1147 - } 1148 - 1149 1090 func (s sourcegraphNop) GetDocumentRanks(ctx context.Context, repoName string) (RepoPathRanks, error) { 1150 1091 return RepoPathRanks{}, nil 1151 1092 } ··· 1191 1132 } 1192 1133 1193 1134 func (n noopGRPCClient) List(ctx context.Context, in *proto.ListRequest, opts ...grpc.CallOption) (*proto.ListResponse, error) { 1194 - return nil, fmt.Errorf("grpc client not enabled") 1195 - } 1196 - 1197 - func (n noopGRPCClient) RepositoryRank(ctx context.Context, in *proto.RepositoryRankRequest, opts ...grpc.CallOption) (*proto.RepositoryRankResponse, error) { 1198 1135 return nil, fmt.Errorf("grpc client not enabled") 1199 1136 } 1200 1137