From 46630ef1d864bf083be41963ba272ce9ea218f29 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Tue, 27 Oct 2026 13:41:11 +0100 Subject: [PATCH] chore(search): drop the IndexProvider service from the proto --- .../opencloud/services/search/v0/search.pb.go | 74 ++++++------- .../services/search/v0/search.pb.micro.go | 72 ------------- .../services/search/v0/search.swagger.json | 74 ------------- .../services/search/v0/search_grpc.pb.go | 102 ------------------ .../opencloud/services/search/v0/search.proto | 10 -- 5 files changed, 31 insertions(+), 301 deletions(-) diff --git a/protogen/gen/opencloud/services/search/v0/search.pb.go b/protogen/gen/opencloud/services/search/v0/search.pb.go index e183be5e60..16b919277d 100644 --- a/protogen/gen/opencloud/services/search/v0/search.pb.go +++ b/protogen/gen/opencloud/services/search/v0/search.pb.go @@ -742,41 +742,31 @@ var file_opencloud_services_search_v0_search_proto_rawDesc = []byte{ 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, - 0x2d, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x32, 0xa7, 0x01, 0x0a, 0x0d, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x95, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x61, - 0x72, 0x63, 0x68, 0x12, 0x30, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, - 0x76, 0x30, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, - 0x68, 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, - 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x61, - 0x72, 0x63, 0x68, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, - 0x42, 0xf2, 0x02, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x65, 0x75, 0x2f, 0x6f, 0x70, 0x65, - 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, - 0x67, 0x65, 0x6e, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x76, 0x30, 0x92, - 0x41, 0xa2, 0x02, 0x12, 0xb7, 0x01, 0x0a, 0x10, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x6c, 0x6f, 0x75, - 0x64, 0x20, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x22, 0x51, 0x0a, 0x0e, 0x4f, 0x70, 0x65, 0x6e, - 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x47, 0x6d, 0x62, 0x48, 0x12, 0x29, 0x68, 0x74, 0x74, 0x70, - 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, - 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x65, 0x75, 0x2f, 0x6f, 0x70, 0x65, 0x6e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x1a, 0x14, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x40, 0x6f, - 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x65, 0x75, 0x2a, 0x49, 0x0a, 0x0a, 0x41, - 0x70, 0x61, 0x63, 0x68, 0x65, 0x2d, 0x32, 0x2e, 0x30, 0x12, 0x3b, 0x68, 0x74, 0x74, 0x70, 0x73, - 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, - 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x65, 0x75, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x2f, 0x4c, - 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x05, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x2a, 0x02, 0x01, - 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, - 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x72, 0x3e, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, - 0x65, 0x72, 0x20, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x12, 0x2a, 0x68, 0x74, 0x74, 0x70, 0x73, - 0x3a, 0x2f, 0x2f, 0x64, 0x6f, 0x63, 0x73, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x65, 0x75, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x73, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2d, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x42, 0xf2, 0x02, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, + 0x65, 0x75, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x2f, 0x76, 0x30, 0x92, 0x41, 0xa2, 0x02, 0x12, 0xb7, 0x01, 0x0a, 0x10, 0x4f, 0x70, + 0x65, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x22, 0x51, + 0x0a, 0x0e, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x47, 0x6d, 0x62, 0x48, + 0x12, 0x29, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x65, + 0x75, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x1a, 0x14, 0x73, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x40, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x65, + 0x75, 0x2a, 0x49, 0x0a, 0x0a, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2d, 0x32, 0x2e, 0x30, 0x12, + 0x3b, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x65, 0x75, + 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, + 0x6d, 0x61, 0x69, 0x6e, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x05, 0x31, 0x2e, + 0x30, 0x2e, 0x30, 0x2a, 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x72, 0x3e, 0x0a, 0x10, 0x44, + 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x20, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x12, + 0x2a, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x64, 0x6f, 0x63, 0x73, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x65, 0x75, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -818,13 +808,11 @@ var file_opencloud_services_search_v0_search_proto_depIdxs = []int32{ 1, // 7: opencloud.services.search.v0.SearchProvider.Search:input_type -> opencloud.services.search.v0.SearchRequest 5, // 8: opencloud.services.search.v0.SearchProvider.IndexSpace:input_type -> opencloud.services.search.v0.IndexSpaceRequest 7, // 9: opencloud.services.search.v0.SearchProvider.OptimizeIndex:input_type -> opencloud.services.search.v0.OptimizeIndexRequest - 3, // 10: opencloud.services.search.v0.IndexProvider.Search:input_type -> opencloud.services.search.v0.SearchIndexRequest - 2, // 11: opencloud.services.search.v0.SearchProvider.Search:output_type -> opencloud.services.search.v0.SearchResponse - 6, // 12: opencloud.services.search.v0.SearchProvider.IndexSpace:output_type -> opencloud.services.search.v0.IndexSpaceResponse - 8, // 13: opencloud.services.search.v0.SearchProvider.OptimizeIndex:output_type -> opencloud.services.search.v0.OptimizeIndexResponse - 4, // 14: opencloud.services.search.v0.IndexProvider.Search:output_type -> opencloud.services.search.v0.SearchIndexResponse - 11, // [11:15] is the sub-list for method output_type - 7, // [7:11] is the sub-list for method input_type + 2, // 10: opencloud.services.search.v0.SearchProvider.Search:output_type -> opencloud.services.search.v0.SearchResponse + 6, // 11: opencloud.services.search.v0.SearchProvider.IndexSpace:output_type -> opencloud.services.search.v0.IndexSpaceResponse + 8, // 12: opencloud.services.search.v0.SearchProvider.OptimizeIndex:output_type -> opencloud.services.search.v0.OptimizeIndexResponse + 10, // [10:13] is the sub-list for method output_type + 7, // [7:10] is the sub-list for method input_type 7, // [7:7] is the sub-list for extension type_name 7, // [7:7] is the sub-list for extension extendee 0, // [0:7] is the sub-list for field type_name @@ -941,7 +929,7 @@ func file_opencloud_services_search_v0_search_proto_init() { NumEnums: 1, NumMessages: 8, NumExtensions: 0, - NumServices: 2, + NumServices: 1, }, GoTypes: file_opencloud_services_search_v0_search_proto_goTypes, DependencyIndexes: file_opencloud_services_search_v0_search_proto_depIdxs, diff --git a/protogen/gen/opencloud/services/search/v0/search.pb.micro.go b/protogen/gen/opencloud/services/search/v0/search.pb.micro.go index d487290c05..a7d38f6f44 100644 --- a/protogen/gen/opencloud/services/search/v0/search.pb.micro.go +++ b/protogen/gen/opencloud/services/search/v0/search.pb.micro.go @@ -251,75 +251,3 @@ func (x *searchProviderIndexSpaceStream) Send(m *IndexSpaceResponse) error { func (h *searchProviderHandler) OptimizeIndex(ctx context.Context, in *OptimizeIndexRequest, out *OptimizeIndexResponse) error { return h.SearchProviderHandler.OptimizeIndex(ctx, in, out) } - -// Api Endpoints for IndexProvider service - -func NewIndexProviderEndpoints() []*api.Endpoint { - return []*api.Endpoint{ - { - Name: "IndexProvider.Search", - Path: []string{"/api/v0/search/index/search"}, - Method: []string{"POST"}, - Handler: "rpc", - }, - } -} - -// Client API for IndexProvider service - -type IndexProviderService interface { - Search(ctx context.Context, in *SearchIndexRequest, opts ...client.CallOption) (*SearchIndexResponse, error) -} - -type indexProviderService struct { - c client.Client - name string -} - -func NewIndexProviderService(name string, c client.Client) IndexProviderService { - return &indexProviderService{ - c: c, - name: name, - } -} - -func (c *indexProviderService) Search(ctx context.Context, in *SearchIndexRequest, opts ...client.CallOption) (*SearchIndexResponse, error) { - req := c.c.NewRequest(c.name, "IndexProvider.Search", in) - out := new(SearchIndexResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for IndexProvider service - -type IndexProviderHandler interface { - Search(context.Context, *SearchIndexRequest, *SearchIndexResponse) error -} - -func RegisterIndexProviderHandler(s server.Server, hdlr IndexProviderHandler, opts ...server.HandlerOption) error { - type indexProvider interface { - Search(ctx context.Context, in *SearchIndexRequest, out *SearchIndexResponse) error - } - type IndexProvider struct { - indexProvider - } - h := &indexProviderHandler{hdlr} - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "IndexProvider.Search", - Path: []string{"/api/v0/search/index/search"}, - Method: []string{"POST"}, - Handler: "rpc", - })) - return s.Handle(s.NewHandler(&IndexProvider{h}, opts...)) -} - -type indexProviderHandler struct { - IndexProviderHandler -} - -func (h *indexProviderHandler) Search(ctx context.Context, in *SearchIndexRequest, out *SearchIndexResponse) error { - return h.IndexProviderHandler.Search(ctx, in, out) -} diff --git a/protogen/gen/opencloud/services/search/v0/search.swagger.json b/protogen/gen/opencloud/services/search/v0/search.swagger.json index 3a4ff75278..40b4106848 100644 --- a/protogen/gen/opencloud/services/search/v0/search.swagger.json +++ b/protogen/gen/opencloud/services/search/v0/search.swagger.json @@ -16,9 +16,6 @@ "tags": [ { "name": "SearchProvider" - }, - { - "name": "IndexProvider" } ], "schemes": [ @@ -74,38 +71,6 @@ ] } }, - "/api/v0/search/index/search": { - "post": { - "operationId": "IndexProvider_Search", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0SearchIndexResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/googlerpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0SearchIndexRequest" - } - } - ], - "tags": [ - "IndexProvider" - ] - } - }, "/api/v0/search/optimize-index": { "post": { "summary": "OptimizeIndex merges the segments of the index into one, without indexing\nanything again. It answers once the merge is done.", @@ -563,45 +528,6 @@ } } }, - "v0SearchIndexRequest": { - "type": "object", - "properties": { - "pageSize": { - "type": "integer", - "format": "int32", - "title": "Optional. The maximum number of entries to return in the response" - }, - "pageToken": { - "type": "string", - "title": "Optional. A pagination token returned from a previous call to `Get`\nthat indicates from where search should continue" - }, - "query": { - "type": "string" - }, - "ref": { - "$ref": "#/definitions/v0Reference" - } - } - }, - "v0SearchIndexResponse": { - "type": "object", - "properties": { - "matches": { - "type": "array", - "items": { - "$ref": "#/definitions/v0Match" - } - }, - "nextPageToken": { - "type": "string", - "title": "Token to retrieve the next page of results, or empty if there are no\nmore results in the list" - }, - "totalMatches": { - "type": "integer", - "format": "int32" - } - } - }, "v0SearchRequest": { "type": "object", "properties": { diff --git a/protogen/gen/opencloud/services/search/v0/search_grpc.pb.go b/protogen/gen/opencloud/services/search/v0/search_grpc.pb.go index 7148858dd7..0c74b70ae7 100644 --- a/protogen/gen/opencloud/services/search/v0/search_grpc.pb.go +++ b/protogen/gen/opencloud/services/search/v0/search_grpc.pb.go @@ -207,105 +207,3 @@ var SearchProvider_ServiceDesc = grpc.ServiceDesc{ }, Metadata: "opencloud/services/search/v0/search.proto", } - -const ( - IndexProvider_Search_FullMethodName = "/opencloud.services.search.v0.IndexProvider/Search" -) - -// IndexProviderClient is the client API for IndexProvider service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type IndexProviderClient interface { - Search(ctx context.Context, in *SearchIndexRequest, opts ...grpc.CallOption) (*SearchIndexResponse, error) -} - -type indexProviderClient struct { - cc grpc.ClientConnInterface -} - -func NewIndexProviderClient(cc grpc.ClientConnInterface) IndexProviderClient { - return &indexProviderClient{cc} -} - -func (c *indexProviderClient) Search(ctx context.Context, in *SearchIndexRequest, opts ...grpc.CallOption) (*SearchIndexResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SearchIndexResponse) - err := c.cc.Invoke(ctx, IndexProvider_Search_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// IndexProviderServer is the server API for IndexProvider service. -// All implementations must embed UnimplementedIndexProviderServer -// for forward compatibility. -type IndexProviderServer interface { - Search(context.Context, *SearchIndexRequest) (*SearchIndexResponse, error) - mustEmbedUnimplementedIndexProviderServer() -} - -// UnimplementedIndexProviderServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedIndexProviderServer struct{} - -func (UnimplementedIndexProviderServer) Search(context.Context, *SearchIndexRequest) (*SearchIndexResponse, error) { - return nil, status.Error(codes.Unimplemented, "method Search not implemented") -} -func (UnimplementedIndexProviderServer) mustEmbedUnimplementedIndexProviderServer() {} -func (UnimplementedIndexProviderServer) testEmbeddedByValue() {} - -// UnsafeIndexProviderServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to IndexProviderServer will -// result in compilation errors. -type UnsafeIndexProviderServer interface { - mustEmbedUnimplementedIndexProviderServer() -} - -func RegisterIndexProviderServer(s grpc.ServiceRegistrar, srv IndexProviderServer) { - // If the following call panics, it indicates UnimplementedIndexProviderServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&IndexProvider_ServiceDesc, srv) -} - -func _IndexProvider_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchIndexRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IndexProviderServer).Search(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: IndexProvider_Search_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IndexProviderServer).Search(ctx, req.(*SearchIndexRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// IndexProvider_ServiceDesc is the grpc.ServiceDesc for IndexProvider service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var IndexProvider_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "opencloud.services.search.v0.IndexProvider", - HandlerType: (*IndexProviderServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Search", - Handler: _IndexProvider_Search_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "opencloud/services/search/v0/search.proto", -} diff --git a/protogen/proto/opencloud/services/search/v0/search.proto b/protogen/proto/opencloud/services/search/v0/search.proto index 030e6fbaa3..94a75cfed4 100644 --- a/protogen/proto/opencloud/services/search/v0/search.proto +++ b/protogen/proto/opencloud/services/search/v0/search.proto @@ -60,16 +60,6 @@ service SearchProvider { } } -service IndexProvider { - rpc Search(SearchIndexRequest) returns (SearchIndexResponse) { - option (google.api.http) = { - post: "/api/v0/search/index/search", - body: "*" - }; - }; - // rpc Remove(RemoveRequest) returns (RemoveResponse) {}; -} - message SearchRequest { // Optional. The maximum number of entries to return in the response int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL];