From f9534c5e4efcb28dd8e5aaa141889cde7dc318d3 Mon Sep 17 00:00:00 2001 From: Daniil Forshev Date: Fri, 20 Feb 2026 13:11:36 +0500 Subject: [PATCH 1/4] feat: one phase search --- api/seqproxyapi/v1/seq_proxy_api.proto | 7 + api/storeapi/store_api.proto | 38 +- pkg/seqproxyapi/v1/seq_proxy_api.pb.go | 51 +- pkg/seqproxyapi/v1/seq_proxy_api.pb.gw.go | 63 + .../v1/seq_proxy_api_vtproto.pb.go | 36 + pkg/storeapi/store_api.pb.go | 872 +- pkg/storeapi/store_api.pb.gw.go | 46 + pkg/storeapi/store_api_vtproto.pb.go | 9073 +++++++++++------ proxy/search/ingestor.go | 2 +- proxy/search/mock/store_api_client_mock.go | 20 + proxy/search/one_phase_search.go | 113 + proxyapi/grpc_one_phase_search.go | 165 + proxyapi/grpc_v1.go | 1 + proxyapi/mock/grpc_v1.go | 16 + storeapi/client.go | 55 + storeapi/grpc_fetch.go | 35 +- storeapi/grpc_one_phase_search.go | 111 + 17 files changed, 7083 insertions(+), 3621 deletions(-) create mode 100644 proxy/search/one_phase_search.go create mode 100644 proxyapi/grpc_one_phase_search.go create mode 100644 storeapi/grpc_one_phase_search.go diff --git a/api/seqproxyapi/v1/seq_proxy_api.proto b/api/seqproxyapi/v1/seq_proxy_api.proto index 22ca2f1d..659c05e5 100644 --- a/api/seqproxyapi/v1/seq_proxy_api.proto +++ b/api/seqproxyapi/v1/seq_proxy_api.proto @@ -111,6 +111,13 @@ service SeqProxyApi { body: "*" }; } + + rpc OnePhaseSearch(SearchRequest) returns (SearchResponse) { + option (google.api.http) = { + post: "/one-phase-search" + body: "*" + }; + } } // Custom error code, returned by seq-db proxy. diff --git a/api/storeapi/store_api.proto b/api/storeapi/store_api.proto index 8d34fc23..3747f040 100644 --- a/api/storeapi/store_api.proto +++ b/api/storeapi/store_api.proto @@ -26,6 +26,8 @@ service StoreApi { rpc Fetch(FetchRequest) returns (stream BinaryData) {} rpc Status(StatusRequest) returns (StatusResponse) {} + + rpc OnePhaseSearch(OnePhaseSearchRequest) returns (stream OnePhaseSearchResponse) {} } message BulkRequest { @@ -244,12 +246,13 @@ message IdWithHint { string hint = 2; } -message FetchRequest { - message FieldsFilter { +message FieldsFilter { repeated string fields = 1; // see seqproxyapi.FetchRequest.FieldsFilter.allow_list for details. bool allow_list = 2; } + +message FetchRequest { repeated string ids = 1; bool explain = 3; repeated IdWithHint ids_with_hints = 4; @@ -261,3 +264,34 @@ message StatusRequest {} message StatusResponse { google.protobuf.Timestamp oldest_time = 1; } + +message OnePhaseSearchRequest { + string query = 1; + int64 from = 2; + int64 to = 3; + int64 size = 4; + int64 offset = 5; + bool explain = 6; + bool with_total = 7; + Order order = 8; + string offset_id = 9; + FieldsFilter fields_filter = 10; +} + +message OnePhaseSearchResponse { + oneof ResponseType { + Header header = 1; + Document document = 2; + } +} + +message Document { + BinaryData data = 1; +} + +message Header { + uint64 total = 1; + repeated string errors = 2; + SearchErrorCode code = 3; + optional ExplainEntry explain = 4; +} diff --git a/pkg/seqproxyapi/v1/seq_proxy_api.pb.go b/pkg/seqproxyapi/v1/seq_proxy_api.pb.go index eac9fd1c..9665df6b 100644 --- a/pkg/seqproxyapi/v1/seq_proxy_api.pb.go +++ b/pkg/seqproxyapi/v1/seq_proxy_api.pb.go @@ -3042,7 +3042,7 @@ var file_seqproxyapi_v1_seq_proxy_api_proto_rawDesc = string([]byte{ 0x19, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x03, 0x32, 0x98, 0x0c, 0x0a, 0x0b, 0x53, 0x65, 0x71, + 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x03, 0x32, 0x87, 0x0d, 0x0a, 0x0b, 0x53, 0x65, 0x71, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x41, 0x70, 0x69, 0x12, 0x5b, 0x0a, 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, @@ -3140,11 +3140,18 @@ var file_seqproxyapi_v1_seq_proxy_api_proto_rawDesc = string([]byte{ 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x2d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x6c, - 0x69, 0x73, 0x74, 0x42, 0x3b, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x6f, 0x7a, 0x6f, 0x6e, 0x74, 0x65, 0x63, 0x68, 0x2f, 0x73, 0x65, 0x71, 0x2d, 0x64, - 0x62, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x73, 0x74, 0x12, 0x6d, 0x0a, 0x0e, 0x4f, 0x6e, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, + 0x11, 0x2f, 0x6f, 0x6e, 0x65, 0x2d, 0x70, 0x68, 0x61, 0x73, 0x65, 0x2d, 0x73, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x42, 0x3b, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6f, 0x7a, 0x6f, 0x6e, 0x74, 0x65, 0x63, 0x68, 0x2f, 0x73, 0x65, 0x71, 0x2d, 0x64, 0x62, + 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, }) var ( @@ -3281,21 +3288,23 @@ var file_seqproxyapi_v1_seq_proxy_api_proto_depIdxs = []int32{ 20, // 69: seqproxyapi.v1.SeqProxyApi.CancelAsyncSearch:input_type -> seqproxyapi.v1.CancelAsyncSearchRequest 22, // 70: seqproxyapi.v1.SeqProxyApi.DeleteAsyncSearch:input_type -> seqproxyapi.v1.DeleteAsyncSearchRequest 24, // 71: seqproxyapi.v1.SeqProxyApi.GetAsyncSearchesList:input_type -> seqproxyapi.v1.GetAsyncSearchesListRequest - 14, // 72: seqproxyapi.v1.SeqProxyApi.Search:output_type -> seqproxyapi.v1.SearchResponse - 15, // 73: seqproxyapi.v1.SeqProxyApi.ComplexSearch:output_type -> seqproxyapi.v1.ComplexSearchResponse - 28, // 74: seqproxyapi.v1.SeqProxyApi.GetAggregation:output_type -> seqproxyapi.v1.GetAggregationResponse - 30, // 75: seqproxyapi.v1.SeqProxyApi.GetHistogram:output_type -> seqproxyapi.v1.GetHistogramResponse - 5, // 76: seqproxyapi.v1.SeqProxyApi.Fetch:output_type -> seqproxyapi.v1.Document - 33, // 77: seqproxyapi.v1.SeqProxyApi.Mapping:output_type -> seqproxyapi.v1.MappingResponse - 35, // 78: seqproxyapi.v1.SeqProxyApi.Status:output_type -> seqproxyapi.v1.StatusResponse - 39, // 79: seqproxyapi.v1.SeqProxyApi.Export:output_type -> seqproxyapi.v1.ExportResponse - 17, // 80: seqproxyapi.v1.SeqProxyApi.StartAsyncSearch:output_type -> seqproxyapi.v1.StartAsyncSearchResponse - 19, // 81: seqproxyapi.v1.SeqProxyApi.FetchAsyncSearchResult:output_type -> seqproxyapi.v1.FetchAsyncSearchResultResponse - 21, // 82: seqproxyapi.v1.SeqProxyApi.CancelAsyncSearch:output_type -> seqproxyapi.v1.CancelAsyncSearchResponse - 23, // 83: seqproxyapi.v1.SeqProxyApi.DeleteAsyncSearch:output_type -> seqproxyapi.v1.DeleteAsyncSearchResponse - 25, // 84: seqproxyapi.v1.SeqProxyApi.GetAsyncSearchesList:output_type -> seqproxyapi.v1.GetAsyncSearchesListResponse - 72, // [72:85] is the sub-list for method output_type - 59, // [59:72] is the sub-list for method input_type + 12, // 72: seqproxyapi.v1.SeqProxyApi.OnePhaseSearch:input_type -> seqproxyapi.v1.SearchRequest + 14, // 73: seqproxyapi.v1.SeqProxyApi.Search:output_type -> seqproxyapi.v1.SearchResponse + 15, // 74: seqproxyapi.v1.SeqProxyApi.ComplexSearch:output_type -> seqproxyapi.v1.ComplexSearchResponse + 28, // 75: seqproxyapi.v1.SeqProxyApi.GetAggregation:output_type -> seqproxyapi.v1.GetAggregationResponse + 30, // 76: seqproxyapi.v1.SeqProxyApi.GetHistogram:output_type -> seqproxyapi.v1.GetHistogramResponse + 5, // 77: seqproxyapi.v1.SeqProxyApi.Fetch:output_type -> seqproxyapi.v1.Document + 33, // 78: seqproxyapi.v1.SeqProxyApi.Mapping:output_type -> seqproxyapi.v1.MappingResponse + 35, // 79: seqproxyapi.v1.SeqProxyApi.Status:output_type -> seqproxyapi.v1.StatusResponse + 39, // 80: seqproxyapi.v1.SeqProxyApi.Export:output_type -> seqproxyapi.v1.ExportResponse + 17, // 81: seqproxyapi.v1.SeqProxyApi.StartAsyncSearch:output_type -> seqproxyapi.v1.StartAsyncSearchResponse + 19, // 82: seqproxyapi.v1.SeqProxyApi.FetchAsyncSearchResult:output_type -> seqproxyapi.v1.FetchAsyncSearchResultResponse + 21, // 83: seqproxyapi.v1.SeqProxyApi.CancelAsyncSearch:output_type -> seqproxyapi.v1.CancelAsyncSearchResponse + 23, // 84: seqproxyapi.v1.SeqProxyApi.DeleteAsyncSearch:output_type -> seqproxyapi.v1.DeleteAsyncSearchResponse + 25, // 85: seqproxyapi.v1.SeqProxyApi.GetAsyncSearchesList:output_type -> seqproxyapi.v1.GetAsyncSearchesListResponse + 14, // 86: seqproxyapi.v1.SeqProxyApi.OnePhaseSearch:output_type -> seqproxyapi.v1.SearchResponse + 73, // [73:87] is the sub-list for method output_type + 59, // [59:73] is the sub-list for method input_type 59, // [59:59] is the sub-list for extension type_name 59, // [59:59] is the sub-list for extension extendee 0, // [0:59] is the sub-list for field type_name diff --git a/pkg/seqproxyapi/v1/seq_proxy_api.pb.gw.go b/pkg/seqproxyapi/v1/seq_proxy_api.pb.gw.go index 28010d15..26257727 100644 --- a/pkg/seqproxyapi/v1/seq_proxy_api.pb.gw.go +++ b/pkg/seqproxyapi/v1/seq_proxy_api.pb.gw.go @@ -351,6 +351,30 @@ func local_request_SeqProxyApi_GetAsyncSearchesList_0(ctx context.Context, marsh return msg, metadata, err } +func request_SeqProxyApi_OnePhaseSearch_0(ctx context.Context, marshaler runtime.Marshaler, client SeqProxyApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq SearchRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.OnePhaseSearch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_SeqProxyApi_OnePhaseSearch_0(ctx context.Context, marshaler runtime.Marshaler, server SeqProxyApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq SearchRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.OnePhaseSearch(ctx, &protoReq) + return msg, metadata, err +} + // RegisterSeqProxyApiHandlerServer registers the http handlers for service SeqProxyApi to "mux". // UnaryRPC :call SeqProxyApiServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -591,6 +615,26 @@ func RegisterSeqProxyApiHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_SeqProxyApi_GetAsyncSearchesList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) + mux.Handle(http.MethodPost, pattern_SeqProxyApi_OnePhaseSearch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/seqproxyapi.v1.SeqProxyApi/OnePhaseSearch", runtime.WithHTTPPathPattern("/one-phase-search")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SeqProxyApi_OnePhaseSearch_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_SeqProxyApi_OnePhaseSearch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } @@ -852,6 +896,23 @@ func RegisterSeqProxyApiHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_SeqProxyApi_GetAsyncSearchesList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) + mux.Handle(http.MethodPost, pattern_SeqProxyApi_OnePhaseSearch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/seqproxyapi.v1.SeqProxyApi/OnePhaseSearch", runtime.WithHTTPPathPattern("/one-phase-search")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SeqProxyApi_OnePhaseSearch_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_SeqProxyApi_OnePhaseSearch_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } @@ -869,6 +930,7 @@ var ( pattern_SeqProxyApi_CancelAsyncSearch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"async-searches", "search_id", "cancel"}, "")) pattern_SeqProxyApi_DeleteAsyncSearch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"async-searches", "search_id"}, "")) pattern_SeqProxyApi_GetAsyncSearchesList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"async-searches", "list"}, "")) + pattern_SeqProxyApi_OnePhaseSearch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"one-phase-search"}, "")) ) var ( @@ -885,4 +947,5 @@ var ( forward_SeqProxyApi_CancelAsyncSearch_0 = runtime.ForwardResponseMessage forward_SeqProxyApi_DeleteAsyncSearch_0 = runtime.ForwardResponseMessage forward_SeqProxyApi_GetAsyncSearchesList_0 = runtime.ForwardResponseMessage + forward_SeqProxyApi_OnePhaseSearch_0 = runtime.ForwardResponseMessage ) diff --git a/pkg/seqproxyapi/v1/seq_proxy_api_vtproto.pb.go b/pkg/seqproxyapi/v1/seq_proxy_api_vtproto.pb.go index 97f47d65..56011acf 100644 --- a/pkg/seqproxyapi/v1/seq_proxy_api_vtproto.pb.go +++ b/pkg/seqproxyapi/v1/seq_proxy_api_vtproto.pb.go @@ -2098,6 +2098,7 @@ type SeqProxyApiClient interface { DeleteAsyncSearch(ctx context.Context, in *DeleteAsyncSearchRequest, opts ...grpc.CallOption) (*DeleteAsyncSearchResponse, error) // Fetch list of async searches. GetAsyncSearchesList(ctx context.Context, in *GetAsyncSearchesListRequest, opts ...grpc.CallOption) (*GetAsyncSearchesListResponse, error) + OnePhaseSearch(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) } type seqProxyApiClient struct { @@ -2271,6 +2272,15 @@ func (c *seqProxyApiClient) GetAsyncSearchesList(ctx context.Context, in *GetAsy return out, nil } +func (c *seqProxyApiClient) OnePhaseSearch(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) { + out := new(SearchResponse) + err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/OnePhaseSearch", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // SeqProxyApiServer is the server API for SeqProxyApi service. // All implementations must embed UnimplementedSeqProxyApiServer // for forward compatibility @@ -2303,6 +2313,7 @@ type SeqProxyApiServer interface { DeleteAsyncSearch(context.Context, *DeleteAsyncSearchRequest) (*DeleteAsyncSearchResponse, error) // Fetch list of async searches. GetAsyncSearchesList(context.Context, *GetAsyncSearchesListRequest) (*GetAsyncSearchesListResponse, error) + OnePhaseSearch(context.Context, *SearchRequest) (*SearchResponse, error) mustEmbedUnimplementedSeqProxyApiServer() } @@ -2349,6 +2360,9 @@ func (UnimplementedSeqProxyApiServer) DeleteAsyncSearch(context.Context, *Delete func (UnimplementedSeqProxyApiServer) GetAsyncSearchesList(context.Context, *GetAsyncSearchesListRequest) (*GetAsyncSearchesListResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAsyncSearchesList not implemented") } +func (UnimplementedSeqProxyApiServer) OnePhaseSearch(context.Context, *SearchRequest) (*SearchResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OnePhaseSearch not implemented") +} func (UnimplementedSeqProxyApiServer) mustEmbedUnimplementedSeqProxyApiServer() {} // UnsafeSeqProxyApiServer may be embedded to opt out of forward compatibility for this service. @@ -2602,6 +2616,24 @@ func _SeqProxyApi_GetAsyncSearchesList_Handler(srv interface{}, ctx context.Cont return interceptor(ctx, in, info, handler) } +func _SeqProxyApi_OnePhaseSearch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SeqProxyApiServer).OnePhaseSearch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seqproxyapi.v1.SeqProxyApi/OnePhaseSearch", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SeqProxyApiServer).OnePhaseSearch(ctx, req.(*SearchRequest)) + } + return interceptor(ctx, in, info, handler) +} + // SeqProxyApi_ServiceDesc is the grpc.ServiceDesc for SeqProxyApi service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -2653,6 +2685,10 @@ var SeqProxyApi_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetAsyncSearchesList", Handler: _SeqProxyApi_GetAsyncSearchesList_Handler, }, + { + MethodName: "OnePhaseSearch", + Handler: _SeqProxyApi_OnePhaseSearch_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/pkg/storeapi/store_api.pb.go b/pkg/storeapi/store_api.pb.go index 8fbb52c1..cbcc21d2 100644 --- a/pkg/storeapi/store_api.pb.go +++ b/pkg/storeapi/store_api.pb.go @@ -1592,19 +1592,72 @@ func (x *IdWithHint) GetHint() string { return "" } +type FieldsFilter struct { + state protoimpl.MessageState `protogen:"open.v1"` + Fields []string `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"` + // see seqproxyapi.FetchRequest.FieldsFilter.allow_list for details. + AllowList bool `protobuf:"varint,2,opt,name=allow_list,json=allowList,proto3" json:"allow_list,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FieldsFilter) Reset() { + *x = FieldsFilter{} + mi := &file_storeapi_store_api_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FieldsFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldsFilter) ProtoMessage() {} + +func (x *FieldsFilter) ProtoReflect() protoreflect.Message { + mi := &file_storeapi_store_api_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FieldsFilter.ProtoReflect.Descriptor instead. +func (*FieldsFilter) Descriptor() ([]byte, []int) { + return file_storeapi_store_api_proto_rawDescGZIP(), []int{18} +} + +func (x *FieldsFilter) GetFields() []string { + if x != nil { + return x.Fields + } + return nil +} + +func (x *FieldsFilter) GetAllowList() bool { + if x != nil { + return x.AllowList + } + return false +} + type FetchRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` - Explain bool `protobuf:"varint,3,opt,name=explain,proto3" json:"explain,omitempty"` - IdsWithHints []*IdWithHint `protobuf:"bytes,4,rep,name=ids_with_hints,json=idsWithHints,proto3" json:"ids_with_hints,omitempty"` - FieldsFilter *FetchRequest_FieldsFilter `protobuf:"bytes,5,opt,name=fields_filter,json=fieldsFilter,proto3" json:"fields_filter,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` + Explain bool `protobuf:"varint,3,opt,name=explain,proto3" json:"explain,omitempty"` + IdsWithHints []*IdWithHint `protobuf:"bytes,4,rep,name=ids_with_hints,json=idsWithHints,proto3" json:"ids_with_hints,omitempty"` + FieldsFilter *FieldsFilter `protobuf:"bytes,5,opt,name=fields_filter,json=fieldsFilter,proto3" json:"fields_filter,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *FetchRequest) Reset() { *x = FetchRequest{} - mi := &file_storeapi_store_api_proto_msgTypes[18] + mi := &file_storeapi_store_api_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1616,7 +1669,7 @@ func (x *FetchRequest) String() string { func (*FetchRequest) ProtoMessage() {} func (x *FetchRequest) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[18] + mi := &file_storeapi_store_api_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1629,7 +1682,7 @@ func (x *FetchRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead. func (*FetchRequest) Descriptor() ([]byte, []int) { - return file_storeapi_store_api_proto_rawDescGZIP(), []int{18} + return file_storeapi_store_api_proto_rawDescGZIP(), []int{19} } func (x *FetchRequest) GetIds() []string { @@ -1653,7 +1706,7 @@ func (x *FetchRequest) GetIdsWithHints() []*IdWithHint { return nil } -func (x *FetchRequest) GetFieldsFilter() *FetchRequest_FieldsFilter { +func (x *FetchRequest) GetFieldsFilter() *FieldsFilter { if x != nil { return x.FieldsFilter } @@ -1668,7 +1721,7 @@ type StatusRequest struct { func (x *StatusRequest) Reset() { *x = StatusRequest{} - mi := &file_storeapi_store_api_proto_msgTypes[19] + mi := &file_storeapi_store_api_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1680,7 +1733,7 @@ func (x *StatusRequest) String() string { func (*StatusRequest) ProtoMessage() {} func (x *StatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[19] + mi := &file_storeapi_store_api_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1693,7 +1746,7 @@ func (x *StatusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead. func (*StatusRequest) Descriptor() ([]byte, []int) { - return file_storeapi_store_api_proto_rawDescGZIP(), []int{19} + return file_storeapi_store_api_proto_rawDescGZIP(), []int{20} } type StatusResponse struct { @@ -1705,7 +1758,7 @@ type StatusResponse struct { func (x *StatusResponse) Reset() { *x = StatusResponse{} - mi := &file_storeapi_store_api_proto_msgTypes[20] + mi := &file_storeapi_store_api_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1717,7 +1770,7 @@ func (x *StatusResponse) String() string { func (*StatusResponse) ProtoMessage() {} func (x *StatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[20] + mi := &file_storeapi_store_api_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1730,7 +1783,7 @@ func (x *StatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead. func (*StatusResponse) Descriptor() ([]byte, []int) { - return file_storeapi_store_api_proto_rawDescGZIP(), []int{20} + return file_storeapi_store_api_proto_rawDescGZIP(), []int{21} } func (x *StatusResponse) GetOldestTime() *timestamppb.Timestamp { @@ -1740,6 +1793,316 @@ func (x *StatusResponse) GetOldestTime() *timestamppb.Timestamp { return nil } +type OnePhaseSearchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + From int64 `protobuf:"varint,2,opt,name=from,proto3" json:"from,omitempty"` + To int64 `protobuf:"varint,3,opt,name=to,proto3" json:"to,omitempty"` + Size int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"` + Offset int64 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` + Explain bool `protobuf:"varint,6,opt,name=explain,proto3" json:"explain,omitempty"` + WithTotal bool `protobuf:"varint,7,opt,name=with_total,json=withTotal,proto3" json:"with_total,omitempty"` + Order Order `protobuf:"varint,8,opt,name=order,proto3,enum=api.Order" json:"order,omitempty"` + OffsetId string `protobuf:"bytes,9,opt,name=offset_id,json=offsetId,proto3" json:"offset_id,omitempty"` + FieldsFilter *FieldsFilter `protobuf:"bytes,10,opt,name=fields_filter,json=fieldsFilter,proto3" json:"fields_filter,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OnePhaseSearchRequest) Reset() { + *x = OnePhaseSearchRequest{} + mi := &file_storeapi_store_api_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OnePhaseSearchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnePhaseSearchRequest) ProtoMessage() {} + +func (x *OnePhaseSearchRequest) ProtoReflect() protoreflect.Message { + mi := &file_storeapi_store_api_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnePhaseSearchRequest.ProtoReflect.Descriptor instead. +func (*OnePhaseSearchRequest) Descriptor() ([]byte, []int) { + return file_storeapi_store_api_proto_rawDescGZIP(), []int{22} +} + +func (x *OnePhaseSearchRequest) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +func (x *OnePhaseSearchRequest) GetFrom() int64 { + if x != nil { + return x.From + } + return 0 +} + +func (x *OnePhaseSearchRequest) GetTo() int64 { + if x != nil { + return x.To + } + return 0 +} + +func (x *OnePhaseSearchRequest) GetSize() int64 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *OnePhaseSearchRequest) GetOffset() int64 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *OnePhaseSearchRequest) GetExplain() bool { + if x != nil { + return x.Explain + } + return false +} + +func (x *OnePhaseSearchRequest) GetWithTotal() bool { + if x != nil { + return x.WithTotal + } + return false +} + +func (x *OnePhaseSearchRequest) GetOrder() Order { + if x != nil { + return x.Order + } + return Order_ORDER_DESC +} + +func (x *OnePhaseSearchRequest) GetOffsetId() string { + if x != nil { + return x.OffsetId + } + return "" +} + +func (x *OnePhaseSearchRequest) GetFieldsFilter() *FieldsFilter { + if x != nil { + return x.FieldsFilter + } + return nil +} + +type OnePhaseSearchResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to ResponseType: + // + // *OnePhaseSearchResponse_Header + // *OnePhaseSearchResponse_Document + ResponseType isOnePhaseSearchResponse_ResponseType `protobuf_oneof:"ResponseType"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OnePhaseSearchResponse) Reset() { + *x = OnePhaseSearchResponse{} + mi := &file_storeapi_store_api_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OnePhaseSearchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnePhaseSearchResponse) ProtoMessage() {} + +func (x *OnePhaseSearchResponse) ProtoReflect() protoreflect.Message { + mi := &file_storeapi_store_api_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnePhaseSearchResponse.ProtoReflect.Descriptor instead. +func (*OnePhaseSearchResponse) Descriptor() ([]byte, []int) { + return file_storeapi_store_api_proto_rawDescGZIP(), []int{23} +} + +func (x *OnePhaseSearchResponse) GetResponseType() isOnePhaseSearchResponse_ResponseType { + if x != nil { + return x.ResponseType + } + return nil +} + +func (x *OnePhaseSearchResponse) GetHeader() *Header { + if x != nil { + if x, ok := x.ResponseType.(*OnePhaseSearchResponse_Header); ok { + return x.Header + } + } + return nil +} + +func (x *OnePhaseSearchResponse) GetDocument() *Document { + if x != nil { + if x, ok := x.ResponseType.(*OnePhaseSearchResponse_Document); ok { + return x.Document + } + } + return nil +} + +type isOnePhaseSearchResponse_ResponseType interface { + isOnePhaseSearchResponse_ResponseType() +} + +type OnePhaseSearchResponse_Header struct { + Header *Header `protobuf:"bytes,1,opt,name=header,proto3,oneof"` +} + +type OnePhaseSearchResponse_Document struct { + Document *Document `protobuf:"bytes,2,opt,name=document,proto3,oneof"` +} + +func (*OnePhaseSearchResponse_Header) isOnePhaseSearchResponse_ResponseType() {} + +func (*OnePhaseSearchResponse_Document) isOnePhaseSearchResponse_ResponseType() {} + +type Document struct { + state protoimpl.MessageState `protogen:"open.v1"` + Data *BinaryData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Document) Reset() { + *x = Document{} + mi := &file_storeapi_store_api_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Document) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Document) ProtoMessage() {} + +func (x *Document) ProtoReflect() protoreflect.Message { + mi := &file_storeapi_store_api_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Document.ProtoReflect.Descriptor instead. +func (*Document) Descriptor() ([]byte, []int) { + return file_storeapi_store_api_proto_rawDescGZIP(), []int{24} +} + +func (x *Document) GetData() *BinaryData { + if x != nil { + return x.Data + } + return nil +} + +type Header struct { + state protoimpl.MessageState `protogen:"open.v1"` + Total uint64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` + Errors []string `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"` + Code SearchErrorCode `protobuf:"varint,3,opt,name=code,proto3,enum=api.SearchErrorCode" json:"code,omitempty"` + Explain *ExplainEntry `protobuf:"bytes,4,opt,name=explain,proto3,oneof" json:"explain,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Header) Reset() { + *x = Header{} + mi := &file_storeapi_store_api_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Header) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Header) ProtoMessage() {} + +func (x *Header) ProtoReflect() protoreflect.Message { + mi := &file_storeapi_store_api_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Header.ProtoReflect.Descriptor instead. +func (*Header) Descriptor() ([]byte, []int) { + return file_storeapi_store_api_proto_rawDescGZIP(), []int{25} +} + +func (x *Header) GetTotal() uint64 { + if x != nil { + return x.Total + } + return 0 +} + +func (x *Header) GetErrors() []string { + if x != nil { + return x.Errors + } + return nil +} + +func (x *Header) GetCode() SearchErrorCode { + if x != nil { + return x.Code + } + return SearchErrorCode_NO_ERROR +} + +func (x *Header) GetExplain() *ExplainEntry { + if x != nil { + return x.Explain + } + return nil +} + type SearchResponse_Id struct { state protoimpl.MessageState `protogen:"open.v1"` Mid uint64 `protobuf:"varint,1,opt,name=mid,proto3" json:"mid,omitempty"` @@ -1750,7 +2113,7 @@ type SearchResponse_Id struct { func (x *SearchResponse_Id) Reset() { *x = SearchResponse_Id{} - mi := &file_storeapi_store_api_proto_msgTypes[21] + mi := &file_storeapi_store_api_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1762,7 +2125,7 @@ func (x *SearchResponse_Id) String() string { func (*SearchResponse_Id) ProtoMessage() {} func (x *SearchResponse_Id) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[21] + mi := &file_storeapi_store_api_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1802,7 +2165,7 @@ type SearchResponse_IdWithHint struct { func (x *SearchResponse_IdWithHint) Reset() { *x = SearchResponse_IdWithHint{} - mi := &file_storeapi_store_api_proto_msgTypes[22] + mi := &file_storeapi_store_api_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1814,7 +2177,7 @@ func (x *SearchResponse_IdWithHint) String() string { func (*SearchResponse_IdWithHint) ProtoMessage() {} func (x *SearchResponse_IdWithHint) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[22] + mi := &file_storeapi_store_api_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1859,7 +2222,7 @@ type SearchResponse_Histogram struct { func (x *SearchResponse_Histogram) Reset() { *x = SearchResponse_Histogram{} - mi := &file_storeapi_store_api_proto_msgTypes[23] + mi := &file_storeapi_store_api_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1871,7 +2234,7 @@ func (x *SearchResponse_Histogram) String() string { func (*SearchResponse_Histogram) ProtoMessage() {} func (x *SearchResponse_Histogram) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[23] + mi := &file_storeapi_store_api_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1947,7 +2310,7 @@ type SearchResponse_Bin struct { func (x *SearchResponse_Bin) Reset() { *x = SearchResponse_Bin{} - mi := &file_storeapi_store_api_proto_msgTypes[24] + mi := &file_storeapi_store_api_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1959,7 +2322,7 @@ func (x *SearchResponse_Bin) String() string { func (*SearchResponse_Bin) ProtoMessage() {} func (x *SearchResponse_Bin) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[24] + mi := &file_storeapi_store_api_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2018,7 +2381,7 @@ type SearchResponse_Agg struct { func (x *SearchResponse_Agg) Reset() { *x = SearchResponse_Agg{} - mi := &file_storeapi_store_api_proto_msgTypes[25] + mi := &file_storeapi_store_api_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2030,7 +2393,7 @@ func (x *SearchResponse_Agg) String() string { func (*SearchResponse_Agg) ProtoMessage() {} func (x *SearchResponse_Agg) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[25] + mi := &file_storeapi_store_api_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2082,59 +2445,6 @@ func (x *SearchResponse_Agg) GetValuesPool() []string { return nil } -type FetchRequest_FieldsFilter struct { - state protoimpl.MessageState `protogen:"open.v1"` - Fields []string `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"` - // see seqproxyapi.FetchRequest.FieldsFilter.allow_list for details. - AllowList bool `protobuf:"varint,2,opt,name=allow_list,json=allowList,proto3" json:"allow_list,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FetchRequest_FieldsFilter) Reset() { - *x = FetchRequest_FieldsFilter{} - mi := &file_storeapi_store_api_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FetchRequest_FieldsFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FetchRequest_FieldsFilter) ProtoMessage() {} - -func (x *FetchRequest_FieldsFilter) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[29] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FetchRequest_FieldsFilter.ProtoReflect.Descriptor instead. -func (*FetchRequest_FieldsFilter) Descriptor() ([]byte, []int) { - return file_storeapi_store_api_proto_rawDescGZIP(), []int{18, 0} -} - -func (x *FetchRequest_FieldsFilter) GetFields() []string { - if x != nil { - return x.Fields - } - return nil -} - -func (x *FetchRequest_FieldsFilter) GetAllowList() bool { - if x != nil { - return x.AllowList - } - return false -} - var File_storeapi_store_api_proto protoreflect.FileDescriptor var file_storeapi_store_api_proto_rawDesc = string([]byte{ @@ -2421,112 +2731,156 @@ var file_storeapi_store_api_proto_rawDesc = string([]byte{ 0x63, 0x65, 0x6c, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x30, 0x0a, 0x0a, 0x49, 0x64, 0x57, 0x69, 0x74, 0x68, 0x48, 0x69, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x69, 0x6e, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x69, 0x6e, 0x74, 0x22, 0xfd, 0x01, 0x0a, 0x0c, 0x46, - 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, - 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, 0x18, 0x0a, - 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, - 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x12, 0x35, 0x0a, 0x0e, 0x69, 0x64, 0x73, 0x5f, 0x77, - 0x69, 0x74, 0x68, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x64, 0x57, 0x69, 0x74, 0x68, 0x48, 0x69, 0x6e, 0x74, - 0x52, 0x0c, 0x69, 0x64, 0x73, 0x57, 0x69, 0x74, 0x68, 0x48, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x43, - 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x65, 0x74, 0x63, - 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0c, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x1a, 0x45, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x61, - 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x0f, 0x0a, 0x0d, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4d, 0x0a, 0x0e, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, - 0x0b, 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, - 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x2a, 0xac, 0x01, 0x0a, 0x07, 0x41, - 0x67, 0x67, 0x46, 0x75, 0x6e, 0x63, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, - 0x4e, 0x43, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x47, - 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x53, 0x55, 0x4d, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, - 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x4d, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x10, - 0x0a, 0x0c, 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x4d, 0x41, 0x58, 0x10, 0x03, - 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x41, 0x56, 0x47, - 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x51, - 0x55, 0x41, 0x4e, 0x54, 0x49, 0x4c, 0x45, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x47, 0x47, - 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x55, 0x4e, 0x49, 0x51, 0x55, 0x45, 0x10, 0x06, 0x12, 0x19, - 0x0a, 0x15, 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x55, 0x4e, 0x49, 0x51, 0x55, - 0x45, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x07, 0x2a, 0x26, 0x0a, 0x05, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x53, 0x43, - 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x41, 0x53, 0x43, 0x10, - 0x01, 0x2a, 0xe8, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x4f, 0x5f, 0x45, 0x52, 0x52, 0x4f, - 0x52, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x49, 0x4e, 0x47, 0x45, 0x53, 0x54, 0x4f, 0x52, 0x5f, - 0x51, 0x55, 0x45, 0x52, 0x59, 0x5f, 0x57, 0x41, 0x4e, 0x54, 0x53, 0x5f, 0x4f, 0x4c, 0x44, 0x5f, - 0x44, 0x41, 0x54, 0x41, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, - 0x4e, 0x59, 0x5f, 0x46, 0x52, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x48, 0x49, 0x54, - 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x46, - 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x53, 0x10, 0x04, 0x12, 0x19, 0x0a, - 0x15, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, - 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x53, 0x10, 0x05, 0x12, 0x1c, 0x0a, 0x18, 0x54, 0x4f, 0x4f, 0x5f, - 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x46, 0x52, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x4f, - 0x4b, 0x45, 0x4e, 0x53, 0x10, 0x06, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, - 0x4e, 0x59, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x53, 0x10, - 0x07, 0x12, 0x19, 0x0a, 0x15, 0x4d, 0x45, 0x4d, 0x4f, 0x52, 0x59, 0x5f, 0x4c, 0x49, 0x4d, 0x49, - 0x54, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x08, 0x2a, 0x8a, 0x01, 0x0a, - 0x11, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, - 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, - 0x73, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, 0x6f, 0x6e, 0x65, 0x10, 0x01, 0x12, 0x1d, - 0x0a, 0x19, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x10, 0x02, 0x12, 0x1a, 0x0a, - 0x16, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x03, 0x32, 0x9c, 0x05, 0x0a, 0x08, 0x53, 0x74, - 0x6f, 0x72, 0x65, 0x41, 0x70, 0x69, 0x12, 0x32, 0x0a, 0x04, 0x42, 0x75, 0x6c, 0x6b, 0x12, 0x10, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x75, 0x6c, 0x6b, 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, 0x00, 0x12, 0x33, 0x0a, 0x06, 0x53, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x12, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, - 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, - 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x51, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, - 0x72, 0x63, 0x68, 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, - 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x73, 0x79, - 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x63, 0x0a, 0x16, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x79, 0x6e, 0x63, - 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x22, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, - 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x79, 0x6e, - 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x11, 0x43, 0x61, 0x6e, 0x63, 0x65, - 0x6c, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, - 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, - 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, - 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x73, - 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, - 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x20, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, - 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x05, 0x46, 0x65, 0x74, 0x63, 0x68, 0x12, 0x11, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x22, - 0x00, 0x30, 0x01, 0x12, 0x33, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x7a, 0x6f, 0x6e, 0x74, 0x65, 0x63, 0x68, 0x2f, - 0x73, 0x65, 0x71, 0x2d, 0x64, 0x62, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, - 0x61, 0x70, 0x69, 0x3b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x69, 0x6e, 0x74, 0x22, 0x45, 0x0a, 0x0c, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6c, 0x69, 0x73, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4c, 0x69, 0x73, + 0x74, 0x22, 0xa9, 0x01, 0x0a, 0x0c, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x03, 0x69, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x12, 0x35, + 0x0a, 0x0e, 0x69, 0x64, 0x73, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x64, 0x57, + 0x69, 0x74, 0x68, 0x48, 0x69, 0x6e, 0x74, 0x52, 0x0c, 0x69, 0x64, 0x73, 0x57, 0x69, 0x74, 0x68, + 0x48, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x5f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, + 0x0c, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x0f, 0x0a, + 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4d, + 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x3b, 0x0a, 0x0b, 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x0a, 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xad, 0x02, + 0x0a, 0x15, 0x4f, 0x6e, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x12, 0x0a, + 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x66, 0x72, 0x6f, + 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x74, + 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x5f, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x77, 0x69, 0x74, + 0x68, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x20, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x66, 0x66, + 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x5f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, + 0x0c, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x7c, 0x0a, + 0x16, 0x4f, 0x6e, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2b, + 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x48, + 0x00, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x0e, 0x0a, 0x0c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x2f, 0x0a, 0x08, 0x44, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x69, 0x6e, 0x61, + 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x9e, 0x01, 0x0a, + 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x16, 0x0a, + 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x28, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, + 0x30, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x48, 0x00, 0x52, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x88, 0x01, + 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2a, 0xac, 0x01, + 0x0a, 0x07, 0x41, 0x67, 0x67, 0x46, 0x75, 0x6e, 0x63, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x47, 0x47, + 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x00, 0x12, 0x10, 0x0a, + 0x0c, 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x53, 0x55, 0x4d, 0x10, 0x01, 0x12, + 0x10, 0x0a, 0x0c, 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x4d, 0x49, 0x4e, 0x10, + 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x4d, 0x41, + 0x58, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, + 0x41, 0x56, 0x47, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, + 0x43, 0x5f, 0x51, 0x55, 0x41, 0x4e, 0x54, 0x49, 0x4c, 0x45, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f, + 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x55, 0x4e, 0x49, 0x51, 0x55, 0x45, 0x10, + 0x06, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x55, 0x4e, + 0x49, 0x51, 0x55, 0x45, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x07, 0x2a, 0x26, 0x0a, 0x05, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x44, + 0x45, 0x53, 0x43, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x41, + 0x53, 0x43, 0x10, 0x01, 0x2a, 0xe8, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x4f, 0x5f, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x49, 0x4e, 0x47, 0x45, 0x53, 0x54, + 0x4f, 0x52, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x5f, 0x57, 0x41, 0x4e, 0x54, 0x53, 0x5f, 0x4f, + 0x4c, 0x44, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x4f, 0x4f, + 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x46, 0x52, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, + 0x48, 0x49, 0x54, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, 0x4e, + 0x59, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x53, 0x10, 0x04, + 0x12, 0x19, 0x0a, 0x15, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x47, 0x52, 0x4f, + 0x55, 0x50, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x53, 0x10, 0x05, 0x12, 0x1c, 0x0a, 0x18, 0x54, + 0x4f, 0x4f, 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x46, 0x52, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x53, 0x10, 0x06, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x4f, 0x4f, + 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x56, 0x41, 0x4c, 0x55, + 0x45, 0x53, 0x10, 0x07, 0x12, 0x19, 0x0a, 0x15, 0x4d, 0x45, 0x4d, 0x4f, 0x52, 0x59, 0x5f, 0x4c, + 0x49, 0x4d, 0x49, 0x54, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x08, 0x2a, + 0x8a, 0x01, 0x0a, 0x11, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, + 0x72, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, 0x6f, 0x6e, 0x65, 0x10, + 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x10, 0x02, + 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x03, 0x32, 0xeb, 0x05, 0x0a, + 0x08, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x41, 0x70, 0x69, 0x12, 0x32, 0x0a, 0x04, 0x42, 0x75, 0x6c, + 0x6b, 0x12, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x75, 0x6c, 0x6b, 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, 0x00, 0x12, 0x33, 0x0a, + 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x51, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x63, 0x0a, 0x16, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, + 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x73, 0x79, 0x6e, 0x63, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, + 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x11, 0x43, 0x61, + 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, + 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x73, 0x79, 0x6e, + 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x73, 0x79, 0x6e, 0x63, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x54, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x73, 0x79, + 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x20, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x05, 0x46, 0x65, 0x74, 0x63, 0x68, 0x12, 0x11, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x44, 0x61, + 0x74, 0x61, 0x22, 0x00, 0x30, 0x01, 0x12, 0x33, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0e, 0x4f, + 0x6e, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x1a, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x6e, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x4f, 0x6e, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x7a, 0x6f, 0x6e, 0x74, 0x65, 0x63, + 0x68, 0x2f, 0x73, 0x65, 0x71, 0x2d, 0x64, 0x62, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x61, 0x70, 0x69, 0x3b, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x61, 0x70, 0x69, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, }) var ( @@ -2542,7 +2896,7 @@ func file_storeapi_store_api_proto_rawDescGZIP() []byte { } var file_storeapi_store_api_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_storeapi_store_api_proto_msgTypes = make([]protoimpl.MessageInfo, 30) +var file_storeapi_store_api_proto_msgTypes = make([]protoimpl.MessageInfo, 34) var file_storeapi_store_api_proto_goTypes = []any{ (AggFunc)(0), // 0: api.AggFunc (Order)(0), // 1: api.Order @@ -2566,88 +2920,101 @@ var file_storeapi_store_api_proto_goTypes = []any{ (*GetAsyncSearchesListResponse)(nil), // 19: api.GetAsyncSearchesListResponse (*AsyncSearchesListItem)(nil), // 20: api.AsyncSearchesListItem (*IdWithHint)(nil), // 21: api.IdWithHint - (*FetchRequest)(nil), // 22: api.FetchRequest - (*StatusRequest)(nil), // 23: api.StatusRequest - (*StatusResponse)(nil), // 24: api.StatusResponse - (*SearchResponse_Id)(nil), // 25: api.SearchResponse.Id - (*SearchResponse_IdWithHint)(nil), // 26: api.SearchResponse.IdWithHint - (*SearchResponse_Histogram)(nil), // 27: api.SearchResponse.Histogram - (*SearchResponse_Bin)(nil), // 28: api.SearchResponse.Bin - (*SearchResponse_Agg)(nil), // 29: api.SearchResponse.Agg - nil, // 30: api.SearchResponse.HistogramEntry - nil, // 31: api.SearchResponse.Agg.AggEntry - nil, // 32: api.SearchResponse.Agg.AggHistogramEntry - (*FetchRequest_FieldsFilter)(nil), // 33: api.FetchRequest.FieldsFilter - (*durationpb.Duration)(nil), // 34: google.protobuf.Duration - (*timestamppb.Timestamp)(nil), // 35: google.protobuf.Timestamp - (*emptypb.Empty)(nil), // 36: google.protobuf.Empty + (*FieldsFilter)(nil), // 22: api.FieldsFilter + (*FetchRequest)(nil), // 23: api.FetchRequest + (*StatusRequest)(nil), // 24: api.StatusRequest + (*StatusResponse)(nil), // 25: api.StatusResponse + (*OnePhaseSearchRequest)(nil), // 26: api.OnePhaseSearchRequest + (*OnePhaseSearchResponse)(nil), // 27: api.OnePhaseSearchResponse + (*Document)(nil), // 28: api.Document + (*Header)(nil), // 29: api.Header + (*SearchResponse_Id)(nil), // 30: api.SearchResponse.Id + (*SearchResponse_IdWithHint)(nil), // 31: api.SearchResponse.IdWithHint + (*SearchResponse_Histogram)(nil), // 32: api.SearchResponse.Histogram + (*SearchResponse_Bin)(nil), // 33: api.SearchResponse.Bin + (*SearchResponse_Agg)(nil), // 34: api.SearchResponse.Agg + nil, // 35: api.SearchResponse.HistogramEntry + nil, // 36: api.SearchResponse.Agg.AggEntry + nil, // 37: api.SearchResponse.Agg.AggHistogramEntry + (*durationpb.Duration)(nil), // 38: google.protobuf.Duration + (*timestamppb.Timestamp)(nil), // 39: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 40: google.protobuf.Empty } var file_storeapi_store_api_proto_depIdxs = []int32{ 0, // 0: api.AggQuery.func:type_name -> api.AggFunc 6, // 1: api.SearchRequest.aggs:type_name -> api.AggQuery 1, // 2: api.SearchRequest.order:type_name -> api.Order - 26, // 3: api.SearchResponse.id_sources:type_name -> api.SearchResponse.IdWithHint - 30, // 4: api.SearchResponse.histogram:type_name -> api.SearchResponse.HistogramEntry - 29, // 5: api.SearchResponse.aggs:type_name -> api.SearchResponse.Agg + 31, // 3: api.SearchResponse.id_sources:type_name -> api.SearchResponse.IdWithHint + 35, // 4: api.SearchResponse.histogram:type_name -> api.SearchResponse.HistogramEntry + 34, // 5: api.SearchResponse.aggs:type_name -> api.SearchResponse.Agg 2, // 6: api.SearchResponse.code:type_name -> api.SearchErrorCode 9, // 7: api.SearchResponse.explain:type_name -> api.ExplainEntry - 34, // 8: api.ExplainEntry.duration:type_name -> google.protobuf.Duration + 38, // 8: api.ExplainEntry.duration:type_name -> google.protobuf.Duration 9, // 9: api.ExplainEntry.children:type_name -> api.ExplainEntry - 34, // 10: api.StartAsyncSearchRequest.retention:type_name -> google.protobuf.Duration + 38, // 10: api.StartAsyncSearchRequest.retention:type_name -> google.protobuf.Duration 6, // 11: api.StartAsyncSearchRequest.aggs:type_name -> api.AggQuery 1, // 12: api.FetchAsyncSearchResultRequest.order:type_name -> api.Order 3, // 13: api.FetchAsyncSearchResultResponse.status:type_name -> api.AsyncSearchStatus 8, // 14: api.FetchAsyncSearchResultResponse.response:type_name -> api.SearchResponse - 35, // 15: api.FetchAsyncSearchResultResponse.started_at:type_name -> google.protobuf.Timestamp - 35, // 16: api.FetchAsyncSearchResultResponse.expires_at:type_name -> google.protobuf.Timestamp - 35, // 17: api.FetchAsyncSearchResultResponse.canceled_at:type_name -> google.protobuf.Timestamp + 39, // 15: api.FetchAsyncSearchResultResponse.started_at:type_name -> google.protobuf.Timestamp + 39, // 16: api.FetchAsyncSearchResultResponse.expires_at:type_name -> google.protobuf.Timestamp + 39, // 17: api.FetchAsyncSearchResultResponse.canceled_at:type_name -> google.protobuf.Timestamp 6, // 18: api.FetchAsyncSearchResultResponse.aggs:type_name -> api.AggQuery - 35, // 19: api.FetchAsyncSearchResultResponse.from:type_name -> google.protobuf.Timestamp - 35, // 20: api.FetchAsyncSearchResultResponse.to:type_name -> google.protobuf.Timestamp - 34, // 21: api.FetchAsyncSearchResultResponse.retention:type_name -> google.protobuf.Duration + 39, // 19: api.FetchAsyncSearchResultResponse.from:type_name -> google.protobuf.Timestamp + 39, // 20: api.FetchAsyncSearchResultResponse.to:type_name -> google.protobuf.Timestamp + 38, // 21: api.FetchAsyncSearchResultResponse.retention:type_name -> google.protobuf.Duration 3, // 22: api.GetAsyncSearchesListRequest.status:type_name -> api.AsyncSearchStatus 20, // 23: api.GetAsyncSearchesListResponse.searches:type_name -> api.AsyncSearchesListItem 3, // 24: api.AsyncSearchesListItem.status:type_name -> api.AsyncSearchStatus - 35, // 25: api.AsyncSearchesListItem.started_at:type_name -> google.protobuf.Timestamp - 35, // 26: api.AsyncSearchesListItem.expires_at:type_name -> google.protobuf.Timestamp - 35, // 27: api.AsyncSearchesListItem.canceled_at:type_name -> google.protobuf.Timestamp + 39, // 25: api.AsyncSearchesListItem.started_at:type_name -> google.protobuf.Timestamp + 39, // 26: api.AsyncSearchesListItem.expires_at:type_name -> google.protobuf.Timestamp + 39, // 27: api.AsyncSearchesListItem.canceled_at:type_name -> google.protobuf.Timestamp 6, // 28: api.AsyncSearchesListItem.aggs:type_name -> api.AggQuery - 35, // 29: api.AsyncSearchesListItem.from:type_name -> google.protobuf.Timestamp - 35, // 30: api.AsyncSearchesListItem.to:type_name -> google.protobuf.Timestamp - 34, // 31: api.AsyncSearchesListItem.retention:type_name -> google.protobuf.Duration + 39, // 29: api.AsyncSearchesListItem.from:type_name -> google.protobuf.Timestamp + 39, // 30: api.AsyncSearchesListItem.to:type_name -> google.protobuf.Timestamp + 38, // 31: api.AsyncSearchesListItem.retention:type_name -> google.protobuf.Duration 21, // 32: api.FetchRequest.ids_with_hints:type_name -> api.IdWithHint - 33, // 33: api.FetchRequest.fields_filter:type_name -> api.FetchRequest.FieldsFilter - 35, // 34: api.StatusResponse.oldest_time:type_name -> google.protobuf.Timestamp - 25, // 35: api.SearchResponse.IdWithHint.id:type_name -> api.SearchResponse.Id - 35, // 36: api.SearchResponse.Bin.ts:type_name -> google.protobuf.Timestamp - 27, // 37: api.SearchResponse.Bin.hist:type_name -> api.SearchResponse.Histogram - 31, // 38: api.SearchResponse.Agg.agg:type_name -> api.SearchResponse.Agg.AggEntry - 32, // 39: api.SearchResponse.Agg.agg_histogram:type_name -> api.SearchResponse.Agg.AggHistogramEntry - 28, // 40: api.SearchResponse.Agg.timeseries:type_name -> api.SearchResponse.Bin - 27, // 41: api.SearchResponse.Agg.AggHistogramEntry.value:type_name -> api.SearchResponse.Histogram - 4, // 42: api.StoreApi.Bulk:input_type -> api.BulkRequest - 7, // 43: api.StoreApi.Search:input_type -> api.SearchRequest - 10, // 44: api.StoreApi.StartAsyncSearch:input_type -> api.StartAsyncSearchRequest - 12, // 45: api.StoreApi.FetchAsyncSearchResult:input_type -> api.FetchAsyncSearchResultRequest - 14, // 46: api.StoreApi.CancelAsyncSearch:input_type -> api.CancelAsyncSearchRequest - 16, // 47: api.StoreApi.DeleteAsyncSearch:input_type -> api.DeleteAsyncSearchRequest - 18, // 48: api.StoreApi.GetAsyncSearchesList:input_type -> api.GetAsyncSearchesListRequest - 22, // 49: api.StoreApi.Fetch:input_type -> api.FetchRequest - 23, // 50: api.StoreApi.Status:input_type -> api.StatusRequest - 36, // 51: api.StoreApi.Bulk:output_type -> google.protobuf.Empty - 8, // 52: api.StoreApi.Search:output_type -> api.SearchResponse - 11, // 53: api.StoreApi.StartAsyncSearch:output_type -> api.StartAsyncSearchResponse - 13, // 54: api.StoreApi.FetchAsyncSearchResult:output_type -> api.FetchAsyncSearchResultResponse - 15, // 55: api.StoreApi.CancelAsyncSearch:output_type -> api.CancelAsyncSearchResponse - 17, // 56: api.StoreApi.DeleteAsyncSearch:output_type -> api.DeleteAsyncSearchResponse - 19, // 57: api.StoreApi.GetAsyncSearchesList:output_type -> api.GetAsyncSearchesListResponse - 5, // 58: api.StoreApi.Fetch:output_type -> api.BinaryData - 24, // 59: api.StoreApi.Status:output_type -> api.StatusResponse - 51, // [51:60] is the sub-list for method output_type - 42, // [42:51] is the sub-list for method input_type - 42, // [42:42] is the sub-list for extension type_name - 42, // [42:42] is the sub-list for extension extendee - 0, // [0:42] is the sub-list for field type_name + 22, // 33: api.FetchRequest.fields_filter:type_name -> api.FieldsFilter + 39, // 34: api.StatusResponse.oldest_time:type_name -> google.protobuf.Timestamp + 1, // 35: api.OnePhaseSearchRequest.order:type_name -> api.Order + 22, // 36: api.OnePhaseSearchRequest.fields_filter:type_name -> api.FieldsFilter + 29, // 37: api.OnePhaseSearchResponse.header:type_name -> api.Header + 28, // 38: api.OnePhaseSearchResponse.document:type_name -> api.Document + 5, // 39: api.Document.data:type_name -> api.BinaryData + 2, // 40: api.Header.code:type_name -> api.SearchErrorCode + 9, // 41: api.Header.explain:type_name -> api.ExplainEntry + 30, // 42: api.SearchResponse.IdWithHint.id:type_name -> api.SearchResponse.Id + 39, // 43: api.SearchResponse.Bin.ts:type_name -> google.protobuf.Timestamp + 32, // 44: api.SearchResponse.Bin.hist:type_name -> api.SearchResponse.Histogram + 36, // 45: api.SearchResponse.Agg.agg:type_name -> api.SearchResponse.Agg.AggEntry + 37, // 46: api.SearchResponse.Agg.agg_histogram:type_name -> api.SearchResponse.Agg.AggHistogramEntry + 33, // 47: api.SearchResponse.Agg.timeseries:type_name -> api.SearchResponse.Bin + 32, // 48: api.SearchResponse.Agg.AggHistogramEntry.value:type_name -> api.SearchResponse.Histogram + 4, // 49: api.StoreApi.Bulk:input_type -> api.BulkRequest + 7, // 50: api.StoreApi.Search:input_type -> api.SearchRequest + 10, // 51: api.StoreApi.StartAsyncSearch:input_type -> api.StartAsyncSearchRequest + 12, // 52: api.StoreApi.FetchAsyncSearchResult:input_type -> api.FetchAsyncSearchResultRequest + 14, // 53: api.StoreApi.CancelAsyncSearch:input_type -> api.CancelAsyncSearchRequest + 16, // 54: api.StoreApi.DeleteAsyncSearch:input_type -> api.DeleteAsyncSearchRequest + 18, // 55: api.StoreApi.GetAsyncSearchesList:input_type -> api.GetAsyncSearchesListRequest + 23, // 56: api.StoreApi.Fetch:input_type -> api.FetchRequest + 24, // 57: api.StoreApi.Status:input_type -> api.StatusRequest + 26, // 58: api.StoreApi.OnePhaseSearch:input_type -> api.OnePhaseSearchRequest + 40, // 59: api.StoreApi.Bulk:output_type -> google.protobuf.Empty + 8, // 60: api.StoreApi.Search:output_type -> api.SearchResponse + 11, // 61: api.StoreApi.StartAsyncSearch:output_type -> api.StartAsyncSearchResponse + 13, // 62: api.StoreApi.FetchAsyncSearchResult:output_type -> api.FetchAsyncSearchResultResponse + 15, // 63: api.StoreApi.CancelAsyncSearch:output_type -> api.CancelAsyncSearchResponse + 17, // 64: api.StoreApi.DeleteAsyncSearch:output_type -> api.DeleteAsyncSearchResponse + 19, // 65: api.StoreApi.GetAsyncSearchesList:output_type -> api.GetAsyncSearchesListResponse + 5, // 66: api.StoreApi.Fetch:output_type -> api.BinaryData + 25, // 67: api.StoreApi.Status:output_type -> api.StatusResponse + 27, // 68: api.StoreApi.OnePhaseSearch:output_type -> api.OnePhaseSearchResponse + 59, // [59:69] is the sub-list for method output_type + 49, // [49:59] is the sub-list for method input_type + 49, // [49:49] is the sub-list for extension type_name + 49, // [49:49] is the sub-list for extension extendee + 0, // [0:49] is the sub-list for field type_name } func init() { file_storeapi_store_api_proto_init() } @@ -2659,13 +3026,18 @@ func file_storeapi_store_api_proto_init() { file_storeapi_store_api_proto_msgTypes[9].OneofWrappers = []any{} file_storeapi_store_api_proto_msgTypes[14].OneofWrappers = []any{} file_storeapi_store_api_proto_msgTypes[16].OneofWrappers = []any{} + file_storeapi_store_api_proto_msgTypes[23].OneofWrappers = []any{ + (*OnePhaseSearchResponse_Header)(nil), + (*OnePhaseSearchResponse_Document)(nil), + } + file_storeapi_store_api_proto_msgTypes[25].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_storeapi_store_api_proto_rawDesc), len(file_storeapi_store_api_proto_rawDesc)), NumEnums: 4, - NumMessages: 30, + NumMessages: 34, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/storeapi/store_api.pb.gw.go b/pkg/storeapi/store_api.pb.gw.go index 385ec993..6d28a8d6 100644 --- a/pkg/storeapi/store_api.pb.gw.go +++ b/pkg/storeapi/store_api.pb.gw.go @@ -247,6 +247,26 @@ func local_request_StoreApi_Status_0(ctx context.Context, marshaler runtime.Mars return msg, metadata, err } +func request_StoreApi_OnePhaseSearch_0(ctx context.Context, marshaler runtime.Marshaler, client StoreApiClient, req *http.Request, pathParams map[string]string) (StoreApi_OnePhaseSearchClient, runtime.ServerMetadata, error) { + var ( + protoReq OnePhaseSearchRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + stream, err := client.OnePhaseSearch(ctx, &protoReq) + if err != nil { + return nil, metadata, err + } + header, err := stream.Header() + if err != nil { + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil +} + // RegisterStoreApiHandlerServer registers the http handlers for service StoreApi to "mux". // UnaryRPC :call StoreApiServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -421,6 +441,13 @@ func RegisterStoreApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, s forward_StoreApi_Status_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) + mux.Handle(http.MethodPost, pattern_StoreApi_OnePhaseSearch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") + _, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + }) + return nil } @@ -613,6 +640,23 @@ func RegisterStoreApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, c } forward_StoreApi_Status_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) + mux.Handle(http.MethodPost, pattern_StoreApi_OnePhaseSearch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/api.StoreApi/OnePhaseSearch", runtime.WithHTTPPathPattern("/api.StoreApi/OnePhaseSearch")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_StoreApi_OnePhaseSearch_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_StoreApi_OnePhaseSearch_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + }) return nil } @@ -626,6 +670,7 @@ var ( pattern_StoreApi_GetAsyncSearchesList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"api.StoreApi", "GetAsyncSearchesList"}, "")) pattern_StoreApi_Fetch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"api.StoreApi", "Fetch"}, "")) pattern_StoreApi_Status_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"api.StoreApi", "Status"}, "")) + pattern_StoreApi_OnePhaseSearch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"api.StoreApi", "OnePhaseSearch"}, "")) ) var ( @@ -638,4 +683,5 @@ var ( forward_StoreApi_GetAsyncSearchesList_0 = runtime.ForwardResponseMessage forward_StoreApi_Fetch_0 = runtime.ForwardResponseStream forward_StoreApi_Status_0 = runtime.ForwardResponseMessage + forward_StoreApi_OnePhaseSearch_0 = runtime.ForwardResponseStream ) diff --git a/pkg/storeapi/store_api_vtproto.pb.go b/pkg/storeapi/store_api_vtproto.pb.go index 199f99c9..7c3ffdf3 100644 --- a/pkg/storeapi/store_api_vtproto.pb.go +++ b/pkg/storeapi/store_api_vtproto.pb.go @@ -619,11 +619,11 @@ func (m *IdWithHint) CloneMessageVT() proto.Message { return m.CloneVT() } -func (m *FetchRequest_FieldsFilter) CloneVT() *FetchRequest_FieldsFilter { +func (m *FieldsFilter) CloneVT() *FieldsFilter { if m == nil { - return (*FetchRequest_FieldsFilter)(nil) + return (*FieldsFilter)(nil) } - r := new(FetchRequest_FieldsFilter) + r := new(FieldsFilter) r.AllowList = m.AllowList if rhs := m.Fields; rhs != nil { tmpContainer := make([]string, len(rhs)) @@ -637,7 +637,7 @@ func (m *FetchRequest_FieldsFilter) CloneVT() *FetchRequest_FieldsFilter { return r } -func (m *FetchRequest_FieldsFilter) CloneMessageVT() proto.Message { +func (m *FieldsFilter) CloneMessageVT() proto.Message { return m.CloneVT() } @@ -704,6 +704,112 @@ func (m *StatusResponse) CloneMessageVT() proto.Message { return m.CloneVT() } +func (m *OnePhaseSearchRequest) CloneVT() *OnePhaseSearchRequest { + if m == nil { + return (*OnePhaseSearchRequest)(nil) + } + r := new(OnePhaseSearchRequest) + r.Query = m.Query + r.From = m.From + r.To = m.To + r.Size = m.Size + r.Offset = m.Offset + r.Explain = m.Explain + r.WithTotal = m.WithTotal + r.Order = m.Order + r.OffsetId = m.OffsetId + r.FieldsFilter = m.FieldsFilter.CloneVT() + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *OnePhaseSearchRequest) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *OnePhaseSearchResponse) CloneVT() *OnePhaseSearchResponse { + if m == nil { + return (*OnePhaseSearchResponse)(nil) + } + r := new(OnePhaseSearchResponse) + if m.ResponseType != nil { + r.ResponseType = m.ResponseType.(interface { + CloneVT() isOnePhaseSearchResponse_ResponseType + }).CloneVT() + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *OnePhaseSearchResponse) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *OnePhaseSearchResponse_Header) CloneVT() isOnePhaseSearchResponse_ResponseType { + if m == nil { + return (*OnePhaseSearchResponse_Header)(nil) + } + r := new(OnePhaseSearchResponse_Header) + r.Header = m.Header.CloneVT() + return r +} + +func (m *OnePhaseSearchResponse_Document) CloneVT() isOnePhaseSearchResponse_ResponseType { + if m == nil { + return (*OnePhaseSearchResponse_Document)(nil) + } + r := new(OnePhaseSearchResponse_Document) + r.Document = m.Document.CloneVT() + return r +} + +func (m *Document) CloneVT() *Document { + if m == nil { + return (*Document)(nil) + } + r := new(Document) + r.Data = m.Data.CloneVT() + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Document) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Header) CloneVT() *Header { + if m == nil { + return (*Header)(nil) + } + r := new(Header) + r.Total = m.Total + r.Code = m.Code + r.Explain = m.Explain.CloneVT() + if rhs := m.Errors; rhs != nil { + tmpContainer := make([]string, len(rhs)) + copy(tmpContainer, rhs) + r.Errors = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Header) CloneMessageVT() proto.Message { + return m.CloneVT() +} + func (this *BulkRequest) EqualVT(that *BulkRequest) bool { if this == that { return true @@ -1584,7 +1690,7 @@ func (this *IdWithHint) EqualMessageVT(thatMsg proto.Message) bool { } return this.EqualVT(that) } -func (this *FetchRequest_FieldsFilter) EqualVT(that *FetchRequest_FieldsFilter) bool { +func (this *FieldsFilter) EqualVT(that *FieldsFilter) bool { if this == that { return true } else if this == nil || that == nil { @@ -1605,8 +1711,8 @@ func (this *FetchRequest_FieldsFilter) EqualVT(that *FetchRequest_FieldsFilter) return string(this.unknownFields) == string(that.unknownFields) } -func (this *FetchRequest_FieldsFilter) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*FetchRequest_FieldsFilter) +func (this *FieldsFilter) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*FieldsFilter) if !ok { return false } @@ -1695,6 +1801,183 @@ func (this *StatusResponse) EqualMessageVT(thatMsg proto.Message) bool { } return this.EqualVT(that) } +func (this *OnePhaseSearchRequest) EqualVT(that *OnePhaseSearchRequest) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Query != that.Query { + return false + } + if this.From != that.From { + return false + } + if this.To != that.To { + return false + } + if this.Size != that.Size { + return false + } + if this.Offset != that.Offset { + return false + } + if this.Explain != that.Explain { + return false + } + if this.WithTotal != that.WithTotal { + return false + } + if this.Order != that.Order { + return false + } + if this.OffsetId != that.OffsetId { + return false + } + if !this.FieldsFilter.EqualVT(that.FieldsFilter) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *OnePhaseSearchRequest) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*OnePhaseSearchRequest) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *OnePhaseSearchResponse) EqualVT(that *OnePhaseSearchResponse) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.ResponseType == nil && that.ResponseType != nil { + return false + } else if this.ResponseType != nil { + if that.ResponseType == nil { + return false + } + if !this.ResponseType.(interface { + EqualVT(isOnePhaseSearchResponse_ResponseType) bool + }).EqualVT(that.ResponseType) { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *OnePhaseSearchResponse) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*OnePhaseSearchResponse) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *OnePhaseSearchResponse_Header) EqualVT(thatIface isOnePhaseSearchResponse_ResponseType) bool { + that, ok := thatIface.(*OnePhaseSearchResponse_Header) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.Header, that.Header; p != q { + if p == nil { + p = &Header{} + } + if q == nil { + q = &Header{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *OnePhaseSearchResponse_Document) EqualVT(thatIface isOnePhaseSearchResponse_ResponseType) bool { + that, ok := thatIface.(*OnePhaseSearchResponse_Document) + if !ok { + return false + } + if this == that { + return true + } + if this == nil && that != nil || this != nil && that == nil { + return false + } + if p, q := this.Document, that.Document; p != q { + if p == nil { + p = &Document{} + } + if q == nil { + q = &Document{} + } + if !p.EqualVT(q) { + return false + } + } + return true +} + +func (this *Document) EqualVT(that *Document) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if !this.Data.EqualVT(that.Data) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Document) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Document) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Header) EqualVT(that *Header) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Total != that.Total { + return false + } + if len(this.Errors) != len(that.Errors) { + return false + } + for i, vx := range this.Errors { + vy := that.Errors[i] + if vx != vy { + return false + } + } + if this.Code != that.Code { + return false + } + if !this.Explain.EqualVT(that.Explain) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Header) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Header) + if !ok { + return false + } + return this.EqualVT(that) +} // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. @@ -1714,6 +1997,7 @@ type StoreApiClient interface { GetAsyncSearchesList(ctx context.Context, in *GetAsyncSearchesListRequest, opts ...grpc.CallOption) (*GetAsyncSearchesListResponse, error) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (StoreApi_FetchClient, error) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) + OnePhaseSearch(ctx context.Context, in *OnePhaseSearchRequest, opts ...grpc.CallOption) (StoreApi_OnePhaseSearchClient, error) } type storeApiClient struct { @@ -1828,6 +2112,38 @@ func (c *storeApiClient) Status(ctx context.Context, in *StatusRequest, opts ... return out, nil } +func (c *storeApiClient) OnePhaseSearch(ctx context.Context, in *OnePhaseSearchRequest, opts ...grpc.CallOption) (StoreApi_OnePhaseSearchClient, error) { + stream, err := c.cc.NewStream(ctx, &StoreApi_ServiceDesc.Streams[1], "/api.StoreApi/OnePhaseSearch", opts...) + if err != nil { + return nil, err + } + x := &storeApiOnePhaseSearchClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type StoreApi_OnePhaseSearchClient interface { + Recv() (*OnePhaseSearchResponse, error) + grpc.ClientStream +} + +type storeApiOnePhaseSearchClient struct { + grpc.ClientStream +} + +func (x *storeApiOnePhaseSearchClient) Recv() (*OnePhaseSearchResponse, error) { + m := new(OnePhaseSearchResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + // StoreApiServer is the server API for StoreApi service. // All implementations must embed UnimplementedStoreApiServer // for forward compatibility @@ -1841,6 +2157,7 @@ type StoreApiServer interface { GetAsyncSearchesList(context.Context, *GetAsyncSearchesListRequest) (*GetAsyncSearchesListResponse, error) Fetch(*FetchRequest, StoreApi_FetchServer) error Status(context.Context, *StatusRequest) (*StatusResponse, error) + OnePhaseSearch(*OnePhaseSearchRequest, StoreApi_OnePhaseSearchServer) error mustEmbedUnimplementedStoreApiServer() } @@ -1875,6 +2192,9 @@ func (UnimplementedStoreApiServer) Fetch(*FetchRequest, StoreApi_FetchServer) er func (UnimplementedStoreApiServer) Status(context.Context, *StatusRequest) (*StatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") } +func (UnimplementedStoreApiServer) OnePhaseSearch(*OnePhaseSearchRequest, StoreApi_OnePhaseSearchServer) error { + return status.Errorf(codes.Unimplemented, "method OnePhaseSearch not implemented") +} func (UnimplementedStoreApiServer) mustEmbedUnimplementedStoreApiServer() {} // UnsafeStoreApiServer may be embedded to opt out of forward compatibility for this service. @@ -2053,6 +2373,27 @@ func _StoreApi_Status_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } +func _StoreApi_OnePhaseSearch_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(OnePhaseSearchRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(StoreApiServer).OnePhaseSearch(m, &storeApiOnePhaseSearchServer{stream}) +} + +type StoreApi_OnePhaseSearchServer interface { + Send(*OnePhaseSearchResponse) error + grpc.ServerStream +} + +type storeApiOnePhaseSearchServer struct { + grpc.ServerStream +} + +func (x *storeApiOnePhaseSearchServer) Send(m *OnePhaseSearchResponse) error { + return x.ServerStream.SendMsg(m) +} + // StoreApi_ServiceDesc is the grpc.ServiceDesc for StoreApi service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -2099,8 +2440,13 @@ var StoreApi_ServiceDesc = grpc.ServiceDesc{ Handler: _StoreApi_Fetch_Handler, ServerStreams: true, }, - }, - Metadata: "storeapi/store_api.proto", + { + StreamName: "OnePhaseSearch", + Handler: _StoreApi_OnePhaseSearch_Handler, + ServerStreams: true, + }, + }, + Metadata: "storeapi/store_api.proto", } func (m *BulkRequest) MarshalVT() (dAtA []byte, err error) { @@ -3703,7 +4049,7 @@ func (m *IdWithHint) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *FetchRequest_FieldsFilter) MarshalVT() (dAtA []byte, err error) { +func (m *FieldsFilter) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -3716,12 +4062,12 @@ func (m *FetchRequest_FieldsFilter) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *FetchRequest_FieldsFilter) MarshalToVT(dAtA []byte) (int, error) { +func (m *FieldsFilter) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *FetchRequest_FieldsFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *FieldsFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3905,25 +4251,25 @@ func (m *StatusResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *BulkRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *OnePhaseSearchRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *BulkRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *OnePhaseSearchRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *BulkRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *OnePhaseSearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3935,47 +4281,97 @@ func (m *BulkRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Metas) > 0 { - i -= len(m.Metas) - copy(dAtA[i:], m.Metas) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Metas))) + if m.FieldsFilter != nil { + size, err := m.FieldsFilter.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x52 } - if len(m.Docs) > 0 { - i -= len(m.Docs) - copy(dAtA[i:], m.Docs) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Docs))) + if len(m.OffsetId) > 0 { + i -= len(m.OffsetId) + copy(dAtA[i:], m.OffsetId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OffsetId))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x4a } - if m.Count != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Count)) + if m.Order != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) i-- - dAtA[i] = 0x8 + dAtA[i] = 0x40 + } + if m.WithTotal { + i-- + if m.WithTotal { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } + if m.Explain { + i-- + if m.Explain { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.Offset != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) + i-- + dAtA[i] = 0x28 + } + if m.Size != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + i-- + dAtA[i] = 0x20 + } + if m.To != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.To)) + i-- + dAtA[i] = 0x18 + } + if m.From != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.From)) + i-- + dAtA[i] = 0x10 + } + if len(m.Query) > 0 { + i -= len(m.Query) + copy(dAtA[i:], m.Query) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Query))) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *BinaryData) MarshalVTStrict() (dAtA []byte, err error) { +func (m *OnePhaseSearchResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *BinaryData) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *OnePhaseSearchResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *BinaryData) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *OnePhaseSearchResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -3987,35 +4383,83 @@ func (m *BinaryData) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data))) + if vtmsg, ok := m.ResponseType.(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + } + return len(dAtA) - i, nil +} + +func (m *OnePhaseSearchResponse_Header) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *OnePhaseSearchResponse_Header) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Header != nil { + size, err := m.Header.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } +func (m *OnePhaseSearchResponse_Document) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} -func (m *AggQuery) MarshalVTStrict() (dAtA []byte, err error) { +func (m *OnePhaseSearchResponse_Document) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Document != nil { + size, err := m.Document.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *Document) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *AggQuery) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *Document) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *AggQuery) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Document) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4027,44 +4471,82 @@ func (m *AggQuery) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Interval != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Interval)) + if m.Data != nil { + size, err := m.Data.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x30 + dAtA[i] = 0xa } - if len(m.Quantiles) > 0 { - for iNdEx := len(m.Quantiles) - 1; iNdEx >= 0; iNdEx-- { - f1 := math.Float64bits(float64(m.Quantiles[iNdEx])) - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) + return len(dAtA) - i, nil +} + +func (m *Header) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Header) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Header) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Explain != nil { + size, err := m.Explain.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Quantiles)*8)) + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } - if m.Func != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Func)) + if m.Code != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Code)) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x18 } - if len(m.GroupBy) > 0 { - i -= len(m.GroupBy) - copy(dAtA[i:], m.GroupBy) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.GroupBy))) - i-- - dAtA[i] = 0x1a + if len(m.Errors) > 0 { + for iNdEx := len(m.Errors) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Errors[iNdEx]) + copy(dAtA[i:], m.Errors[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Errors[iNdEx]))) + i-- + dAtA[i] = 0x12 + } } - if len(m.Field) > 0 { - i -= len(m.Field) - copy(dAtA[i:], m.Field) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Field))) + if m.Total != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *SearchRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *BulkRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4077,12 +4559,12 @@ func (m *SearchRequest) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *BulkRequest) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *SearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *BulkRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4094,29 +4576,188 @@ func (m *SearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.OffsetId) > 0 { - i -= len(m.OffsetId) - copy(dAtA[i:], m.OffsetId) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OffsetId))) + if len(m.Metas) > 0 { + i -= len(m.Metas) + copy(dAtA[i:], m.Metas) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Metas))) i-- - dAtA[i] = 0x72 + dAtA[i] = 0x1a } - if m.Order != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) + if len(m.Docs) > 0 { + i -= len(m.Docs) + copy(dAtA[i:], m.Docs) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Docs))) i-- - dAtA[i] = 0x68 + dAtA[i] = 0x12 } - if len(m.Aggs) > 0 { - for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Aggs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x62 - } + if m.Count != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Count)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *BinaryData) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BinaryData) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *BinaryData) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AggQuery) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AggQuery) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *AggQuery) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Interval != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Interval)) + i-- + dAtA[i] = 0x30 + } + if len(m.Quantiles) > 0 { + for iNdEx := len(m.Quantiles) - 1; iNdEx >= 0; iNdEx-- { + f1 := math.Float64bits(float64(m.Quantiles[iNdEx])) + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) + } + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Quantiles)*8)) + i-- + dAtA[i] = 0x2a + } + if m.Func != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Func)) + i-- + dAtA[i] = 0x20 + } + if len(m.GroupBy) > 0 { + i -= len(m.GroupBy) + copy(dAtA[i:], m.GroupBy) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.GroupBy))) + i-- + dAtA[i] = 0x1a + } + if len(m.Field) > 0 { + i -= len(m.Field) + copy(dAtA[i:], m.Field) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Field))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SearchRequest) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *SearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.OffsetId) > 0 { + i -= len(m.OffsetId) + copy(dAtA[i:], m.OffsetId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OffsetId))) + i-- + dAtA[i] = 0x72 + } + if m.Order != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) + i-- + dAtA[i] = 0x68 + } + if len(m.Aggs) > 0 { + for iNdEx := len(m.Aggs) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Aggs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x62 + } } if len(m.AggregationFilter) > 0 { i -= len(m.AggregationFilter) @@ -5505,7 +6146,7 @@ func (m *IdWithHint) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *FetchRequest_FieldsFilter) MarshalVTStrict() (dAtA []byte, err error) { +func (m *FieldsFilter) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -5518,12 +6159,12 @@ func (m *FetchRequest_FieldsFilter) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *FetchRequest_FieldsFilter) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *FieldsFilter) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *FetchRequest_FieldsFilter) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *FieldsFilter) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -5707,151 +6348,334 @@ func (m *StatusResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *BulkRequest) SizeVT() (n int) { +func (m *OnePhaseSearchRequest) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - if m.Count != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Count)) - } - l = len(m.Docs) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + return nil, nil } - l = len(m.Metas) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *BinaryData) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Data) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n +func (m *OnePhaseSearchRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *AggQuery) SizeVT() (n int) { +func (m *OnePhaseSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Field) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - l = len(m.GroupBy) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.FieldsFilter != nil { + size, err := m.FieldsFilter.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x52 } - if m.Func != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Func)) + if len(m.OffsetId) > 0 { + i -= len(m.OffsetId) + copy(dAtA[i:], m.OffsetId) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OffsetId))) + i-- + dAtA[i] = 0x4a } - if len(m.Quantiles) > 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(len(m.Quantiles)*8)) + len(m.Quantiles)*8 + if m.Order != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Order)) + i-- + dAtA[i] = 0x40 } - if m.Interval != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Interval)) + if m.WithTotal { + i-- + if m.WithTotal { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 } - n += len(m.unknownFields) - return n -} - -func (m *SearchRequest) SizeVT() (n int) { + if m.Explain { + i-- + if m.Explain { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.Offset != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Offset)) + i-- + dAtA[i] = 0x28 + } + if m.Size != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Size)) + i-- + dAtA[i] = 0x20 + } + if m.To != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.To)) + i-- + dAtA[i] = 0x18 + } + if m.From != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.From)) + i-- + dAtA[i] = 0x10 + } + if len(m.Query) > 0 { + i -= len(m.Query) + copy(dAtA[i:], m.Query) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Query))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *OnePhaseSearchResponse) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *OnePhaseSearchResponse) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *OnePhaseSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Query) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.From != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.From)) + if msg, ok := m.ResponseType.(*OnePhaseSearchResponse_Document); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size } - if m.To != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.To)) + if msg, ok := m.ResponseType.(*OnePhaseSearchResponse_Header); ok { + size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size } - if m.Size != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) + return len(dAtA) - i, nil +} + +func (m *OnePhaseSearchResponse_Header) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *OnePhaseSearchResponse_Header) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Header != nil { + size, err := m.Header.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0xa } - if m.Offset != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Offset)) + return len(dAtA) - i, nil +} +func (m *OnePhaseSearchResponse_Document) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *OnePhaseSearchResponse_Document) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Document != nil { + size, err := m.Document.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } else { + i = protohelpers.EncodeVarint(dAtA, i, 0) + i-- + dAtA[i] = 0x12 } - if m.Interval != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Interval)) + return len(dAtA) - i, nil +} +func (m *Document) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - l = len(m.Aggregation) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - if m.Explain { - n += 2 + return dAtA[:n], nil +} + +func (m *Document) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Document) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } - if m.WithTotal { - n += 2 + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - l = len(m.AggregationFilter) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.Data != nil { + size, err := m.Data.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } - if len(m.Aggs) > 0 { - for _, e := range m.Aggs { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + return len(dAtA) - i, nil +} + +func (m *Header) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Header) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Header) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Explain != nil { + size, err := m.Explain.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 } - if m.Order != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Order)) + if m.Code != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x18 } - l = len(m.OffsetId) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if len(m.Errors) > 0 { + for iNdEx := len(m.Errors) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Errors[iNdEx]) + copy(dAtA[i:], m.Errors[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Errors[iNdEx]))) + i-- + dAtA[i] = 0x12 + } } - n += len(m.unknownFields) - return n + if m.Total != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } -func (m *SearchResponse_Id) SizeVT() (n int) { +func (m *BulkRequest) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l - if m.Mid != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Mid)) + if m.Count != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Count)) } - if m.Rid != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Rid)) + l = len(m.Docs) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Metas) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n } -func (m *SearchResponse_IdWithHint) SizeVT() (n int) { +func (m *BinaryData) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l - if m.Id != nil { - l = m.Id.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Hint) + l = len(m.Data) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } @@ -5859,14 +6683,131 @@ func (m *SearchResponse_IdWithHint) SizeVT() (n int) { return n } -func (m *SearchResponse_Histogram) SizeVT() (n int) { +func (m *AggQuery) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l - if m.Min != 0 { - n += 9 + l = len(m.Field) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.GroupBy) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Func != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Func)) + } + if len(m.Quantiles) > 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(len(m.Quantiles)*8)) + len(m.Quantiles)*8 + } + if m.Interval != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Interval)) + } + n += len(m.unknownFields) + return n +} + +func (m *SearchRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Query) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.From != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.From)) + } + if m.To != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.To)) + } + if m.Size != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) + } + if m.Offset != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Offset)) + } + if m.Interval != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Interval)) + } + l = len(m.Aggregation) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Explain { + n += 2 + } + if m.WithTotal { + n += 2 + } + l = len(m.AggregationFilter) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if len(m.Aggs) > 0 { + for _, e := range m.Aggs { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.Order != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Order)) + } + l = len(m.OffsetId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SearchResponse_Id) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Mid != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Mid)) + } + if m.Rid != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Rid)) + } + n += len(m.unknownFields) + return n +} + +func (m *SearchResponse_IdWithHint) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != nil { + l = m.Id.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Hint) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *SearchResponse_Histogram) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Min != 0 { + n += 9 } if m.Max != 0 { n += 9 @@ -6355,7 +7296,7 @@ func (m *IdWithHint) SizeVT() (n int) { return n } -func (m *FetchRequest_FieldsFilter) SizeVT() (n int) { +func (m *FieldsFilter) SizeVT() (n int) { if m == nil { return 0 } @@ -6427,6 +7368,130 @@ func (m *StatusResponse) SizeVT() (n int) { return n } +func (m *OnePhaseSearchRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Query) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.From != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.From)) + } + if m.To != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.To)) + } + if m.Size != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) + } + if m.Offset != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Offset)) + } + if m.Explain { + n += 2 + } + if m.WithTotal { + n += 2 + } + if m.Order != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Order)) + } + l = len(m.OffsetId) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.FieldsFilter != nil { + l = m.FieldsFilter.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *OnePhaseSearchResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if vtmsg, ok := m.ResponseType.(interface{ SizeVT() int }); ok { + n += vtmsg.SizeVT() + } + n += len(m.unknownFields) + return n +} + +func (m *OnePhaseSearchResponse_Header) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Header != nil { + l = m.Header.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 3 + } + return n +} +func (m *OnePhaseSearchResponse_Document) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Document != nil { + l = m.Document.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } else { + n += 3 + } + return n +} +func (m *Document) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Data != nil { + l = m.Data.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *Header) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Total != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Total)) + } + if len(m.Errors) > 0 { + for _, s := range m.Errors { + l = len(s) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + if m.Code != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Code)) + } + if m.Explain != nil { + l = m.Explain.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + func (m *BulkRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -7491,14 +8556,649 @@ func (m *SearchResponse_Histogram) UnmarshalVT(dAtA []byte) error { if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Sum = float64(math.Float64frombits(v)) + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Sum = float64(math.Float64frombits(v)) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) + } + m.NotExists = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NotExists |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Samples = append(m.Samples, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Samples) == 0 { + m.Samples = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Samples = append(m.Samples, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Samples", wireType) + } + case 7: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Values = append(m.Values, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Values) == 0 { + m.Values = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Values = append(m.Values, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchResponse_Bin) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SearchResponse_Bin: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchResponse_Bin: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Label = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ts == nil { + m.Ts = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.Ts).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Hist == nil { + m.Hist = &SearchResponse_Histogram{} + } + if err := m.Hist.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchResponse_Agg) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SearchResponse_Agg: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchResponse_Agg: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Agg", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Agg == nil { + m.Agg = make(map[string]uint64) + } + var mapkey string + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protohelpers.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protohelpers.ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Agg[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggHistogram", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AggHistogram == nil { + m.AggHistogram = make(map[string]*SearchResponse_Histogram) + } + var mapkey string + var mapvalue *SearchResponse_Histogram + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protohelpers.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protohelpers.ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return protohelpers.ErrInvalidLength + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &SearchResponse_Histogram{} + if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.AggHistogram[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) + } + m.NotExists = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NotExists |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timeseries", wireType) } - m.Total = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7508,16 +9208,31 @@ func (m *SearchResponse_Histogram) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Total |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Timeseries = append(m.Timeseries, &SearchResponse_Bin{}) + if err := m.Timeseries[len(m.Timeseries)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValuesPool", wireType) } - m.NotExists = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7527,141 +9242,24 @@ func (m *SearchResponse_Histogram) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NotExists |= int64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 6: - if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Samples = append(m.Samples, v2) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - elementCount = packedLen / 8 - if elementCount != 0 && len(m.Samples) == 0 { - m.Samples = make([]float64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Samples = append(m.Samples, v2) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Samples", wireType) + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength } - case 7: - if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Values = append(m.Values, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Values) == 0 { - m.Values = make([]uint32, 0, elementCount) - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Values = append(m.Values, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValuesPool = append(m.ValuesPool, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -7684,7 +9282,7 @@ func (m *SearchResponse_Histogram) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SearchResponse_Bin) UnmarshalVT(dAtA []byte) error { +func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7707,49 +9305,17 @@ func (m *SearchResponse_Bin) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchResponse_Bin: wiretype end group for non-group") + return fmt.Errorf("proto: SearchResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchResponse_Bin: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Label = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7759,31 +9325,29 @@ func (m *SearchResponse_Bin) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Ts == nil { - m.Ts = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.Ts).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} } iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IdSources", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7800,77 +9364,24 @@ func (m *SearchResponse_Bin) UnmarshalVT(dAtA []byte) error { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Hist == nil { - m.Hist = &SearchResponse_Histogram{} - } - if err := m.Hist.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SearchResponse_Agg) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.IdSources = append(m.IdSources, &SearchResponse_IdWithHint{}) + if err := m.IdSources[len(m.IdSources)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SearchResponse_Agg: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SearchResponse_Agg: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Agg", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Histogram", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7897,10 +9408,10 @@ func (m *SearchResponse_Agg) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Agg == nil { - m.Agg = make(map[string]uint64) + if m.Histogram == nil { + m.Histogram = make(map[uint64]uint64) } - var mapkey string + var mapkey uint64 var mapvalue uint64 for iNdEx < postIndex { entryPreIndex := iNdEx @@ -7921,7 +9432,6 @@ func (m *SearchResponse_Agg) UnmarshalVT(dAtA []byte) error { } fieldNum := int32(wire >> 3) if fieldNum == 1 { - var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -7931,24 +9441,11 @@ func (m *SearchResponse_Agg) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift + mapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { @@ -7979,11 +9476,11 @@ func (m *SearchResponse_Agg) UnmarshalVT(dAtA []byte) error { iNdEx += skippy } } - m.Agg[mapkey] = mapvalue + m.Histogram[mapkey] = mapvalue iNdEx = postIndex - case 2: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AggHistogram", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8010,111 +9507,173 @@ func (m *SearchResponse_Agg) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.AggHistogram == nil { - m.AggHistogram = make(map[string]*SearchResponse_Histogram) + m.Aggs = append(m.Aggs, &SearchResponse_Agg{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - var mapkey string - var mapvalue *SearchResponse_Histogram - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return protohelpers.ErrInvalidLength - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &SearchResponse_Histogram{} - if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Errors = append(m.Errors, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= SearchErrorCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } } - m.AggHistogram[mapkey] = mapvalue + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Explain == nil { + m.Explain = &ExplainEntry{} + } + if err := m.Explain.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - m.NotExists = 0 + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExplainEntry) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExplainEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExplainEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8124,14 +9683,27 @@ func (m *SearchResponse_Agg) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NotExists |= int64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 4: + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timeseries", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8158,16 +9730,18 @@ func (m *SearchResponse_Agg) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Timeseries = append(m.Timeseries, &SearchResponse_Bin{}) - if err := m.Timeseries[len(m.Timeseries)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if m.Duration == nil { + m.Duration = &durationpb.Duration{} + } + if err := (*durationpb1.Duration)(m.Duration).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 5: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValuesPool", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8177,23 +9751,25 @@ func (m *SearchResponse_Agg) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValuesPool = append(m.ValuesPool, string(dAtA[iNdEx:postIndex])) + m.Children = append(m.Children, &ExplainEntry{}) + if err := m.Children[len(m.Children)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -8217,7 +9793,7 @@ func (m *SearchResponse_Agg) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { +func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8240,17 +9816,17 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchResponse: wiretype end group for non-group") + return fmt.Errorf("proto: StartAsyncSearchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StartAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8260,29 +9836,133 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } + m.SearchId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdSources", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Retention", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Retention == nil { + m.Retention = &durationpb.Duration{} + } + if err := (*durationpb1.Duration)(m.Retention).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Query = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + m.From = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.From |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + m.To = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.To |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8309,16 +9989,16 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.IdSources = append(m.IdSources, &SearchResponse_IdWithHint{}) - if err := m.IdSources[len(m.IdSources)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.Aggs = append(m.Aggs, &AggQuery{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Histogram", wireType) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) } - var msglen int + m.HistogramInterval = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8328,96 +10008,16 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.HistogramInterval |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Histogram == nil { - m.Histogram = make(map[uint64]uint64) - } - var mapkey uint64 - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - } else if fieldNum == 2 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Histogram[mapkey] = mapvalue - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) } - var msglen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8427,31 +10027,17 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Aggs = append(m.Aggs, &SearchResponse_Agg{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: + m.WithDocs = bool(v != 0) + case 9: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) } - m.Total = 0 + m.Size = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8461,14 +10047,116 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Total |= uint64(b&0x7F) << shift + m.Size |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 6: + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StartAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StartAsyncSearchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StartAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FetchAsyncSearchResultRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FetchAsyncSearchResultRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8496,13 +10184,32 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Errors = append(m.Errors, string(dAtA[iNdEx:postIndex])) + m.SearchId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + } + m.Size = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Size |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) } - m.Code = 0 + m.Offset = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8512,16 +10219,16 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Code |= SearchErrorCode(b&0x7F) << shift + m.Offset |= int32(b&0x7F) << shift if b < 0x80 { break } } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) } - var msglen int + m.Order = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8531,28 +10238,11 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Order |= Order(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Explain == nil { - m.Explain = &ExplainEntry{} - } - if err := m.Explain.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -8575,7 +10265,7 @@ func (m *SearchResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *ExplainEntry) UnmarshalVT(dAtA []byte) error { +func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8598,17 +10288,36 @@ func (m *ExplainEntry) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExplainEntry: wiretype end group for non-group") + return fmt.Errorf("proto: FetchAsyncSearchResultResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExplainEntry: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: FetchAsyncSearchResultResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= AsyncSearchStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8618,27 +10327,31 @@ func (m *ExplainEntry) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Message = string(dAtA[iNdEx:postIndex]) + if m.Response == nil { + m.Response = &SearchResponse{} + } + if err := m.Response.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8665,16 +10378,16 @@ func (m *ExplainEntry) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Duration == nil { - m.Duration = &durationpb.Duration{} + if m.StartedAt == nil { + m.StartedAt = ×tamppb.Timestamp{} } - if err := (*durationpb1.Duration)(m.Duration).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.StartedAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8701,65 +10414,162 @@ func (m *ExplainEntry) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Children = append(m.Children, &ExplainEntry{}) - if err := m.Children[len(m.Children)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if m.ExpiresAt == nil { + m.ExpiresAt = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.ExpiresAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CanceledAt", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { return protohelpers.ErrInvalidLength } - if (iNdEx + skippy) > l { + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow + if m.CanceledAt == nil { + m.CanceledAt = ×tamppb.Timestamp{} } - if iNdEx >= l { + if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FracsDone", wireType) + } + m.FracsDone = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FracsDone |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FracsQueue", wireType) + } + m.FracsQueue = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FracsQueue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DiskUsage", wireType) + } + m.DiskUsage = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DiskUsage |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.Aggs = append(m.Aggs, &AggQuery{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) + } + m.HistogramInterval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HistogramInterval |= int64(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StartAsyncSearchRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StartAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 11: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8787,11 +10597,11 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SearchId = string(dAtA[iNdEx:postIndex]) + m.Query = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 12: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Retention", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8818,18 +10628,18 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Retention == nil { - m.Retention = &durationpb.Duration{} + if m.From == nil { + m.From = ×tamppb.Timestamp{} } - if err := (*durationpb1.Duration)(m.Retention).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + case 13: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8839,29 +10649,33 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Query = string(dAtA[iNdEx:postIndex]) + if m.To == nil { + m.To = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Retention", wireType) } - m.From = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8871,16 +10685,33 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.From |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 5: + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Retention == nil { + m.Retention = &durationpb.Duration{} + } + if err := (*durationpb1.Duration)(m.Retention).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) } - m.To = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8890,16 +10721,17 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.To |= int64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + m.WithDocs = bool(v != 0) + case 16: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) } - var msglen int + m.Size = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8909,31 +10741,67 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Size |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + msglen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CancelAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) + if iNdEx >= l { + return io.ErrUnexpectedEOF } - m.HistogramInterval = 0 + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CancelAsyncSearchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CancelAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + } + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8943,36 +10811,131 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.HistogramInterval |= int64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SearchId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CancelAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CancelAsyncSearchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CancelAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeleteAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - m.WithDocs = bool(v != 0) - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeleteAsyncSearchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeleteAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } - m.Size = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -8982,11 +10945,24 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Size |= int64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SearchId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -9009,7 +10985,7 @@ func (m *StartAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *StartAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { +func (m *DeleteAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9032,10 +11008,10 @@ func (m *StartAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StartAsyncSearchResponse: wiretype end group for non-group") + return fmt.Errorf("proto: DeleteAsyncSearchResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StartAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeleteAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -9060,7 +11036,7 @@ func (m *StartAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { +func (m *GetAsyncSearchesListRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9083,15 +11059,35 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: FetchAsyncSearchResultRequest: wiretype end group for non-group") + return fmt.Errorf("proto: GetAsyncSearchesListRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: FetchAsyncSearchResultRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetAsyncSearchesListRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var v AsyncSearchStatus + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= AsyncSearchStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Status = &v + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9119,51 +11115,64 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SearchId = string(dAtA[iNdEx:postIndex]) + m.Ids = append(m.Ids, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - m.Size = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Size |= int32(b&0x7F) << shift - if b < 0x80 { - break - } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - m.Offset = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Offset |= int32(b&0x7F) << shift - if b < 0x80 { - break - } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetAsyncSearchesListResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + if iNdEx >= l { + return io.ErrUnexpectedEOF } - m.Order = 0 + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetAsyncSearchesListResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetAsyncSearchesListResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Searches", wireType) + } + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9173,11 +11182,26 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Order |= Order(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Searches = append(m.Searches, &AsyncSearchesListItem{}) + if err := m.Searches[len(m.Searches)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -9200,7 +11224,7 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { +func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9223,36 +11247,17 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: FetchAsyncSearchResultResponse: wiretype end group for non-group") + return fmt.Errorf("proto: AsyncSearchesListItem: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: FetchAsyncSearchResultResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AsyncSearchesListItem: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= AsyncSearchStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -9262,28 +11267,43 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Response == nil { - m.Response = &SearchResponse{} + m.SearchId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - if err := m.Response.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= AsyncSearchStatus(b&0x7F) << shift + if b < 0x80 { + break + } } - iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) @@ -9681,194 +11701,9 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVT(dAtA []byte) error { break } } - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CancelAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CancelAsyncSearchRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CancelAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SearchId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CancelAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CancelAsyncSearchResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CancelAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeleteAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeleteAsyncSearchRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 17: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9896,7 +11731,7 @@ func (m *DeleteAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SearchId = string(dAtA[iNdEx:postIndex]) + m.Error = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -9920,58 +11755,7 @@ func (m *DeleteAsyncSearchRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *DeleteAsyncSearchResponse) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeleteAsyncSearchResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetAsyncSearchesListRequest) UnmarshalVT(dAtA []byte) error { +func (m *IdWithHint) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9994,17 +11778,17 @@ func (m *GetAsyncSearchesListRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetAsyncSearchesListRequest: wiretype end group for non-group") + return fmt.Errorf("proto: IdWithHint: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetAsyncSearchesListRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IdWithHint: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } - var v AsyncSearchStatus + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10014,15 +11798,27 @@ func (m *GetAsyncSearchesListRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= AsyncSearchStatus(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.Status = &v + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hint", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10050,7 +11846,7 @@ func (m *GetAsyncSearchesListRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Ids = append(m.Ids, string(dAtA[iNdEx:postIndex])) + m.Hint = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -10074,7 +11870,7 @@ func (m *GetAsyncSearchesListRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *GetAsyncSearchesListResponse) UnmarshalVT(dAtA []byte) error { +func (m *FieldsFilter) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10097,17 +11893,17 @@ func (m *GetAsyncSearchesListResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetAsyncSearchesListResponse: wiretype end group for non-group") + return fmt.Errorf("proto: FieldsFilter: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetAsyncSearchesListResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: FieldsFilter: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Searches", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10117,26 +11913,44 @@ func (m *GetAsyncSearchesListResponse) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Searches = append(m.Searches, &AsyncSearchesListItem{}) - if err := m.Searches[len(m.Searches)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Fields = append(m.Fields, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowList", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.AllowList = bool(v != 0) default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -10159,7 +11973,7 @@ func (m *GetAsyncSearchesListResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { +func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10182,15 +11996,15 @@ func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AsyncSearchesListItem: wiretype end group for non-group") + return fmt.Errorf("proto: FetchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AsyncSearchesListItem: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: FetchRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10218,13 +12032,13 @@ func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SearchId = string(dAtA[iNdEx:postIndex]) + m.Ids = append(m.Ids, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 2: + case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) } - m.Status = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10234,14 +12048,15 @@ func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Status |= AsyncSearchStatus(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - case 3: + m.Explain = bool(v != 0) + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IdsWithHints", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10268,16 +12083,14 @@ func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.StartedAt == nil { - m.StartedAt = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.StartedAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.IdsWithHints = append(m.IdsWithHints, &IdWithHint{}) + if err := m.IdsWithHints[len(m.IdsWithHints)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FieldsFilter", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10304,109 +12117,118 @@ func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ExpiresAt == nil { - m.ExpiresAt = ×tamppb.Timestamp{} + if m.FieldsFilter == nil { + m.FieldsFilter = &FieldsFilter{} } - if err := (*timestamppb1.Timestamp)(m.ExpiresAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := m.FieldsFilter.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CanceledAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + msglen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if m.CanceledAt == nil { - m.CanceledAt = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StatusRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FracsDone", wireType) + if iNdEx >= l { + return io.ErrUnexpectedEOF } - m.FracsDone = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FracsDone |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FracsQueue", wireType) + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatusRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - m.FracsQueue = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FracsQueue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DiskUsage", wireType) + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - m.DiskUsage = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DiskUsage |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StatusResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - case 9: + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatusResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OldestTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10433,31 +12255,65 @@ func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if m.OldestTime == nil { + m.OldestTime = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.OldestTime).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - m.HistogramInterval = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HistogramInterval |= int64(b&0x7F) << shift - if b < 0x80 { - break - } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength } - case 11: + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OnePhaseSearchRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OnePhaseSearchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OnePhaseSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } @@ -10489,11 +12345,11 @@ func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { } m.Query = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 12: - if wireType != 2 { + case 2: + if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) } - var msglen int + m.From = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10503,33 +12359,16 @@ func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.From |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.From == nil { - m.From = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 2 { + case 3: + if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) } - var msglen int + m.To = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10539,33 +12378,16 @@ func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.To |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.To == nil { - m.To = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Retention", wireType) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) } - var msglen int + m.Size = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10575,33 +12397,16 @@ func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Size |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Retention == nil { - m.Retention = &durationpb.Duration{} - } - if err := (*durationpb1.Duration)(m.Retention).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 15: + case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) } - var v int + m.Offset = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10611,17 +12416,16 @@ func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.Offset |= int64(b&0x7F) << shift if b < 0x80 { break } } - m.WithDocs = bool(v != 0) - case 16: + case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) } - m.Size = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10631,16 +12435,17 @@ func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Size |= int64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + m.Explain = bool(v != 0) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10650,78 +12455,34 @@ func (m *AsyncSearchesListItem) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Error = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IdWithHint) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.WithTotal = bool(v != 0) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IdWithHint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IdWithHint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.Order = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Order |= Order(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OffsetId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10749,13 +12510,13 @@ func (m *IdWithHint) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Id = string(dAtA[iNdEx:postIndex]) + m.OffsetId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hint", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FieldsFilter", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10765,23 +12526,27 @@ func (m *IdWithHint) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Hint = string(dAtA[iNdEx:postIndex]) + if m.FieldsFilter == nil { + m.FieldsFilter = &FieldsFilter{} + } + if err := m.FieldsFilter.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -10805,7 +12570,7 @@ func (m *IdWithHint) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *FetchRequest_FieldsFilter) UnmarshalVT(dAtA []byte) error { +func (m *OnePhaseSearchResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10828,17 +12593,17 @@ func (m *FetchRequest_FieldsFilter) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: FetchRequest_FieldsFilter: wiretype end group for non-group") + return fmt.Errorf("proto: OnePhaseSearchResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: FetchRequest_FieldsFilter: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: OnePhaseSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10848,29 +12613,38 @@ func (m *FetchRequest_FieldsFilter) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Fields = append(m.Fields, string(dAtA[iNdEx:postIndex])) + if oneof, ok := m.ResponseType.(*OnePhaseSearchResponse_Header); ok { + if err := oneof.Header.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &Header{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.ResponseType = &OnePhaseSearchResponse_Header{Header: v} + } iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowList", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Document", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -10880,12 +12654,33 @@ func (m *FetchRequest_FieldsFilter) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.AllowList = bool(v != 0) + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.ResponseType.(*OnePhaseSearchResponse_Document); ok { + if err := oneof.Document.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &Document{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.ResponseType = &OnePhaseSearchResponse_Document{Document: v} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -10908,7 +12703,7 @@ func (m *FetchRequest_FieldsFilter) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { +func (m *Document) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10931,101 +12726,15 @@ func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: FetchRequest: wiretype end group for non-group") + return fmt.Errorf("proto: Document: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: FetchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Document: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ids = append(m.Ids, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Explain = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdsWithHints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IdsWithHints = append(m.IdsWithHints, &IdWithHint{}) - if err := m.IdsWithHints[len(m.IdsWithHints)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldsFilter", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11052,10 +12761,10 @@ func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.FieldsFilter == nil { - m.FieldsFilter = &FetchRequest_FieldsFilter{} + if m.Data == nil { + m.Data = &BinaryData{} } - if err := m.FieldsFilter.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Data.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -11081,7 +12790,7 @@ func (m *FetchRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *StatusRequest) UnmarshalVT(dAtA []byte) error { +func (m *Header) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11104,66 +12813,85 @@ func (m *StatusRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StatusRequest: wiretype end group for non-group") + return fmt.Errorf("proto: Header: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatusResponse) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.Errors = append(m.Errors, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StatusResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= SearchErrorCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OldestTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11190,10 +12918,10 @@ func (m *StatusResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.OldestTime == nil { - m.OldestTime = ×tamppb.Timestamp{} + if m.Explain == nil { + m.Explain = &ExplainEntry{} } - if err := (*timestamppb1.Timestamp)(m.OldestTime).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Explain.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -11973,9 +13701,221 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { break } } - case 14: + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OffsetId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.OffsetId = stringValue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchResponse_Id) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SearchResponse_Id: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchResponse_Id: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType) + } + m.Mid = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Mid |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Rid", wireType) + } + m.Rid = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Rid |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchResponse_IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SearchResponse_IdWithHint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchResponse_IdWithHint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Id == nil { + m.Id = &SearchResponse_Id{} + } + if err := m.Id.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OffsetId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hint", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -12007,7 +13947,7 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.OffsetId = stringValue + m.Hint = stringValue iNdEx = postIndex default: iNdEx = preIndex @@ -12031,7 +13971,7 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *SearchResponse_Id) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *SearchResponse_Histogram) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12054,17 +13994,50 @@ func (m *SearchResponse_Id) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchResponse_Id: wiretype end group for non-group") + return fmt.Errorf("proto: SearchResponse_Histogram: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchResponse_Id: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchResponse_Histogram: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Min = float64(math.Float64frombits(v)) + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Max = float64(math.Float64frombits(v)) + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Sum = float64(math.Float64frombits(v)) + case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) } - m.Mid = 0 + m.Total = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12074,16 +14047,16 @@ func (m *SearchResponse_Id) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Mid |= uint64(b&0x7F) << shift + m.Total |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 2: + case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Rid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) } - m.Rid = 0 + m.NotExists = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12093,11 +14066,141 @@ func (m *SearchResponse_Id) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Rid |= uint64(b&0x7F) << shift + m.NotExists |= int64(b&0x7F) << shift if b < 0x80 { break } } + case 6: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Samples = append(m.Samples, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Samples) == 0 { + m.Samples = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Samples = append(m.Samples, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Samples", wireType) + } + case 7: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Values = append(m.Values, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Values) == 0 { + m.Values = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Values = append(m.Values, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) + } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -12120,7 +14223,7 @@ func (m *SearchResponse_Id) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *SearchResponse_IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *SearchResponse_Bin) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12143,15 +14246,51 @@ func (m *SearchResponse_IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchResponse_IdWithHint: wiretype end group for non-group") + return fmt.Errorf("proto: SearchResponse_Bin: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchResponse_IdWithHint: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchResponse_Bin: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Label = stringValue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12178,18 +14317,18 @@ func (m *SearchResponse_IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Id == nil { - m.Id = &SearchResponse_Id{} + if m.Ts == nil { + m.Ts = ×tamppb.Timestamp{} } - if err := m.Id.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.Ts).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hint", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12199,27 +14338,27 @@ func (m *SearchResponse_IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + if m.Hist == nil { + m.Hist = &SearchResponse_Histogram{} + } + if err := m.Hist.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Hint = stringValue iNdEx = postIndex default: iNdEx = preIndex @@ -12243,7 +14382,7 @@ func (m *SearchResponse_IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *SearchResponse_Histogram) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *SearchResponse_Agg) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12266,50 +14405,17 @@ func (m *SearchResponse_Histogram) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchResponse_Histogram: wiretype end group for non-group") + return fmt.Errorf("proto: SearchResponse_Agg: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchResponse_Histogram: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchResponse_Agg: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Min = float64(math.Float64frombits(v)) - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Max = float64(math.Float64frombits(v)) - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Sum = float64(math.Float64frombits(v)) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Agg", wireType) } - m.Total = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12319,42 +14425,29 @@ func (m *SearchResponse_Histogram) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Total |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) + if msglen < 0 { + return protohelpers.ErrInvalidLength } - m.NotExists = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NotExists |= int64(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - case 6: - if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Samples = append(m.Samples, v2) - } else if wireType == 2 { - var packedLen int + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Agg == nil { + m.Agg = make(map[string]uint64) + } + var mapkey string + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12364,42 +14457,114 @@ func (m *SearchResponse_Histogram) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - packedLen |= int(b&0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if packedLen < 0 { - return protohelpers.ErrInvalidLength + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protohelpers.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protohelpers.ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + if intStringLenmapkey == 0 { + mapkey = "" + } else { + mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) + } + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + } + m.Agg[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggHistogram", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - var elementCount int - elementCount = packedLen / 8 - if elementCount != 0 && len(m.Samples) == 0 { - m.Samples = make([]float64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Samples = append(m.Samples, v2) + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Samples", wireType) } - case 7: - if wireType == 0 { - var v uint32 + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AggHistogram == nil { + m.AggHistogram = make(map[string]*SearchResponse_Histogram) + } + var mapkey string + var mapvalue *SearchResponse_Histogram + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12409,51 +14574,47 @@ func (m *SearchResponse_Histogram) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint32(b&0x7F) << shift + wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.Values = append(m.Values, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - if iNdEx >= l { - return io.ErrUnexpectedEOF + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protohelpers.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protohelpers.ErrInvalidLength } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF } - } - if packedLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ + if intStringLenmapkey == 0 { + mapkey = "" + } else { + mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) } - } - elementCount = count - if elementCount != 0 && len(m.Values) == 0 { - m.Values = make([]uint32, 0, elementCount) - } - for iNdEx < postIndex { - var v uint32 + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12463,72 +14624,48 @@ func (m *SearchResponse_Histogram) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= uint32(b&0x7F) << shift + mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.Values = append(m.Values, v) + if mapmsglen < 0 { + return protohelpers.ErrInvalidLength + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &SearchResponse_Histogram{} + if err := mapvalue.UnmarshalVTUnsafe(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) - } - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SearchResponse_Bin) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SearchResponse_Bin: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SearchResponse_Bin: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) + m.AggHistogram[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) } - var stringLen uint64 + m.NotExists = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12538,31 +14675,14 @@ func (m *SearchResponse_Bin) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.NotExists |= int64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Label = stringValue - iNdEx = postIndex - case 2: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Timeseries", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12589,18 +14709,16 @@ func (m *SearchResponse_Bin) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Ts == nil { - m.Ts = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.Ts).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + m.Timeseries = append(m.Timeseries, &SearchResponse_Bin{}) + if err := m.Timeseries[len(m.Timeseries)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hist", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ValuesPool", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12610,27 +14728,27 @@ func (m *SearchResponse_Bin) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Hist == nil { - m.Hist = &SearchResponse_Histogram{} - } - if err := m.Hist.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.ValuesPool = append(m.ValuesPool, stringValue) iNdEx = postIndex default: iNdEx = preIndex @@ -12654,7 +14772,7 @@ func (m *SearchResponse_Bin) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *SearchResponse_Agg) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12664,28 +14782,93 @@ func (m *SearchResponse_Agg) UnmarshalVTUnsafe(dAtA []byte) error { if shift >= 64 { return protohelpers.ErrIntOverflow } - if iNdEx >= l { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SearchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = dAtA[iNdEx:postIndex] + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IdSources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.IdSources = append(m.IdSources, &SearchResponse_IdWithHint{}) + if err := m.IdSources[len(m.IdSources)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SearchResponse_Agg: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SearchResponse_Agg: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Agg", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Histogram", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12712,10 +14895,10 @@ func (m *SearchResponse_Agg) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Agg == nil { - m.Agg = make(map[string]uint64) + if m.Histogram == nil { + m.Histogram = make(map[uint64]uint64) } - var mapkey string + var mapkey uint64 var mapvalue uint64 for iNdEx < postIndex { entryPreIndex := iNdEx @@ -12736,7 +14919,6 @@ func (m *SearchResponse_Agg) UnmarshalVTUnsafe(dAtA []byte) error { } fieldNum := int32(wire >> 3) if fieldNum == 1 { - var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12746,28 +14928,11 @@ func (m *SearchResponse_Agg) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift + mapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - if intStringLenmapkey == 0 { - mapkey = "" - } else { - mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) - } - iNdEx = postStringIndexmapkey } else if fieldNum == 2 { for shift := uint(0); ; shift += 7 { if shift >= 64 { @@ -12798,11 +14963,11 @@ func (m *SearchResponse_Agg) UnmarshalVTUnsafe(dAtA []byte) error { iNdEx += skippy } } - m.Agg[mapkey] = mapvalue + m.Histogram[mapkey] = mapvalue iNdEx = postIndex - case 2: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AggHistogram", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12829,115 +14994,177 @@ func (m *SearchResponse_Agg) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.AggHistogram == nil { - m.AggHistogram = make(map[string]*SearchResponse_Histogram) + m.Aggs = append(m.Aggs, &SearchResponse_Agg{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - var mapkey string - var mapvalue *SearchResponse_Histogram - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - if intStringLenmapkey == 0 { - mapkey = "" - } else { - mapkey = unsafe.String(&dAtA[iNdEx], intStringLenmapkey) - } - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return protohelpers.ErrInvalidLength - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &SearchResponse_Histogram{} - if err := mapvalue.UnmarshalVTUnsafe(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Errors = append(m.Errors, stringValue) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= SearchErrorCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Explain == nil { + m.Explain = &ExplainEntry{} + } + if err := m.Explain.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.AggHistogram[mapkey] = mapvalue iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NotExists", wireType) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - m.NotExists = 0 + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExplainEntry) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExplainEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExplainEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12947,14 +15174,31 @@ func (m *SearchResponse_Agg) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.NotExists |= int64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 4: + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Message = stringValue + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timeseries", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12981,16 +15225,18 @@ func (m *SearchResponse_Agg) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Timeseries = append(m.Timeseries, &SearchResponse_Bin{}) - if err := m.Timeseries[len(m.Timeseries)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if m.Duration == nil { + m.Duration = &durationpb.Duration{} + } + if err := (*durationpb1.Duration)(m.Duration).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 5: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValuesPool", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13000,27 +15246,25 @@ func (m *SearchResponse_Agg) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + m.Children = append(m.Children, &ExplainEntry{}) + if err := m.Children[len(m.Children)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.ValuesPool = append(m.ValuesPool, stringValue) iNdEx = postIndex default: iNdEx = preIndex @@ -13044,7 +15288,7 @@ func (m *SearchResponse_Agg) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13067,17 +15311,17 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchResponse: wiretype end group for non-group") + return fmt.Errorf("proto: StartAsyncSearchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StartAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13087,26 +15331,141 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Data = dAtA[iNdEx:postIndex] + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.SearchId = stringValue iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdSources", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Retention", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Retention == nil { + m.Retention = &durationpb.Duration{} + } + if err := (*durationpb1.Duration)(m.Retention).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Query = stringValue + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + m.From = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.From |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + m.To = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.To |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -13133,16 +15492,16 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.IdSources = append(m.IdSources, &SearchResponse_IdWithHint{}) - if err := m.IdSources[len(m.IdSources)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + m.Aggs = append(m.Aggs, &AggQuery{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Histogram", wireType) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) } - var msglen int + m.HistogramInterval = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13152,96 +15511,16 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.HistogramInterval |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Histogram == nil { - m.Histogram = make(map[uint64]uint64) - } - var mapkey uint64 - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - } else if fieldNum == 2 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Histogram[mapkey] = mapvalue - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) } - var msglen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13251,31 +15530,17 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Aggs = append(m.Aggs, &SearchResponse_Agg{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: + m.WithDocs = bool(v != 0) + case 9: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) } - m.Total = 0 + m.Size = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13285,14 +15550,116 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Total |= uint64(b&0x7F) << shift + m.Size |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 6: + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StartAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StartAsyncSearchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StartAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FetchAsyncSearchResultRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FetchAsyncSearchResultRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13324,13 +15691,32 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Errors = append(m.Errors, stringValue) - iNdEx = postIndex - case 7: + m.SearchId = stringValue + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + } + m.Size = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Size |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) } - m.Code = 0 + m.Offset = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13340,16 +15726,16 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Code |= SearchErrorCode(b&0x7F) << shift + m.Offset |= int32(b&0x7F) << shift if b < 0x80 { break } } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) } - var msglen int + m.Order = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13359,28 +15745,11 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Order |= Order(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Explain == nil { - m.Explain = &ExplainEntry{} - } - if err := m.Explain.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -13403,7 +15772,7 @@ func (m *SearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *ExplainEntry) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13426,17 +15795,36 @@ func (m *ExplainEntry) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExplainEntry: wiretype end group for non-group") + return fmt.Errorf("proto: FetchAsyncSearchResultResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExplainEntry: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: FetchAsyncSearchResultResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= AsyncSearchStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13446,31 +15834,31 @@ func (m *ExplainEntry) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + if m.Response == nil { + m.Response = &SearchResponse{} + } + if err := m.Response.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Message = stringValue iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -13497,16 +15885,16 @@ func (m *ExplainEntry) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Duration == nil { - m.Duration = &durationpb.Duration{} + if m.StartedAt == nil { + m.StartedAt = ×tamppb.Timestamp{} } - if err := (*durationpb1.Duration)(m.Duration).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.StartedAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -13533,67 +15921,18 @@ func (m *ExplainEntry) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Children = append(m.Children, &ExplainEntry{}) - if err := m.Children[len(m.Children)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + if m.ExpiresAt == nil { + m.ExpiresAt = ×tamppb.Timestamp{} } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { + if err := (*timestamppb1.Timestamp)(m.ExpiresAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StartAsyncSearchRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StartAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CanceledAt", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13603,31 +15942,88 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + if m.CanceledAt == nil { + m.CanceledAt = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.SearchId = stringValue iNdEx = postIndex - case 2: + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FracsDone", wireType) + } + m.FracsDone = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FracsDone |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FracsQueue", wireType) + } + m.FracsQueue = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FracsQueue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DiskUsage", wireType) + } + m.DiskUsage = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DiskUsage |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Retention", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -13654,14 +16050,31 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Retention == nil { - m.Retention = &durationpb.Duration{} - } - if err := (*durationpb1.Duration)(m.Retention).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + m.Aggs = append(m.Aggs, &AggQuery{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } - iNdEx = postIndex - case 3: + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) + } + m.HistogramInterval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HistogramInterval |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } @@ -13697,11 +16110,11 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } m.Query = stringValue iNdEx = postIndex - case 4: - if wireType != 0 { + case 12: + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) } - m.From = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13711,16 +16124,33 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.From |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 5: - if wireType != 0 { + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.From == nil { + m.From = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) } - m.To = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13730,14 +16160,31 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.To |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 6: + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.To == nil { + m.To = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Retention", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -13764,16 +16211,18 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if m.Retention == nil { + m.Retention = &durationpb.Duration{} + } + if err := (*durationpb1.Duration)(m.Retention).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 7: + case 15: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) } - m.HistogramInterval = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13783,16 +16232,17 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.HistogramInterval |= int64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - case 8: + m.WithDocs = bool(v != 0) + case 16: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) } - var v int + m.Size = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13802,17 +16252,67 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.Size |= int64(b&0x7F) << shift if b < 0x80 { break } } - m.WithDocs = bool(v != 0) - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - m.Size = 0 + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CancelAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CancelAsyncSearchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CancelAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + } + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13822,11 +16322,28 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Size |= int64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.SearchId = stringValue + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -13849,7 +16366,7 @@ func (m *StartAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *StartAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *CancelAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13872,10 +16389,10 @@ func (m *StartAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StartAsyncSearchResponse: wiretype end group for non-group") + return fmt.Errorf("proto: CancelAsyncSearchResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StartAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CancelAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -13900,7 +16417,7 @@ func (m *StartAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *DeleteAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13923,10 +16440,10 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: FetchAsyncSearchResultRequest: wiretype end group for non-group") + return fmt.Errorf("proto: DeleteAsyncSearchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: FetchAsyncSearchResultRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeleteAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -13965,63 +16482,57 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { } m.SearchId = stringValue iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) - } - m.Size = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Size |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - m.Offset = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Offset |= int32(b&0x7F) << shift - if b < 0x80 { - break - } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - m.Order = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Order |= Order(b&0x7F) << shift - if b < 0x80 { - break - } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeleteAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeleteAsyncSearchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeleteAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -14044,7 +16555,7 @@ func (m *FetchAsyncSearchResultRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *GetAsyncSearchesListRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -14067,17 +16578,17 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: FetchAsyncSearchResultResponse: wiretype end group for non-group") + return fmt.Errorf("proto: GetAsyncSearchesListRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: FetchAsyncSearchResultResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetAsyncSearchesListRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - m.Status = 0 + var v AsyncSearchStatus for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14087,16 +16598,17 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Status |= AsyncSearchStatus(b&0x7F) << shift + v |= AsyncSearchStatus(b&0x7F) << shift if b < 0x80 { break } } + m.Status = &v case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14106,103 +16618,82 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Response == nil { - m.Response = &SearchResponse{} - } - if err := m.Response.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.Ids = append(m.Ids, stringValue) iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + msglen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if m.StartedAt == nil { - m.StartedAt = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.StartedAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetAsyncSearchesListResponse) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - if m.ExpiresAt == nil { - m.ExpiresAt = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.ExpiresAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postIndex - case 5: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetAsyncSearchesListResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetAsyncSearchesListResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CanceledAt", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Searches", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -14229,75 +16720,67 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.CanceledAt == nil { - m.CanceledAt = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + m.Searches = append(m.Searches, &AsyncSearchesListItem{}) + if err := m.Searches[len(m.Searches)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FracsDone", wireType) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - m.FracsDone = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FracsDone |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FracsQueue", wireType) + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - m.FracsQueue = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FracsQueue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DiskUsage", wireType) + if iNdEx >= l { + return io.ErrUnexpectedEOF } - m.DiskUsage = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DiskUsage |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - case 9: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AsyncSearchesListItem: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AsyncSearchesListItem: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14307,31 +16790,33 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.SearchId = stringValue iNdEx = postIndex - case 10: + case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - m.HistogramInterval = 0 + m.Status = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14341,16 +16826,16 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.HistogramInterval |= int64(b&0x7F) << shift + m.Status |= AsyncSearchStatus(b&0x7F) << shift if b < 0x80 { break } } - case 11: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14360,31 +16845,31 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + if m.StartedAt == nil { + m.StartedAt = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.StartedAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Query = stringValue iNdEx = postIndex - case 12: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -14411,16 +16896,16 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.From == nil { - m.From = ×tamppb.Timestamp{} + if m.ExpiresAt == nil { + m.ExpiresAt = ×tamppb.Timestamp{} } - if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.ExpiresAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 13: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CanceledAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -14447,18 +16932,18 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.To == nil { - m.To = ×tamppb.Timestamp{} + if m.CanceledAt == nil { + m.CanceledAt = ×tamppb.Timestamp{} } - if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Retention", wireType) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FracsDone", wireType) } - var msglen int + m.FracsDone = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14468,33 +16953,16 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.FracsDone |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Retention == nil { - m.Retention = &durationpb.Duration{} - } - if err := (*durationpb1.Duration)(m.Retention).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 15: + case 7: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FracsQueue", wireType) } - var v int + m.FracsQueue = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14504,17 +16972,16 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.FracsQueue |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.WithDocs = bool(v != 0) - case 16: + case 8: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DiskUsage", wireType) } - m.Size = 0 + m.DiskUsage = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14524,67 +16991,16 @@ func (m *FetchAsyncSearchResultResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Size |= int64(b&0x7F) << shift + m.DiskUsage |= uint64(b&0x7F) << shift if b < 0x80 { break } } - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CancelAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CancelAsyncSearchRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CancelAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14594,133 +17010,48 @@ func (m *CancelAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.SearchId = stringValue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CancelAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CancelAsyncSearchResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CancelAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - if (iNdEx + skippy) > l { + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeleteAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow + m.Aggs = append(m.Aggs, &AggQuery{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - if iNdEx >= l { - return io.ErrUnexpectedEOF + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.HistogramInterval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HistogramInterval |= int64(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeleteAsyncSearchRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteAsyncSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 11: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -14752,115 +17083,141 @@ func (m *DeleteAsyncSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.SearchId = stringValue + m.Query = stringValue iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { return protohelpers.ErrInvalidLength } - if (iNdEx + skippy) > l { + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeleteAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow + if m.From == nil { + m.From = ×tamppb.Timestamp{} } - if iNdEx >= l { + if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if m.To == nil { + m.To = ×tamppb.Timestamp{} } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeleteAsyncSearchResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { + if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Retention", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { return protohelpers.ErrInvalidLength } - if (iNdEx + skippy) > l { + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetAsyncSearchesListRequest) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow + if m.Retention == nil { + m.Retention = &durationpb.Duration{} } - if iNdEx >= l { - return io.ErrUnexpectedEOF + if err := (*durationpb1.Duration)(m.Retention).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + iNdEx = postIndex + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetAsyncSearchesListRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetAsyncSearchesListRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.WithDocs = bool(v != 0) + case 16: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) } - var v AsyncSearchStatus + m.Size = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14870,15 +17227,14 @@ func (m *GetAsyncSearchesListRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= AsyncSearchStatus(b&0x7F) << shift + m.Size |= int64(b&0x7F) << shift if b < 0x80 { break } } - m.Status = &v - case 2: + case 17: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -14910,7 +17266,7 @@ func (m *GetAsyncSearchesListRequest) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Ids = append(m.Ids, stringValue) + m.Error = stringValue iNdEx = postIndex default: iNdEx = preIndex @@ -14934,7 +17290,7 @@ func (m *GetAsyncSearchesListRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *GetAsyncSearchesListResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -14957,17 +17313,17 @@ func (m *GetAsyncSearchesListResponse) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetAsyncSearchesListResponse: wiretype end group for non-group") + return fmt.Errorf("proto: IdWithHint: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetAsyncSearchesListResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IdWithHint: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Searches", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -14977,25 +17333,63 @@ func (m *GetAsyncSearchesListResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Searches = append(m.Searches, &AsyncSearchesListItem{}) - if err := m.Searches[len(m.Searches)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Id = stringValue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hint", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Hint = stringValue iNdEx = postIndex default: iNdEx = preIndex @@ -15019,7 +17413,7 @@ func (m *GetAsyncSearchesListResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *FieldsFilter) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -15042,180 +17436,17 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AsyncSearchesListItem: wiretype end group for non-group") + return fmt.Errorf("proto: FieldsFilter: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AsyncSearchesListItem: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: FieldsFilter: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.SearchId = stringValue - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= AsyncSearchStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StartedAt == nil { - m.StartedAt = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.StartedAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExpiresAt == nil { - m.ExpiresAt = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.ExpiresAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CanceledAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CanceledAt == nil { - m.CanceledAt = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FracsDone", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) } - m.FracsDone = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15225,35 +17456,33 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.FracsDone |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FracsQueue", wireType) + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength } - m.FracsQueue = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FracsQueue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - case 8: + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Fields = append(m.Fields, stringValue) + iNdEx = postIndex + case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DiskUsage", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AllowList", wireType) } - m.DiskUsage = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15263,16 +17492,68 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.DiskUsage |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - case 9: + m.AllowList = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FetchRequest) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FetchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FetchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15282,31 +17563,33 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.Ids = append(m.Ids, stringValue) iNdEx = postIndex - case 10: + case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) } - m.HistogramInterval = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15316,16 +17599,17 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.HistogramInterval |= int64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - case 11: + m.Explain = bool(v != 0) + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IdsWithHints", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15335,31 +17619,29 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + m.IdsWithHints = append(m.IdsWithHints, &IdWithHint{}) + if err := m.IdsWithHints[len(m.IdsWithHints)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Query = stringValue iNdEx = postIndex - case 12: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FieldsFilter", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -15386,52 +17668,118 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.From == nil { - m.From = ×tamppb.Timestamp{} + if m.FieldsFilter == nil { + m.FieldsFilter = &FieldsFilter{} } - if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := m.FieldsFilter.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - if msglen < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen - if postIndex < 0 { + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StatusRequest) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatusRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if m.To == nil { - m.To = ×tamppb.Timestamp{} + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StatusResponse) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF } - if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postIndex - case 14: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatusResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Retention", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OldestTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -15458,88 +17806,13 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Retention == nil { - m.Retention = &durationpb.Duration{} + if m.OldestTime == nil { + m.OldestTime = ×tamppb.Timestamp{} } - if err := (*durationpb1.Duration)(m.Retention).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.OldestTime).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 15: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.WithDocs = bool(v != 0) - case 16: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) - } - m.Size = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Size |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Error = stringValue - iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -15562,7 +17835,7 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *OnePhaseSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -15585,15 +17858,15 @@ func (m *IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IdWithHint: wiretype end group for non-group") + return fmt.Errorf("proto: OnePhaseSearchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IdWithHint: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: OnePhaseSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -15625,13 +17898,13 @@ func (m *IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Id = stringValue + m.Query = stringValue iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hint", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) } - var stringLen uint64 + m.From = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15641,82 +17914,130 @@ func (m *IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.From |= int64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + m.To = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.To |= int64(b&0x7F) << shift + if b < 0x80 { + break + } } - if postIndex > l { - return io.ErrUnexpectedEOF + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + m.Size = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Size |= int64(b&0x7F) << shift + if b < 0x80 { + break + } } - m.Hint = stringValue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength + m.Offset = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Offset |= int64(b&0x7F) << shift + if b < 0x80 { + break + } } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FetchRequest_FieldsFilter) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - if iNdEx >= l { - return io.ErrUnexpectedEOF + m.Explain = bool(v != 0) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.WithTotal = bool(v != 0) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FetchRequest_FieldsFilter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FetchRequest_FieldsFilter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.Order = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Order |= Order(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OffsetId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -15748,13 +18069,13 @@ func (m *FetchRequest_FieldsFilter) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Fields = append(m.Fields, stringValue) + m.OffsetId = stringValue iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowList", wireType) + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldsFilter", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -15764,12 +18085,28 @@ func (m *FetchRequest_FieldsFilter) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.AllowList = bool(v != 0) + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldsFilter == nil { + m.FieldsFilter = &FieldsFilter{} + } + if err := m.FieldsFilter.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -15792,7 +18129,7 @@ func (m *FetchRequest_FieldsFilter) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *FetchRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *OnePhaseSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -15815,71 +18152,15 @@ func (m *FetchRequest) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: FetchRequest: wiretype end group for non-group") + return fmt.Errorf("proto: OnePhaseSearchResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: FetchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: OnePhaseSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Ids = append(m.Ids, stringValue) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Explain = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdsWithHints", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -15906,14 +18187,21 @@ func (m *FetchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.IdsWithHints = append(m.IdsWithHints, &IdWithHint{}) - if err := m.IdsWithHints[len(m.IdsWithHints)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + if oneof, ok := m.ResponseType.(*OnePhaseSearchResponse_Header); ok { + if err := oneof.Header.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &Header{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.ResponseType = &OnePhaseSearchResponse_Header{Header: v} } iNdEx = postIndex - case 5: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldsFilter", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Document", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -15940,11 +18228,16 @@ func (m *FetchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.FieldsFilter == nil { - m.FieldsFilter = &FetchRequest_FieldsFilter{} - } - if err := m.FieldsFilter.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + if oneof, ok := m.ResponseType.(*OnePhaseSearchResponse_Document); ok { + if err := oneof.Document.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &Document{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.ResponseType = &OnePhaseSearchResponse_Document{Document: v} } iNdEx = postIndex default: @@ -15969,7 +18262,7 @@ func (m *FetchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *StatusRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *Document) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -15992,12 +18285,48 @@ func (m *StatusRequest) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StatusRequest: wiretype end group for non-group") + return fmt.Errorf("proto: Document: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Document: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Data == nil { + m.Data = &BinaryData{} + } + if err := m.Data.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -16020,7 +18349,7 @@ func (m *StatusRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *StatusResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *Header) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -16043,15 +18372,89 @@ func (m *StatusResponse) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StatusResponse: wiretype end group for non-group") + return fmt.Errorf("proto: Header: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OldestTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Errors = append(m.Errors, stringValue) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= SearchErrorCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -16078,10 +18481,10 @@ func (m *StatusResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.OldestTime == nil { - m.OldestTime = ×tamppb.Timestamp{} + if m.Explain == nil { + m.Explain = &ExplainEntry{} } - if err := (*timestamppb1.Timestamp)(m.OldestTime).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Explain.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/proxy/search/ingestor.go b/proxy/search/ingestor.go index 8d8c2ce4..02d1a685 100644 --- a/proxy/search/ingestor.go +++ b/proxy/search/ingestor.go @@ -375,7 +375,7 @@ func (si *Ingestor) makeFetchReq(ids []seq.IDSource, explain bool, ff FetchField Ids: idsStr, Explain: explain, IdsWithHints: idsWithHints, - FieldsFilter: &storeapi.FetchRequest_FieldsFilter{ + FieldsFilter: &storeapi.FieldsFilter{ Fields: ff.Fields, AllowList: ff.AllowList, }, diff --git a/proxy/search/mock/store_api_client_mock.go b/proxy/search/mock/store_api_client_mock.go index 3f593d18..069975b2 100644 --- a/proxy/search/mock/store_api_client_mock.go +++ b/proxy/search/mock/store_api_client_mock.go @@ -157,6 +157,26 @@ func (mr *MockStoreApiClientMockRecorder) GetAsyncSearchesList(arg0, arg1 interf return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAsyncSearchesList", reflect.TypeOf((*MockStoreApiClient)(nil).GetAsyncSearchesList), varargs...) } +// OnePhaseSearch mocks base method. +func (m *MockStoreApiClient) OnePhaseSearch(arg0 context.Context, arg1 *storeapi.OnePhaseSearchRequest, arg2 ...grpc.CallOption) (storeapi.StoreApi_OnePhaseSearchClient, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "OnePhaseSearch", varargs...) + ret0, _ := ret[0].(storeapi.StoreApi_OnePhaseSearchClient) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// OnePhaseSearch indicates an expected call of OnePhaseSearch. +func (mr *MockStoreApiClientMockRecorder) OnePhaseSearch(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnePhaseSearch", reflect.TypeOf((*MockStoreApiClient)(nil).OnePhaseSearch), varargs...) +} + // Search mocks base method. func (m *MockStoreApiClient) Search(arg0 context.Context, arg1 *storeapi.SearchRequest, arg2 ...grpc.CallOption) (*storeapi.SearchResponse, error) { m.ctrl.T.Helper() diff --git a/proxy/search/one_phase_search.go b/proxy/search/one_phase_search.go new file mode 100644 index 00000000..b91f4f29 --- /dev/null +++ b/proxy/search/one_phase_search.go @@ -0,0 +1,113 @@ +package search + +import ( + "context" + "errors" + "fmt" + "io" + + "github.com/alecthomas/units" + "google.golang.org/grpc" + + "github.com/ozontech/seq-db/pkg/storeapi" + "github.com/ozontech/seq-db/querytracer" + "github.com/ozontech/seq-db/seq" + "github.com/ozontech/seq-db/storage" +) + +func (si *Ingestor) OnePhaseSearch( + ctx context.Context, + sr *SearchRequest, + tr *querytracer.Tracer, +) (*seq.QPR, DocsIterator, error) { + searchStores := si.config.HotStores + if si.config.HotReadStores != nil && len(si.config.HotReadStores.Shards) > 0 { + searchStores = si.config.HotReadStores + } + + host := searchStores.Shards[0][0] // TODO: handle multiple stores and shards + + client, has := si.clients[host] + if !has { + return nil, nil, fmt.Errorf("can't fetch: no client for host %s", host) + } + + fieldsFilter := tryParseFieldsFilter(string(sr.Q)) + req := &storeapi.OnePhaseSearchRequest{ + Query: string(sr.Q), + From: int64(sr.From), + To: int64(sr.To), + Size: int64(sr.Size), + Offset: int64(sr.Offset), + Explain: sr.Explain, + WithTotal: sr.WithTotal, + Order: storeapi.Order(sr.Order), + OffsetId: sr.OffsetId, + FieldsFilter: &storeapi.FieldsFilter{ + Fields: fieldsFilter.Fields, + AllowList: fieldsFilter.AllowList, + }, + } + + stream, err := client.OnePhaseSearch(ctx, req, + grpc.MaxCallRecvMsgSize(256*int(units.MiB)), + grpc.MaxCallSendMsgSize(256*int(units.MiB)), + ) + if err != nil { + return nil, nil, fmt.Errorf("can't fetch docs: %s", err.Error()) + } + + msg, err := stream.Recv() + if err != nil { + return nil, nil, nil + } + + header := msg.GetHeader() + + errs := make([]seq.ErrorSource, 0, len(header.Errors)) + for _, err := range header.Errors { + errs = append(errs, seq.ErrorSource{ErrStr: err}) + } + + qpr := &seq.QPR{ + Total: header.Total, + Errors: errs, + } + + return qpr, &OnePhaseSearchIterator{stream: stream, limit: sr.Size}, nil +} + +type OnePhaseSearchIterator struct { + stream storeapi.StoreApi_OnePhaseSearchClient + + fetched int + limit int +} + +func (it *OnePhaseSearchIterator) Next() (StreamingDoc, error) { + if it.fetched >= it.limit { + return StreamingDoc{}, io.EOF + } + + data, err := it.stream.Recv() + if errors.Is(err, io.EOF) { + return StreamingDoc{}, io.EOF + } + if err != nil { + return StreamingDoc{}, err + } + + doc := data.GetDocument() + block := storage.DocBlock(doc.Data.Data) + mid := block.GetExt1() + + it.fetched++ + + return StreamingDoc{ + ID: seq.ID{ + MID: seq.MID(mid), + RID: seq.RID(block.GetExt2()), + }, + Data: block.Payload(), + }, nil +} diff --git a/proxyapi/grpc_one_phase_search.go b/proxyapi/grpc_one_phase_search.go new file mode 100644 index 00000000..23b8ce49 --- /dev/null +++ b/proxyapi/grpc_one_phase_search.go @@ -0,0 +1,165 @@ +package proxyapi + +import ( + "context" + "errors" + "time" + + "go.opencensus.io/trace" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/known/timestamppb" + + "github.com/ozontech/seq-db/consts" + "github.com/ozontech/seq-db/metric" + "github.com/ozontech/seq-db/pkg/seqproxyapi/v1" + "github.com/ozontech/seq-db/proxy/search" + "github.com/ozontech/seq-db/querytracer" + "github.com/ozontech/seq-db/seq" +) + +func (g *grpcV1) OnePhaseSearch(ctx context.Context, req *seqproxyapi.SearchRequest) (*seqproxyapi.SearchResponse, error) { + ctx, cancel := context.WithTimeout(ctx, g.config.SearchTimeout) + defer cancel() + + if req.Size <= 0 { + return nil, status.Error(codes.InvalidArgument, `"size" must be greater than 0`) + } + + proxyReq := &seqproxyapi.ComplexSearchRequest{ + Query: req.Query, + Size: req.Size, + Offset: req.Offset, + OffsetId: req.OffsetId, + WithTotal: req.WithTotal, + Order: req.Order, + } + sResp, err := g.doOnePhaseSearch(ctx, proxyReq, true) + if err != nil { + return nil, err + } + if sResp.err != nil && !shouldHaveResponse(sResp.err.Code) { + return &seqproxyapi.SearchResponse{Error: sResp.err}, nil + } + + resp := &seqproxyapi.SearchResponse{ + Docs: makeProtoDocsKek(sResp.docsStream), + Total: int64(sResp.qpr.Total), + Error: &seqproxyapi.Error{ + Code: seqproxyapi.ErrorCode_ERROR_CODE_NO, + }, + } + if sResp.err != nil { + resp.Error = sResp.err + } + + return resp, nil +} + +func makeProtoDocsKek(docs search.DocsIterator) []*seqproxyapi.Document { + // TODO: paginate here (???) + respDocs := make([]*seqproxyapi.Document, 0) + for doc, err := docs.Next(); err == nil; doc, err = docs.Next() { + respDocs = append(respDocs, &seqproxyapi.Document{ + Id: doc.ID.String(), + Data: doc.Data, + Time: timestamppb.New(doc.ID.MID.Time()), + }) + } + return respDocs +} + +func (g *grpcV1) doOnePhaseSearch( + ctx context.Context, + req *seqproxyapi.ComplexSearchRequest, + shouldFetch bool, +) (*proxySearchResponse, error) { + metric.SearchOverall.Add(1) + + span := trace.FromContext(ctx) + defer span.End() + + if req.Query == nil { + return nil, status.Error(codes.InvalidArgument, "search query must be provided") + } + if req.Query.From == nil || req.Query.To == nil { + return nil, status.Error(codes.InvalidArgument, `search query "from" and "to" fields must be provided`) + } + if req.Offset != 0 && req.OffsetId != "" { + return nil, status.Error(codes.InvalidArgument, `only one of "offset" and "offset_id" must be provided`) + } + + fromTime := req.Query.From.AsTime() + toTime := req.Query.To.AsTime() + if span.IsRecordingEvents() { + span.AddAttributes( + trace.StringAttribute("query", req.Query.Query), + trace.StringAttribute("from", fromTime.UTC().Format(time.RFC3339Nano)), + trace.StringAttribute("to", toTime.UTC().Format(time.RFC3339Nano)), + trace.BoolAttribute("explain", req.Query.Explain), + trace.Int64Attribute("size", req.Size), + trace.Int64Attribute("offset", req.Offset), + trace.StringAttribute("offset_id", req.OffsetId), + trace.BoolAttribute("with_total", req.WithTotal), + trace.StringAttribute("order", req.Order.String()), + ) + } + + rlQuery := getSearchQueryFromGRPCReqForRateLimiter(req) + if !g.rateLimiter.Account(rlQuery) { + return nil, status.Error(codes.ResourceExhausted, consts.ErrRequestWasRateLimited.Error()) + } + + proxyReq := &search.SearchRequest{ + Q: []byte(req.Query.Query), + From: seq.MID(fromTime.UnixNano()), + To: seq.MID(toTime.UnixNano()), + Explain: req.Query.Explain, + Size: int(req.Size), + Offset: int(req.Offset), + OffsetId: req.OffsetId, + WithTotal: req.WithTotal, + ShouldFetch: shouldFetch, + Order: req.Order.MustDocsOrder(), + } + + tr := querytracer.New(req.Query.Explain, "proxy/OnePhaseSearch") + qpr, docsStream, err := g.searchIngestor.OnePhaseSearch(ctx, proxyReq, tr) + psr := &proxySearchResponse{ + qpr: qpr, + docsStream: docsStream, + } + + if e, ok := parseProxyError(err); ok { + psr.err = e + return psr, nil + } + + if errors.Is(err, consts.ErrInvalidArgument) { + return nil, status.Error(codes.InvalidArgument, err.Error()) + } + + if st, ok := status.FromError(err); ok { + // could not parse a query + if st.Code() == codes.InvalidArgument { + return nil, err + } + } + + if errors.Is(err, consts.ErrPartialResponse) { + metric.SearchPartial.Inc() + psr.err = &seqproxyapi.Error{ + Code: seqproxyapi.ErrorCode_ERROR_CODE_PARTIAL_RESPONSE, + Message: err.Error(), + } + return psr, nil + } + if err = processSearchErrors(qpr, err); err != nil { + metric.SearchErrors.Inc() + return nil, err + } + + g.tryMirrorRequest(req) + + return psr, nil +} diff --git a/proxyapi/grpc_v1.go b/proxyapi/grpc_v1.go index 90611a29..2679fedc 100644 --- a/proxyapi/grpc_v1.go +++ b/proxyapi/grpc_v1.go @@ -37,6 +37,7 @@ type SearchIngestor interface { CancelAsyncSearch(ctx context.Context, id string) error DeleteAsyncSearch(ctx context.Context, id string) error GetAsyncSearchesList(context.Context, search.GetAsyncSearchesListRequest) ([]*search.AsyncSearchesListItem, error) + OnePhaseSearch(ctx context.Context, sr *search.SearchRequest, tr *querytracer.Tracer) (*seq.QPR, search.DocsIterator, error) } type MappingProvider interface { diff --git a/proxyapi/mock/grpc_v1.go b/proxyapi/mock/grpc_v1.go index 40f1e694..12e3f7ed 100644 --- a/proxyapi/mock/grpc_v1.go +++ b/proxyapi/mock/grpc_v1.go @@ -115,6 +115,22 @@ func (mr *MockSearchIngestorMockRecorder) GetAsyncSearchesList(arg0, arg1 interf return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAsyncSearchesList", reflect.TypeOf((*MockSearchIngestor)(nil).GetAsyncSearchesList), arg0, arg1) } +// OnePhaseSearch mocks base method. +func (m *MockSearchIngestor) OnePhaseSearch(ctx context.Context, sr *search.SearchRequest, tr *querytracer.Tracer) (*seq.QPR, search.DocsIterator, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "OnePhaseSearch", ctx, sr, tr) + ret0, _ := ret[0].(*seq.QPR) + ret1, _ := ret[1].(search.DocsIterator) + ret2, _ := ret[2].(error) + return ret0, ret1, ret2 +} + +// OnePhaseSearch indicates an expected call of OnePhaseSearch. +func (mr *MockSearchIngestorMockRecorder) OnePhaseSearch(ctx, sr, tr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnePhaseSearch", reflect.TypeOf((*MockSearchIngestor)(nil).OnePhaseSearch), ctx, sr, tr) +} + // Search mocks base method. func (m *MockSearchIngestor) Search(ctx context.Context, sr *search.SearchRequest, tr *querytracer.Tracer) (*seq.QPR, search.DocsIterator, time.Duration, error) { m.ctrl.T.Helper() diff --git a/storeapi/client.go b/storeapi/client.go index 3da87929..665b85bf 100644 --- a/storeapi/client.go +++ b/storeapi/client.go @@ -129,3 +129,58 @@ func (i inMemoryAPIClient) Fetch(ctx context.Context, in *storeapi.FetchRequest, func (i inMemoryAPIClient) Status(ctx context.Context, in *storeapi.StatusRequest, _ ...grpc.CallOption) (*storeapi.StatusResponse, error) { return i.store.GrpcV1().Status(ctx, in) } + +type storeAPIOnePhaseSearchServer struct { + grpc.ServerStream + ctx context.Context + buf []*storeapi.OnePhaseSearchResponse +} + +func newStoreAPIOnePhaseSearchServer(ctx context.Context) *storeAPIOnePhaseSearchServer { + return &storeAPIOnePhaseSearchServer{ctx: ctx} +} + +func (x *storeAPIOnePhaseSearchServer) Send(m *storeapi.OnePhaseSearchResponse) error { + x.buf = append(x.buf, m.CloneVT()) + return nil +} + +func (x *storeAPIOnePhaseSearchServer) Context() context.Context { + return x.ctx +} + +type storeAPIOnePhaseSearchClient struct { + grpc.ClientStream + buf []*storeapi.OnePhaseSearchResponse + readPos int +} + +func newStoreAPIOnePhaseSearchClient(b []*storeapi.OnePhaseSearchResponse) *storeAPIOnePhaseSearchClient { + return &storeAPIOnePhaseSearchClient{buf: b} +} + +func (x *storeAPIOnePhaseSearchClient) Header() (metadata.MD, error) { + md := make(metadata.MD) + md[consts.StoreProtocolVersionHeader] = []string{config.StoreProtocolVersion2.String()} + return md, nil +} + +func (x *storeAPIOnePhaseSearchClient) Recv() (*storeapi.OnePhaseSearchResponse, error) { + if x.readPos >= len(x.buf) { + return nil, io.EOF + } + + res := x.buf[x.readPos] + x.readPos++ + + return res, nil +} + +func (i inMemoryAPIClient) OnePhaseSearch(ctx context.Context, in *storeapi.OnePhaseSearchRequest, opts ...grpc.CallOption) (storeapi.StoreApi_OnePhaseSearchClient, error) { + s := newStoreAPIOnePhaseSearchServer(ctx) + setProtocolVersionHeader(opts...) + if err := i.store.GrpcV1().OnePhaseSearch(in, s); err != nil { + return nil, err + } + return newStoreAPIOnePhaseSearchClient(s.buf), nil +} diff --git a/storeapi/grpc_fetch.go b/storeapi/grpc_fetch.go index d640618c..a1337be4 100644 --- a/storeapi/grpc_fetch.go +++ b/storeapi/grpc_fetch.go @@ -31,7 +31,17 @@ func (g *GrpcV1) Fetch(req *storeapi.FetchRequest, stream storeapi.StoreApi_Fetc span.AddAttributes(trace.BoolAttribute("explain", req.Explain)) } - err := g.doFetch(ctx, req, stream) + ids, err := extractIDs(req) + if err != nil { + span.SetStatus(trace.Status{Code: 1, Message: err.Error()}) + logger.Error("fetch error", zap.Error(err)) + return fmt.Errorf("ids extract errors: %s", err.Error()) + } + + send := func(block []byte) error { + return stream.Send(&storeapi.BinaryData{Data: block}) + } + err = g.doFetch(ctx, ids, req.FieldsFilter, req.Explain, send) if err != nil { span.SetStatus(trace.Status{Code: 1, Message: err.Error()}) logger.Error("fetch error", zap.Error(err)) @@ -39,7 +49,13 @@ func (g *GrpcV1) Fetch(req *storeapi.FetchRequest, stream storeapi.StoreApi_Fetc return err } -func (g *GrpcV1) doFetch(ctx context.Context, req *storeapi.FetchRequest, stream storeapi.StoreApi_FetchServer) error { +func (g *GrpcV1) doFetch( + ctx context.Context, + ids seq.IDSources, + fieldsFilter *storeapi.FieldsFilter, + explain bool, + send func(block []byte) error, +) error { metric.FetchInFlightQueriesTotal.Inc() defer metric.FetchInFlightQueriesTotal.Dec() @@ -48,11 +64,6 @@ func (g *GrpcV1) doFetch(ctx context.Context, req *storeapi.FetchRequest, stream start := time.Now() - ids, err := extractIDs(req) - if err != nil { - return fmt.Errorf("ids extract errors: %s", err.Error()) - } - notFound := 0 docsFetched := 0 bytesFetched := int64(0) @@ -65,7 +76,7 @@ func (g *GrpcV1) doFetch(ctx context.Context, req *storeapi.FetchRequest, stream buf []byte ) - dp := acquireDocFieldsFilter(req.FieldsFilter) + dp := acquireDocFieldsFilter(fieldsFilter) defer releaseDocFieldsFilter(dp) docsStream := newDocsStream(ctx, ids, g.fetchData.docFetcher, g.fracManager.Fractions()) @@ -93,7 +104,7 @@ func (g *GrpcV1) doFetch(ctx context.Context, req *storeapi.FetchRequest, stream block.SetExt1(uint64(id.ID.MID)) block.SetExt2(uint64(id.ID.RID)) - if err := stream.Send(&storeapi.BinaryData{Data: block}); err != nil { + if err := send(block); err != nil { if util.IsCancelled(ctx) { logger.Info("fetch request is canceled", zap.Int("requested", len(ids)), @@ -124,7 +135,7 @@ func (g *GrpcV1) doFetch(ctx context.Context, req *storeapi.FetchRequest, stream ) } - if req.Explain { + if explain { logger.Info("fetch result", zap.Int("requested", len(ids)), zap.Int("fetched", docsFetched), @@ -139,7 +150,7 @@ func (g *GrpcV1) doFetch(ctx context.Context, req *storeapi.FetchRequest, stream } type docFieldsFilter struct { - filter *storeapi.FetchRequest_FieldsFilter + filter *storeapi.FieldsFilter decoder *insaneJSON.Root decoderBuf []byte @@ -151,7 +162,7 @@ var docFieldsFilterPool = sync.Pool{ }, } -func acquireDocFieldsFilter(filter *storeapi.FetchRequest_FieldsFilter) *docFieldsFilter { +func acquireDocFieldsFilter(filter *storeapi.FieldsFilter) *docFieldsFilter { dp := docFieldsFilterPool.Get().(*docFieldsFilter) if dp.decoder == nil { dp.decoder = insaneJSON.Spawn() diff --git a/storeapi/grpc_one_phase_search.go b/storeapi/grpc_one_phase_search.go new file mode 100644 index 00000000..c3538071 --- /dev/null +++ b/storeapi/grpc_one_phase_search.go @@ -0,0 +1,111 @@ +package storeapi + +import ( + "context" + "fmt" + + "go.opencensus.io/trace" + "go.uber.org/zap" + + "github.com/ozontech/seq-db/logger" + "github.com/ozontech/seq-db/pkg/storeapi" + "github.com/ozontech/seq-db/querytracer" + "github.com/ozontech/seq-db/seq" + "github.com/ozontech/seq-db/tracing" + "github.com/ozontech/seq-db/util" +) + +func (g *GrpcV1) OnePhaseSearch( + req *storeapi.OnePhaseSearchRequest, + stream storeapi.StoreApi_OnePhaseSearchServer, +) error { + ctx, span := tracing.StartSpan(stream.Context(), "store-server/OnePhaseSearch") + defer span.End() + + if span.IsRecordingEvents() { + span.AddAttributes(trace.StringAttribute("request", req.Query)) + span.AddAttributes(trace.Int64Attribute("from", req.From)) + span.AddAttributes(trace.Int64Attribute("to", req.From)) + span.AddAttributes(trace.Int64Attribute("size", req.Size)) + span.AddAttributes(trace.Int64Attribute("offset", req.Offset)) + span.AddAttributes(trace.StringAttribute("offset_id", req.OffsetId)) + span.AddAttributes(trace.BoolAttribute("explain", req.Explain)) + span.AddAttributes(trace.BoolAttribute("with_total", req.WithTotal)) + } + + err := g.doOnePhaseSearch(ctx, req, stream) + if err != nil { + span.SetStatus(trace.Status{Code: 1, Message: err.Error()}) + logger.Error("one phase search error", zap.Error(err)) + } + return err +} + +func (g *GrpcV1) doOnePhaseSearch( + ctx context.Context, + req *storeapi.OnePhaseSearchRequest, + stream storeapi.StoreApi_OnePhaseSearchServer, +) error { + tr := querytracer.New(req.Explain, "store/Search") + data, err := g.doSearch(ctx, &storeapi.SearchRequest{ + Query: req.Query, + From: req.From, + To: req.To, + Size: req.Size, + Offset: req.Offset, + Explain: req.Explain, + WithTotal: req.WithTotal, + Order: req.Order, + OffsetId: req.OffsetId, + }, tr) + if err != nil { + return fmt.Errorf("search error: %w", err) + } + + tr.Done() + if req.Explain && data != nil { + data.Explain = tracerSpanToExplainEntry(tr.ToSpan()) + } + + err = stream.Send(&storeapi.OnePhaseSearchResponse{ + ResponseType: &storeapi.OnePhaseSearchResponse_Header{ + Header: &storeapi.Header{ + Total: data.Total, + Errors: data.Errors, + Code: data.Code, + Explain: data.Explain, + }, + }, + }) + if err != nil { + if util.IsCancelled(ctx) { + logger.Info("one phase search request is canceled") + return nil + } + return fmt.Errorf("error sending fetched docs: %w", err) + } + + ids := make(seq.IDSources, 0, len(data.IdSources)) + for _, id := range data.IdSources { + ids = append(ids, seq.IDSource{ + ID: seq.ID{MID: seq.MID(id.Id.Mid), RID: seq.RID(id.Id.Rid)}, + Hint: id.Hint, + }) + } + + send := func(block []byte) error { + return stream.Send(&storeapi.OnePhaseSearchResponse{ + ResponseType: &storeapi.OnePhaseSearchResponse_Document{ + Document: &storeapi.Document{ + Data: &storeapi.BinaryData{Data: block}, + }, + }, + }) + } + err = g.doFetch(ctx, ids, req.FieldsFilter, req.Explain, send) + if err != nil { + return fmt.Errorf("fetch error: %w", err) + } + + return nil +} From 24d863fcd8a8d0e33c394bfae970411c63cef86c Mon Sep 17 00:00:00 2001 From: Daniil Forshev Date: Tue, 14 Apr 2026 14:09:24 +0500 Subject: [PATCH 2/4] feat: add stats pipe --- parser/seqql_pipes.go | 161 +++++++++++++++++++++++++++++++++- parser/seqql_pipes_test.go | 41 +++++++++ proxyapi/grpc_async_search.go | 25 +++++- proxyapi/grpc_v1.go | 138 ++++++++++++++++++++++++++++- 4 files changed, 361 insertions(+), 4 deletions(-) diff --git a/parser/seqql_pipes.go b/parser/seqql_pipes.go index 6e005472..788fa9d5 100644 --- a/parser/seqql_pipes.go +++ b/parser/seqql_pipes.go @@ -29,6 +29,12 @@ func parsePipes(lex *lexer) ([]Pipe, error) { } pipes = append(pipes, p) fieldFilters++ + case lex.IsKeyword("stats"): + p, err := parsePipeStats(lex) + if err != nil { + return nil, fmt.Errorf("parsing 'stats' pipe: %s", err) + } + pipes = append(pipes, p) default: return nil, fmt.Errorf("unknown pipe: %s", lex.Token) } @@ -62,6 +68,50 @@ func (f *PipeFields) DumpSeqQL(o *strings.Builder) { } } +type StatsAgg struct { + Func string + Field string + GroupBy string + Interval string + Quantiles []float64 +} + +type PipeStats struct { + Aggs []StatsAgg +} + +func (p *PipeStats) Name() string { + return "stats" +} + +func (p *PipeStats) DumpSeqQL(o *strings.Builder) { + o.WriteString("stats ") + for i, agg := range p.Aggs { + if i > 0 { + o.WriteString(", ") + } + o.WriteString(agg.Func) + if agg.Field != "" { + o.WriteString("(") + o.WriteString(quoteTokenIfNeeded(agg.Field)) + for _, q := range agg.Quantiles { + o.WriteString(fmt.Sprintf(", %v", q)) + } + o.WriteString(")") + } + if agg.GroupBy != "" { + o.WriteString(" by (") + o.WriteString(quoteTokenIfNeeded(agg.GroupBy)) + o.WriteString(")") + } + if agg.Interval != "" { + o.WriteString(" interval(") + o.WriteString(agg.Interval) + o.WriteString(")") + } + } +} + func parsePipeFields(lex *lexer) (*PipeFields, error) { if !lex.IsKeyword("fields") { return nil, fmt.Errorf("missing 'fields' keyword") @@ -85,6 +135,115 @@ func parsePipeFields(lex *lexer) (*PipeFields, error) { }, nil } +func parsePipeStats(lex *lexer) (*PipeStats, error) { + if !lex.IsKeyword("stats") { + return nil, fmt.Errorf("missing 'stats' keyword") + } + lex.Next() + + var aggs []StatsAgg + for { + agg, err := parseStatsAgg(lex) + if err != nil { + return nil, err + } + aggs = append(aggs, agg) + + if !lex.IsKeyword(",") { + break + } + lex.Next() + } + + if len(aggs) == 0 { + return nil, fmt.Errorf("at least one aggregation is required") + } + + return &PipeStats{Aggs: aggs}, nil +} + +func parseStatsAgg(lex *lexer) (StatsAgg, error) { + var agg StatsAgg + + if !lex.IsKeywords("count", "sum", "min", "max", "avg", "quantile", "unique", "unique_count") { + return agg, fmt.Errorf("expected aggregation function (count, sum, min, max, avg, quantile, unique, unique_count), got %s", lex.Token) + } + agg.Func = strings.ToLower(lex.Token) + lex.Next() + + if lex.IsKeyword("(") { + lex.Next() + field, err := parseCompositeTokenReplaceWildcards(lex) + if err != nil { + return agg, err + } + agg.Field = field + + for lex.IsKeyword(",") { + lex.Next() + q, err := parseNumber(lex) + if err != nil { + return agg, fmt.Errorf("failed to parse quantile: %w", err) + } + agg.Quantiles = append(agg.Quantiles, q) + } + + if !lex.IsKeyword(")") { + return agg, fmt.Errorf("expected ')' after field, got %s", lex.Token) + } + lex.Next() + } + + if lex.IsKeyword("by") { + lex.Next() + if !lex.IsKeyword("(") { + return agg, fmt.Errorf("expected '(' after 'by', got %s", lex.Token) + } + lex.Next() + groupBy, err := parseCompositeTokenReplaceWildcards(lex) + if err != nil { + return agg, err + } + agg.GroupBy = groupBy + if !lex.IsKeyword(")") { + return agg, fmt.Errorf("expected ')' after groupBy, got %s", lex.Token) + } + lex.Next() + } + + if lex.IsKeyword("interval") { + lex.Next() + if !lex.IsKeyword("(") { + return agg, fmt.Errorf("expected '(' after 'interval', got %s", lex.Token) + } + lex.Next() + interval := lex.Token + if interval == "" { + return agg, fmt.Errorf("expected interval value, got %s", lex.Token) + } + agg.Interval = interval + lex.Next() + if !lex.IsKeyword(")") { + return agg, fmt.Errorf("expected ')' after interval, got %s", lex.Token) + } + lex.Next() + } + + return agg, nil +} + +func parseNumber(lex *lexer) (float64, error) { + if lex.Token == "" { + return 0, fmt.Errorf("expected number, got empty token") + } + q, err := strconv.ParseFloat(lex.Token, 64) + if err != nil { + return 0, fmt.Errorf("failed to parse number %s: %w", lex.Token, err) + } + lex.Next() + return q, nil +} + func parseFieldList(lex *lexer) ([]string, error) { var fields []string trailingComma := false @@ -149,7 +308,7 @@ var reservedKeywords = uniqueTokens([]string{ "|", // Pipe specific keywords. - "fields", "except", + "fields", "except", "stats", "by", "interval", "unique_count", }) func needQuoteToken(s string) bool { diff --git a/parser/seqql_pipes_test.go b/parser/seqql_pipes_test.go index 2313b20d..41b91891 100644 --- a/parser/seqql_pipes_test.go +++ b/parser/seqql_pipes_test.go @@ -38,3 +38,44 @@ func TestParsePipeFieldsExcept(t *testing.T) { test(`* | fields except "_\\message*"`, `* | fields except "_\\message\*"`) test(`* | fields except k8s_namespace`, `* | fields except k8s_namespace`) } + +func TestParsePipeStats(t *testing.T) { + test := func(q, expected string) { + t.Helper() + query, err := ParseSeqQL(q, nil) + require.NoError(t, err) + require.Equal(t, expected, query.SeqQLString()) + } + + test("service:my-service | stats count by (service)", "service:my-service | stats count by (service)") + test("service:my-service | stats sum(level) by (service)", "service:my-service | stats sum(level) by (service)") + test("service:my-service | stats count by (service) interval(1m)", "service:my-service | stats count by (service) interval(1m)") + test("service:my-service | stats min(response_time) by (service)", "service:my-service | stats min(response_time) by (service)") + test("service:my-service | stats max(response_time) by (service)", "service:my-service | stats max(response_time) by (service)") + test("service:my-service | stats avg(response_time) by (service)", "service:my-service | stats avg(response_time) by (service)") + test("service:my-service | stats unique by (service)", "service:my-service | stats unique by (service)") + test("service:my-service | stats unique_count by (service)", "service:my-service | stats unique_count by (service)") +} + +func TestParsePipeStatsMultiple(t *testing.T) { + test := func(q, expected string) { + t.Helper() + query, err := ParseSeqQL(q, nil) + require.NoError(t, err) + require.Equal(t, expected, query.SeqQLString()) + } + + test("service:my-service | stats count by (service), sum(level) by (service)", "service:my-service | stats count by (service), sum(level) by (service)") + test("service:my-service | stats count by (service) interval(1m), sum(level) by (service) interval(1m)", "service:my-service | stats count by (service) interval(1m), sum(level) by (service) interval(1m)") +} + +func TestParsePipeStatsQuantile(t *testing.T) { + test := func(q, expected string) { + t.Helper() + query, err := ParseSeqQL(q, nil) + require.NoError(t, err) + require.Equal(t, expected, query.SeqQLString()) + } + + test("service:my-service | stats quantile(response_time, 0.5, 0.95) by (service)", "service:my-service | stats quantile(response_time, 0.5, 0.95) by (service)") +} diff --git a/proxyapi/grpc_async_search.go b/proxyapi/grpc_async_search.go index cd58d09f..6e32dbc0 100644 --- a/proxyapi/grpc_async_search.go +++ b/proxyapi/grpc_async_search.go @@ -33,9 +33,30 @@ func (g *grpcV1) StartAsyncSearch( return nil, status.Error(codes.InvalidArgument, "can't serve empty request: fill aggs, hist or withDocs") } - aggs, err := convertAggsQuery(r.Aggs) + statsAggs, err := ExtractStatsPipes(r.GetQuery().GetQuery()) if err != nil { - return nil, err + return nil, status.Errorf(codes.InvalidArgument, "failed to parse stats pipe: %v", err) + } + + hasAggsParam := len(r.Aggs) > 0 + hasStatsPipe := len(statsAggs) > 0 + + if hasAggsParam && hasStatsPipe { + return nil, status.Error(codes.InvalidArgument, + "aggregation can be specified either via 'aggs' parameter or 'stats' pipe, not both") + } + + var aggs []search.AggQuery + if hasStatsPipe { + aggs, err = ConvertStatsPipesToAggs(statsAggs) + if err != nil { + return nil, err + } + } else if hasAggsParam { + aggs, err = convertAggsQuery(r.Aggs) + if err != nil { + return nil, err + } } var histInterval time.Duration diff --git a/proxyapi/grpc_v1.go b/proxyapi/grpc_v1.go index 2679fedc..65cf91e0 100644 --- a/proxyapi/grpc_v1.go +++ b/proxyapi/grpc_v1.go @@ -21,6 +21,7 @@ import ( "github.com/ozontech/seq-db/consts" "github.com/ozontech/seq-db/logger" "github.com/ozontech/seq-db/metric" + "github.com/ozontech/seq-db/parser" "github.com/ozontech/seq-db/pkg/seqproxyapi/v1" "github.com/ozontech/seq-db/proxy/search" "github.com/ozontech/seq-db/querytracer" @@ -245,7 +246,26 @@ func (g *grpcV1) doSearch( Order: req.Order.MustDocsOrder(), } - if len(req.Aggs) > 0 { + statsAggs, err := ExtractStatsPipes(req.Query.Query) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "failed to parse stats pipe: %v", err) + } + + hasAggsParam := len(req.Aggs) > 0 + hasStatsPipe := len(statsAggs) > 0 + + if hasAggsParam && hasStatsPipe { + return nil, status.Error(codes.InvalidArgument, + "aggregation can be specified either via 'aggs' parameter or 'stats' pipe, not both") + } + + if hasStatsPipe { + aggs, err := ConvertStatsPipesToAggs(statsAggs) + if err != nil { + return nil, err + } + proxyReq.AggQ = aggs + } else if hasAggsParam { aggs, err := convertAggsQuery(req.Aggs) if err != nil { return nil, err @@ -453,3 +473,119 @@ func shouldFailPartialResponse(ctx context.Context) bool { func shouldHaveResponse(code seqproxyapi.ErrorCode) bool { return code == seqproxyapi.ErrorCode_ERROR_CODE_NO || code == seqproxyapi.ErrorCode_ERROR_CODE_PARTIAL_RESPONSE } + +func ExtractStatsPipes(query string) ([]parser.StatsAgg, error) { + if query == "" { + return nil, nil + } + + seqql, err := parser.ParseSeqQL(query, nil) + if err != nil { + return nil, err + } + + var result []parser.StatsAgg + for _, pipe := range seqql.Pipes { + statsPipe, ok := pipe.(*parser.PipeStats) + if !ok { + continue + } + result = append(result, statsPipe.Aggs...) + } + return result, nil +} + +func ConvertStatsPipesToAggs(statsAggs []parser.StatsAgg) ([]search.AggQuery, error) { + var result []search.AggQuery + for _, agg := range statsAggs { + aggFunc, err := convertFuncToSeqAggFunc(agg.Func) + if err != nil { + return nil, err + } + + searchAgg := search.AggQuery{ + Field: agg.Field, + GroupBy: agg.GroupBy, + Func: aggFunc, + Quantiles: agg.Quantiles, + } + + if agg.Interval != "" { + interval, err := util.ParseDuration(agg.Interval) + if err != nil { + return nil, status.Errorf( + codes.InvalidArgument, + "failed to parse 'interval': %v", + err, + ) + } + searchAgg.Interval = seq.MID(interval.Nanoseconds()) + } + + if err := validateSearchAgg(&searchAgg); err != nil { + return nil, err + } + + result = append(result, searchAgg) + } + return result, nil +} + +func convertFuncToSeqAggFunc(funcName string) (seq.AggFunc, error) { + switch funcName { + case "count": + return seq.AggFuncCount, nil + case "sum": + return seq.AggFuncSum, nil + case "min": + return seq.AggFuncMin, nil + case "max": + return seq.AggFuncMax, nil + case "avg": + return seq.AggFuncAvg, nil + case "quantile": + return seq.AggFuncQuantile, nil + case "unique": + return seq.AggFuncUnique, nil + case "unique_count": + return seq.AggFuncUniqueCount, nil + default: + return 0, status.Errorf(codes.InvalidArgument, "unknown aggregation function: %s", funcName) + } +} + +func validateSearchAgg(agg *search.AggQuery) error { + switch agg.Func { + case seq.AggFuncUnique, seq.AggFuncUniqueCount: + if agg.GroupBy == "" { + return status.Error(codes.InvalidArgument, "'groupBy' must be set for unique/unique_count") + } + if agg.Interval != 0 { + return status.Error( + codes.InvalidArgument, + "'unique' and 'unique_count' aggregations do not support timeseries", + ) + } + case seq.AggFuncQuantile: + if agg.Field == "" { + return status.Error(codes.InvalidArgument, "'field' must be set for quantile") + } + if len(agg.Quantiles) == 0 { + return status.Error(codes.InvalidArgument, "quantile aggregation must contain at least one quantile") + } + for _, q := range agg.Quantiles { + if q < 0 || q > 1 { + return status.Error(codes.InvalidArgument, "quantile must be between 0 and 1") + } + } + case seq.AggFuncCount: + if agg.GroupBy == "" && agg.Field == "" { + return status.Error(codes.InvalidArgument, "'groupBy' or 'field' must be set for count") + } + case seq.AggFuncSum, seq.AggFuncMin, seq.AggFuncMax, seq.AggFuncAvg: + if agg.Field == "" { + return status.Errorf(codes.InvalidArgument, "'field' must be set for %s", agg.Func.String()) + } + } + return nil +} From 64a9b266cd0c4fcd2c1f6e9ddaa690b1d04838b8 Mon Sep 17 00:00:00 2001 From: Daniil Forshev Date: Tue, 21 Apr 2026 17:37:38 +0500 Subject: [PATCH 3/4] feat(one phase search): new grcp api on storeapi/ --- api/seqproxyapi/v1/seq_proxy_api.proto | 2 +- api/storeapi/store_api.proto | 42 +- parser/seqql_pipes.go | 2 +- pkg/seqproxyapi/v1/seq_proxy_api.pb.go | 24 +- .../v1/seq_proxy_api_vtproto.pb.go | 10 +- pkg/storeapi/store_api.pb.go | 642 ++- pkg/storeapi/store_api_vtproto.pb.go | 3978 +++++++++++------ proxy/search/one_phase_search.go | 117 +- proxyapi/grpc_one_phase_search.go | 138 +- proxyapi/grpc_v1.go | 2 +- proxyapi/mock/grpc_v1.go | 7 +- storeapi/grpc_one_phase_search.go | 243 +- 12 files changed, 3537 insertions(+), 1670 deletions(-) diff --git a/api/seqproxyapi/v1/seq_proxy_api.proto b/api/seqproxyapi/v1/seq_proxy_api.proto index 659c05e5..d0226cb7 100644 --- a/api/seqproxyapi/v1/seq_proxy_api.proto +++ b/api/seqproxyapi/v1/seq_proxy_api.proto @@ -112,7 +112,7 @@ service SeqProxyApi { }; } - rpc OnePhaseSearch(SearchRequest) returns (SearchResponse) { + rpc OnePhaseSearch(SearchRequest) returns (ComplexSearchResponse) { option (google.api.http) = { post: "/one-phase-search" body: "*" diff --git a/api/storeapi/store_api.proto b/api/storeapi/store_api.proto index 3747f040..25351de4 100644 --- a/api/storeapi/store_api.proto +++ b/api/storeapi/store_api.proto @@ -267,8 +267,8 @@ message StatusResponse { message OnePhaseSearchRequest { string query = 1; - int64 from = 2; - int64 to = 3; + google.protobuf.Timestamp from = 2; + google.protobuf.Timestamp to = 3; int64 size = 4; int64 offset = 5; bool explain = 6; @@ -281,17 +281,43 @@ message OnePhaseSearchRequest { message OnePhaseSearchResponse { oneof ResponseType { Header header = 1; - Document document = 2; + RecordsBatch batch = 2; } } -message Document { - BinaryData data = 1; +message Header { + Metadata metadata = 1; + repeated Typing typing = 2; } -message Header { +message Metadata { uint64 total = 1; - repeated string errors = 2; - SearchErrorCode code = 3; + SearchErrorCode code = 2; + repeated string errors = 3; optional ExplainEntry explain = 4; } + +enum DataType { + BYTES = 0; + RAW_DOCUMENT = 1; + STRING = 2; + UINT32 = 3; + UINT64 = 4; + INT32 = 5; + INT64 = 6; + FLOAT64 = 7; + // TODO: array data types: StringArray, Uin64Array, Float64Array etc. +} + +message Typing { + string title = 1; + DataType type = 2; +} + +message RecordsBatch { + repeated Record records = 1; +} + +message Record { + repeated bytes raw_data = 1; +} diff --git a/parser/seqql_pipes.go b/parser/seqql_pipes.go index 788fa9d5..81553bec 100644 --- a/parser/seqql_pipes.go +++ b/parser/seqql_pipes.go @@ -95,7 +95,7 @@ func (p *PipeStats) DumpSeqQL(o *strings.Builder) { o.WriteString("(") o.WriteString(quoteTokenIfNeeded(agg.Field)) for _, q := range agg.Quantiles { - o.WriteString(fmt.Sprintf(", %v", q)) + fmt.Fprintf(o, ", %v", q) } o.WriteString(")") } diff --git a/pkg/seqproxyapi/v1/seq_proxy_api.pb.go b/pkg/seqproxyapi/v1/seq_proxy_api.pb.go index 9665df6b..88acb4b7 100644 --- a/pkg/seqproxyapi/v1/seq_proxy_api.pb.go +++ b/pkg/seqproxyapi/v1/seq_proxy_api.pb.go @@ -3042,7 +3042,7 @@ var file_seqproxyapi_v1_seq_proxy_api_proto_rawDesc = string([]byte{ 0x19, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x03, 0x32, 0x87, 0x0d, 0x0a, 0x0b, 0x53, 0x65, 0x71, + 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x03, 0x32, 0x8e, 0x0d, 0x0a, 0x0b, 0x53, 0x65, 0x71, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x41, 0x70, 0x69, 0x12, 0x5b, 0x0a, 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, @@ -3140,18 +3140,18 @@ var file_seqproxyapi_v1_seq_proxy_api_proto_rawDesc = string([]byte{ 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x2d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x73, 0x2f, 0x6c, - 0x69, 0x73, 0x74, 0x12, 0x6d, 0x0a, 0x0e, 0x4f, 0x6e, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x53, + 0x69, 0x73, 0x74, 0x12, 0x74, 0x0a, 0x0e, 0x4f, 0x6e, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, - 0x11, 0x2f, 0x6f, 0x6e, 0x65, 0x2d, 0x70, 0x68, 0x61, 0x73, 0x65, 0x2d, 0x73, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x42, 0x3b, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6f, 0x7a, 0x6f, 0x6e, 0x74, 0x65, 0x63, 0x68, 0x2f, 0x73, 0x65, 0x71, 0x2d, 0x64, 0x62, - 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x73, 0x65, 0x71, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x6f, 0x6e, 0x65, 0x2d, 0x70, 0x68, 0x61, + 0x73, 0x65, 0x2d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x42, 0x3b, 0x5a, 0x39, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x7a, 0x6f, 0x6e, 0x74, 0x65, 0x63, 0x68, + 0x2f, 0x73, 0x65, 0x71, 0x2d, 0x64, 0x62, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x73, 0x65, 0x71, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x65, 0x71, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, }) var ( @@ -3302,7 +3302,7 @@ var file_seqproxyapi_v1_seq_proxy_api_proto_depIdxs = []int32{ 21, // 83: seqproxyapi.v1.SeqProxyApi.CancelAsyncSearch:output_type -> seqproxyapi.v1.CancelAsyncSearchResponse 23, // 84: seqproxyapi.v1.SeqProxyApi.DeleteAsyncSearch:output_type -> seqproxyapi.v1.DeleteAsyncSearchResponse 25, // 85: seqproxyapi.v1.SeqProxyApi.GetAsyncSearchesList:output_type -> seqproxyapi.v1.GetAsyncSearchesListResponse - 14, // 86: seqproxyapi.v1.SeqProxyApi.OnePhaseSearch:output_type -> seqproxyapi.v1.SearchResponse + 15, // 86: seqproxyapi.v1.SeqProxyApi.OnePhaseSearch:output_type -> seqproxyapi.v1.ComplexSearchResponse 73, // [73:87] is the sub-list for method output_type 59, // [59:73] is the sub-list for method input_type 59, // [59:59] is the sub-list for extension type_name diff --git a/pkg/seqproxyapi/v1/seq_proxy_api_vtproto.pb.go b/pkg/seqproxyapi/v1/seq_proxy_api_vtproto.pb.go index 56011acf..0eed09c5 100644 --- a/pkg/seqproxyapi/v1/seq_proxy_api_vtproto.pb.go +++ b/pkg/seqproxyapi/v1/seq_proxy_api_vtproto.pb.go @@ -2098,7 +2098,7 @@ type SeqProxyApiClient interface { DeleteAsyncSearch(ctx context.Context, in *DeleteAsyncSearchRequest, opts ...grpc.CallOption) (*DeleteAsyncSearchResponse, error) // Fetch list of async searches. GetAsyncSearchesList(ctx context.Context, in *GetAsyncSearchesListRequest, opts ...grpc.CallOption) (*GetAsyncSearchesListResponse, error) - OnePhaseSearch(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) + OnePhaseSearch(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*ComplexSearchResponse, error) } type seqProxyApiClient struct { @@ -2272,8 +2272,8 @@ func (c *seqProxyApiClient) GetAsyncSearchesList(ctx context.Context, in *GetAsy return out, nil } -func (c *seqProxyApiClient) OnePhaseSearch(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) { - out := new(SearchResponse) +func (c *seqProxyApiClient) OnePhaseSearch(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*ComplexSearchResponse, error) { + out := new(ComplexSearchResponse) err := c.cc.Invoke(ctx, "/seqproxyapi.v1.SeqProxyApi/OnePhaseSearch", in, out, opts...) if err != nil { return nil, err @@ -2313,7 +2313,7 @@ type SeqProxyApiServer interface { DeleteAsyncSearch(context.Context, *DeleteAsyncSearchRequest) (*DeleteAsyncSearchResponse, error) // Fetch list of async searches. GetAsyncSearchesList(context.Context, *GetAsyncSearchesListRequest) (*GetAsyncSearchesListResponse, error) - OnePhaseSearch(context.Context, *SearchRequest) (*SearchResponse, error) + OnePhaseSearch(context.Context, *SearchRequest) (*ComplexSearchResponse, error) mustEmbedUnimplementedSeqProxyApiServer() } @@ -2360,7 +2360,7 @@ func (UnimplementedSeqProxyApiServer) DeleteAsyncSearch(context.Context, *Delete func (UnimplementedSeqProxyApiServer) GetAsyncSearchesList(context.Context, *GetAsyncSearchesListRequest) (*GetAsyncSearchesListResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAsyncSearchesList not implemented") } -func (UnimplementedSeqProxyApiServer) OnePhaseSearch(context.Context, *SearchRequest) (*SearchResponse, error) { +func (UnimplementedSeqProxyApiServer) OnePhaseSearch(context.Context, *SearchRequest) (*ComplexSearchResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method OnePhaseSearch not implemented") } func (UnimplementedSeqProxyApiServer) mustEmbedUnimplementedSeqProxyApiServer() {} diff --git a/pkg/storeapi/store_api.pb.go b/pkg/storeapi/store_api.pb.go index cbcc21d2..63a2a6e3 100644 --- a/pkg/storeapi/store_api.pb.go +++ b/pkg/storeapi/store_api.pb.go @@ -250,6 +250,70 @@ func (AsyncSearchStatus) EnumDescriptor() ([]byte, []int) { return file_storeapi_store_api_proto_rawDescGZIP(), []int{3} } +type DataType int32 + +const ( + DataType_BYTES DataType = 0 + DataType_RAW_DOCUMENT DataType = 1 + DataType_STRING DataType = 2 + DataType_UINT32 DataType = 3 + DataType_UINT64 DataType = 4 + DataType_INT32 DataType = 5 + DataType_INT64 DataType = 6 + DataType_FLOAT64 DataType = 7 // TODO: array data types: StringArray, Uin64Array, Float64Array etc. +) + +// Enum value maps for DataType. +var ( + DataType_name = map[int32]string{ + 0: "BYTES", + 1: "RAW_DOCUMENT", + 2: "STRING", + 3: "UINT32", + 4: "UINT64", + 5: "INT32", + 6: "INT64", + 7: "FLOAT64", + } + DataType_value = map[string]int32{ + "BYTES": 0, + "RAW_DOCUMENT": 1, + "STRING": 2, + "UINT32": 3, + "UINT64": 4, + "INT32": 5, + "INT64": 6, + "FLOAT64": 7, + } +) + +func (x DataType) Enum() *DataType { + p := new(DataType) + *p = x + return p +} + +func (x DataType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DataType) Descriptor() protoreflect.EnumDescriptor { + return file_storeapi_store_api_proto_enumTypes[4].Descriptor() +} + +func (DataType) Type() protoreflect.EnumType { + return &file_storeapi_store_api_proto_enumTypes[4] +} + +func (x DataType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DataType.Descriptor instead. +func (DataType) EnumDescriptor() ([]byte, []int) { + return file_storeapi_store_api_proto_rawDescGZIP(), []int{4} +} + type BulkRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` @@ -1796,8 +1860,8 @@ func (x *StatusResponse) GetOldestTime() *timestamppb.Timestamp { type OnePhaseSearchRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` - From int64 `protobuf:"varint,2,opt,name=from,proto3" json:"from,omitempty"` - To int64 `protobuf:"varint,3,opt,name=to,proto3" json:"to,omitempty"` + From *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` // TODO: timestamppb + To *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` // TODO: timestamppb Size int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"` Offset int64 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` Explain bool `protobuf:"varint,6,opt,name=explain,proto3" json:"explain,omitempty"` @@ -1846,18 +1910,18 @@ func (x *OnePhaseSearchRequest) GetQuery() string { return "" } -func (x *OnePhaseSearchRequest) GetFrom() int64 { +func (x *OnePhaseSearchRequest) GetFrom() *timestamppb.Timestamp { if x != nil { return x.From } - return 0 + return nil } -func (x *OnePhaseSearchRequest) GetTo() int64 { +func (x *OnePhaseSearchRequest) GetTo() *timestamppb.Timestamp { if x != nil { return x.To } - return 0 + return nil } func (x *OnePhaseSearchRequest) GetSize() int64 { @@ -1914,7 +1978,7 @@ type OnePhaseSearchResponse struct { // Types that are valid to be assigned to ResponseType: // // *OnePhaseSearchResponse_Header - // *OnePhaseSearchResponse_Document + // *OnePhaseSearchResponse_Batch ResponseType isOnePhaseSearchResponse_ResponseType `protobuf_oneof:"ResponseType"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -1966,10 +2030,10 @@ func (x *OnePhaseSearchResponse) GetHeader() *Header { return nil } -func (x *OnePhaseSearchResponse) GetDocument() *Document { +func (x *OnePhaseSearchResponse) GetBatch() *RecordsBatch { if x != nil { - if x, ok := x.ResponseType.(*OnePhaseSearchResponse_Document); ok { - return x.Document + if x, ok := x.ResponseType.(*OnePhaseSearchResponse_Batch); ok { + return x.Batch } } return nil @@ -1983,35 +2047,36 @@ type OnePhaseSearchResponse_Header struct { Header *Header `protobuf:"bytes,1,opt,name=header,proto3,oneof"` } -type OnePhaseSearchResponse_Document struct { - Document *Document `protobuf:"bytes,2,opt,name=document,proto3,oneof"` +type OnePhaseSearchResponse_Batch struct { + Batch *RecordsBatch `protobuf:"bytes,2,opt,name=batch,proto3,oneof"` } func (*OnePhaseSearchResponse_Header) isOnePhaseSearchResponse_ResponseType() {} -func (*OnePhaseSearchResponse_Document) isOnePhaseSearchResponse_ResponseType() {} +func (*OnePhaseSearchResponse_Batch) isOnePhaseSearchResponse_ResponseType() {} -type Document struct { +type Header struct { state protoimpl.MessageState `protogen:"open.v1"` - Data *BinaryData `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Typing []*Typing `protobuf:"bytes,2,rep,name=typing,proto3" json:"typing,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *Document) Reset() { - *x = Document{} +func (x *Header) Reset() { + *x = Header{} mi := &file_storeapi_store_api_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *Document) String() string { +func (x *Header) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Document) ProtoMessage() {} +func (*Header) ProtoMessage() {} -func (x *Document) ProtoReflect() protoreflect.Message { +func (x *Header) ProtoReflect() protoreflect.Message { mi := &file_storeapi_store_api_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2023,42 +2088,49 @@ func (x *Document) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Document.ProtoReflect.Descriptor instead. -func (*Document) Descriptor() ([]byte, []int) { +// Deprecated: Use Header.ProtoReflect.Descriptor instead. +func (*Header) Descriptor() ([]byte, []int) { return file_storeapi_store_api_proto_rawDescGZIP(), []int{24} } -func (x *Document) GetData() *BinaryData { +func (x *Header) GetMetadata() *Metadata { if x != nil { - return x.Data + return x.Metadata } return nil } -type Header struct { +func (x *Header) GetTyping() []*Typing { + if x != nil { + return x.Typing + } + return nil +} + +type Metadata struct { state protoimpl.MessageState `protogen:"open.v1"` Total uint64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` - Errors []string `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"` - Code SearchErrorCode `protobuf:"varint,3,opt,name=code,proto3,enum=api.SearchErrorCode" json:"code,omitempty"` + Code SearchErrorCode `protobuf:"varint,2,opt,name=code,proto3,enum=api.SearchErrorCode" json:"code,omitempty"` + Errors []string `protobuf:"bytes,3,rep,name=errors,proto3" json:"errors,omitempty"` Explain *ExplainEntry `protobuf:"bytes,4,opt,name=explain,proto3,oneof" json:"explain,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *Header) Reset() { - *x = Header{} +func (x *Metadata) Reset() { + *x = Metadata{} mi := &file_storeapi_store_api_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *Header) String() string { +func (x *Metadata) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Header) ProtoMessage() {} +func (*Metadata) ProtoMessage() {} -func (x *Header) ProtoReflect() protoreflect.Message { +func (x *Metadata) ProtoReflect() protoreflect.Message { mi := &file_storeapi_store_api_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2070,35 +2142,175 @@ func (x *Header) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Header.ProtoReflect.Descriptor instead. -func (*Header) Descriptor() ([]byte, []int) { +// Deprecated: Use Metadata.ProtoReflect.Descriptor instead. +func (*Metadata) Descriptor() ([]byte, []int) { return file_storeapi_store_api_proto_rawDescGZIP(), []int{25} } -func (x *Header) GetTotal() uint64 { +func (x *Metadata) GetTotal() uint64 { if x != nil { return x.Total } return 0 } -func (x *Header) GetErrors() []string { +func (x *Metadata) GetCode() SearchErrorCode { + if x != nil { + return x.Code + } + return SearchErrorCode_NO_ERROR +} + +func (x *Metadata) GetErrors() []string { if x != nil { return x.Errors } return nil } -func (x *Header) GetCode() SearchErrorCode { +func (x *Metadata) GetExplain() *ExplainEntry { if x != nil { - return x.Code + return x.Explain } - return SearchErrorCode_NO_ERROR + return nil +} + +type Typing struct { + state protoimpl.MessageState `protogen:"open.v1"` + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Type DataType `protobuf:"varint,2,opt,name=type,proto3,enum=api.DataType" json:"type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *Header) GetExplain() *ExplainEntry { +func (x *Typing) Reset() { + *x = Typing{} + mi := &file_storeapi_store_api_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Typing) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Typing) ProtoMessage() {} + +func (x *Typing) ProtoReflect() protoreflect.Message { + mi := &file_storeapi_store_api_proto_msgTypes[26] if x != nil { - return x.Explain + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Typing.ProtoReflect.Descriptor instead. +func (*Typing) Descriptor() ([]byte, []int) { + return file_storeapi_store_api_proto_rawDescGZIP(), []int{26} +} + +func (x *Typing) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *Typing) GetType() DataType { + if x != nil { + return x.Type + } + return DataType_BYTES +} + +type RecordsBatch struct { + state protoimpl.MessageState `protogen:"open.v1"` + Records []*Record `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RecordsBatch) Reset() { + *x = RecordsBatch{} + mi := &file_storeapi_store_api_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RecordsBatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecordsBatch) ProtoMessage() {} + +func (x *RecordsBatch) ProtoReflect() protoreflect.Message { + mi := &file_storeapi_store_api_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecordsBatch.ProtoReflect.Descriptor instead. +func (*RecordsBatch) Descriptor() ([]byte, []int) { + return file_storeapi_store_api_proto_rawDescGZIP(), []int{27} +} + +func (x *RecordsBatch) GetRecords() []*Record { + if x != nil { + return x.Records + } + return nil +} + +type Record struct { + state protoimpl.MessageState `protogen:"open.v1"` + RawData [][]byte `protobuf:"bytes,1,rep,name=raw_data,json=rawData,proto3" json:"raw_data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Record) Reset() { + *x = Record{} + mi := &file_storeapi_store_api_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Record) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Record) ProtoMessage() {} + +func (x *Record) ProtoReflect() protoreflect.Message { + mi := &file_storeapi_store_api_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Record.ProtoReflect.Descriptor instead. +func (*Record) Descriptor() ([]byte, []int) { + return file_storeapi_store_api_proto_rawDescGZIP(), []int{28} +} + +func (x *Record) GetRawData() [][]byte { + if x != nil { + return x.RawData } return nil } @@ -2113,7 +2325,7 @@ type SearchResponse_Id struct { func (x *SearchResponse_Id) Reset() { *x = SearchResponse_Id{} - mi := &file_storeapi_store_api_proto_msgTypes[26] + mi := &file_storeapi_store_api_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2125,7 +2337,7 @@ func (x *SearchResponse_Id) String() string { func (*SearchResponse_Id) ProtoMessage() {} func (x *SearchResponse_Id) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[26] + mi := &file_storeapi_store_api_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2165,7 +2377,7 @@ type SearchResponse_IdWithHint struct { func (x *SearchResponse_IdWithHint) Reset() { *x = SearchResponse_IdWithHint{} - mi := &file_storeapi_store_api_proto_msgTypes[27] + mi := &file_storeapi_store_api_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2177,7 +2389,7 @@ func (x *SearchResponse_IdWithHint) String() string { func (*SearchResponse_IdWithHint) ProtoMessage() {} func (x *SearchResponse_IdWithHint) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[27] + mi := &file_storeapi_store_api_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2222,7 +2434,7 @@ type SearchResponse_Histogram struct { func (x *SearchResponse_Histogram) Reset() { *x = SearchResponse_Histogram{} - mi := &file_storeapi_store_api_proto_msgTypes[28] + mi := &file_storeapi_store_api_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2234,7 +2446,7 @@ func (x *SearchResponse_Histogram) String() string { func (*SearchResponse_Histogram) ProtoMessage() {} func (x *SearchResponse_Histogram) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[28] + mi := &file_storeapi_store_api_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2310,7 +2522,7 @@ type SearchResponse_Bin struct { func (x *SearchResponse_Bin) Reset() { *x = SearchResponse_Bin{} - mi := &file_storeapi_store_api_proto_msgTypes[29] + mi := &file_storeapi_store_api_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2322,7 +2534,7 @@ func (x *SearchResponse_Bin) String() string { func (*SearchResponse_Bin) ProtoMessage() {} func (x *SearchResponse_Bin) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[29] + mi := &file_storeapi_store_api_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2381,7 +2593,7 @@ type SearchResponse_Agg struct { func (x *SearchResponse_Agg) Reset() { *x = SearchResponse_Agg{} - mi := &file_storeapi_store_api_proto_msgTypes[30] + mi := &file_storeapi_store_api_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2393,7 +2605,7 @@ func (x *SearchResponse_Agg) String() string { func (*SearchResponse_Agg) ProtoMessage() {} func (x *SearchResponse_Agg) ProtoReflect() protoreflect.Message { - mi := &file_storeapi_store_api_proto_msgTypes[30] + mi := &file_storeapi_store_api_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2752,47 +2964,63 @@ var file_storeapi_store_api_proto_rawDesc = string([]byte{ 0x12, 0x3b, 0x0a, 0x0b, 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x0a, 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xad, 0x02, + 0x70, 0x52, 0x0a, 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xe5, 0x02, 0x0a, 0x15, 0x4f, 0x6e, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x12, 0x0a, - 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x66, 0x72, 0x6f, - 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x74, - 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x18, 0x0a, - 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, - 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x5f, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x77, 0x69, 0x74, - 0x68, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x20, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x5f, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, - 0x0c, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x7c, 0x0a, - 0x16, 0x4f, 0x6e, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2b, - 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x48, - 0x00, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x0e, 0x0a, 0x0c, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x2f, 0x0a, 0x08, 0x44, - 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x69, 0x6e, 0x61, - 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x9e, 0x01, 0x0a, - 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x16, 0x0a, - 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x28, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, - 0x30, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x48, 0x00, 0x52, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x88, 0x01, - 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x2a, 0xac, 0x01, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2e, 0x0a, + 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x2a, 0x0a, + 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, + 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x12, + 0x1d, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x09, 0x77, 0x69, 0x74, 0x68, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x20, + 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, + 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0c, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x7a, 0x0a, 0x16, 0x4f, 0x6e, 0x65, 0x50, 0x68, 0x61, 0x73, + 0x65, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x25, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x05, 0x62, 0x61, 0x74, 0x63, + 0x68, 0x42, 0x0e, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x22, 0x58, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x06, 0x74, 0x79, 0x70, 0x69, 0x6e, 0x67, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x79, 0x70, + 0x69, 0x6e, 0x67, 0x52, 0x06, 0x74, 0x79, 0x70, 0x69, 0x6e, 0x67, 0x22, 0xa0, 0x01, 0x0a, 0x08, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x28, + 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, + 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, + 0x12, 0x30, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x48, 0x00, 0x52, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x88, + 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x22, 0x41, + 0x0a, 0x06, 0x54, 0x79, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x21, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x22, 0x35, 0x0a, 0x0c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x12, 0x25, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, + 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x23, 0x0a, 0x06, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x61, 0x77, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x61, 0x77, 0x44, 0x61, 0x74, 0x61, 0x2a, 0xac, 0x01, 0x0a, 0x07, 0x41, 0x67, 0x67, 0x46, 0x75, 0x6e, 0x63, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x47, 0x47, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x5f, 0x53, 0x55, 0x4d, 0x10, 0x01, 0x12, @@ -2829,7 +3057,14 @@ var file_storeapi_store_api_proto_rawDesc = string([]byte{ 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x03, 0x32, 0xeb, 0x05, 0x0a, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x03, 0x2a, 0x6e, 0x0a, 0x08, + 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x42, 0x59, 0x54, 0x45, + 0x53, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x52, 0x41, 0x57, 0x5f, 0x44, 0x4f, 0x43, 0x55, 0x4d, + 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, + 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x03, 0x12, 0x0a, 0x0a, + 0x06, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, + 0x33, 0x32, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x06, 0x12, + 0x0b, 0x0a, 0x07, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x36, 0x34, 0x10, 0x07, 0x32, 0xeb, 0x05, 0x0a, 0x08, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x41, 0x70, 0x69, 0x12, 0x32, 0x0a, 0x04, 0x42, 0x75, 0x6c, 0x6b, 0x12, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x75, 0x6c, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, @@ -2895,126 +3130,135 @@ func file_storeapi_store_api_proto_rawDescGZIP() []byte { return file_storeapi_store_api_proto_rawDescData } -var file_storeapi_store_api_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_storeapi_store_api_proto_msgTypes = make([]protoimpl.MessageInfo, 34) +var file_storeapi_store_api_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_storeapi_store_api_proto_msgTypes = make([]protoimpl.MessageInfo, 37) var file_storeapi_store_api_proto_goTypes = []any{ (AggFunc)(0), // 0: api.AggFunc (Order)(0), // 1: api.Order (SearchErrorCode)(0), // 2: api.SearchErrorCode (AsyncSearchStatus)(0), // 3: api.AsyncSearchStatus - (*BulkRequest)(nil), // 4: api.BulkRequest - (*BinaryData)(nil), // 5: api.BinaryData - (*AggQuery)(nil), // 6: api.AggQuery - (*SearchRequest)(nil), // 7: api.SearchRequest - (*SearchResponse)(nil), // 8: api.SearchResponse - (*ExplainEntry)(nil), // 9: api.ExplainEntry - (*StartAsyncSearchRequest)(nil), // 10: api.StartAsyncSearchRequest - (*StartAsyncSearchResponse)(nil), // 11: api.StartAsyncSearchResponse - (*FetchAsyncSearchResultRequest)(nil), // 12: api.FetchAsyncSearchResultRequest - (*FetchAsyncSearchResultResponse)(nil), // 13: api.FetchAsyncSearchResultResponse - (*CancelAsyncSearchRequest)(nil), // 14: api.CancelAsyncSearchRequest - (*CancelAsyncSearchResponse)(nil), // 15: api.CancelAsyncSearchResponse - (*DeleteAsyncSearchRequest)(nil), // 16: api.DeleteAsyncSearchRequest - (*DeleteAsyncSearchResponse)(nil), // 17: api.DeleteAsyncSearchResponse - (*GetAsyncSearchesListRequest)(nil), // 18: api.GetAsyncSearchesListRequest - (*GetAsyncSearchesListResponse)(nil), // 19: api.GetAsyncSearchesListResponse - (*AsyncSearchesListItem)(nil), // 20: api.AsyncSearchesListItem - (*IdWithHint)(nil), // 21: api.IdWithHint - (*FieldsFilter)(nil), // 22: api.FieldsFilter - (*FetchRequest)(nil), // 23: api.FetchRequest - (*StatusRequest)(nil), // 24: api.StatusRequest - (*StatusResponse)(nil), // 25: api.StatusResponse - (*OnePhaseSearchRequest)(nil), // 26: api.OnePhaseSearchRequest - (*OnePhaseSearchResponse)(nil), // 27: api.OnePhaseSearchResponse - (*Document)(nil), // 28: api.Document + (DataType)(0), // 4: api.DataType + (*BulkRequest)(nil), // 5: api.BulkRequest + (*BinaryData)(nil), // 6: api.BinaryData + (*AggQuery)(nil), // 7: api.AggQuery + (*SearchRequest)(nil), // 8: api.SearchRequest + (*SearchResponse)(nil), // 9: api.SearchResponse + (*ExplainEntry)(nil), // 10: api.ExplainEntry + (*StartAsyncSearchRequest)(nil), // 11: api.StartAsyncSearchRequest + (*StartAsyncSearchResponse)(nil), // 12: api.StartAsyncSearchResponse + (*FetchAsyncSearchResultRequest)(nil), // 13: api.FetchAsyncSearchResultRequest + (*FetchAsyncSearchResultResponse)(nil), // 14: api.FetchAsyncSearchResultResponse + (*CancelAsyncSearchRequest)(nil), // 15: api.CancelAsyncSearchRequest + (*CancelAsyncSearchResponse)(nil), // 16: api.CancelAsyncSearchResponse + (*DeleteAsyncSearchRequest)(nil), // 17: api.DeleteAsyncSearchRequest + (*DeleteAsyncSearchResponse)(nil), // 18: api.DeleteAsyncSearchResponse + (*GetAsyncSearchesListRequest)(nil), // 19: api.GetAsyncSearchesListRequest + (*GetAsyncSearchesListResponse)(nil), // 20: api.GetAsyncSearchesListResponse + (*AsyncSearchesListItem)(nil), // 21: api.AsyncSearchesListItem + (*IdWithHint)(nil), // 22: api.IdWithHint + (*FieldsFilter)(nil), // 23: api.FieldsFilter + (*FetchRequest)(nil), // 24: api.FetchRequest + (*StatusRequest)(nil), // 25: api.StatusRequest + (*StatusResponse)(nil), // 26: api.StatusResponse + (*OnePhaseSearchRequest)(nil), // 27: api.OnePhaseSearchRequest + (*OnePhaseSearchResponse)(nil), // 28: api.OnePhaseSearchResponse (*Header)(nil), // 29: api.Header - (*SearchResponse_Id)(nil), // 30: api.SearchResponse.Id - (*SearchResponse_IdWithHint)(nil), // 31: api.SearchResponse.IdWithHint - (*SearchResponse_Histogram)(nil), // 32: api.SearchResponse.Histogram - (*SearchResponse_Bin)(nil), // 33: api.SearchResponse.Bin - (*SearchResponse_Agg)(nil), // 34: api.SearchResponse.Agg - nil, // 35: api.SearchResponse.HistogramEntry - nil, // 36: api.SearchResponse.Agg.AggEntry - nil, // 37: api.SearchResponse.Agg.AggHistogramEntry - (*durationpb.Duration)(nil), // 38: google.protobuf.Duration - (*timestamppb.Timestamp)(nil), // 39: google.protobuf.Timestamp - (*emptypb.Empty)(nil), // 40: google.protobuf.Empty + (*Metadata)(nil), // 30: api.Metadata + (*Typing)(nil), // 31: api.Typing + (*RecordsBatch)(nil), // 32: api.RecordsBatch + (*Record)(nil), // 33: api.Record + (*SearchResponse_Id)(nil), // 34: api.SearchResponse.Id + (*SearchResponse_IdWithHint)(nil), // 35: api.SearchResponse.IdWithHint + (*SearchResponse_Histogram)(nil), // 36: api.SearchResponse.Histogram + (*SearchResponse_Bin)(nil), // 37: api.SearchResponse.Bin + (*SearchResponse_Agg)(nil), // 38: api.SearchResponse.Agg + nil, // 39: api.SearchResponse.HistogramEntry + nil, // 40: api.SearchResponse.Agg.AggEntry + nil, // 41: api.SearchResponse.Agg.AggHistogramEntry + (*durationpb.Duration)(nil), // 42: google.protobuf.Duration + (*timestamppb.Timestamp)(nil), // 43: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 44: google.protobuf.Empty } var file_storeapi_store_api_proto_depIdxs = []int32{ 0, // 0: api.AggQuery.func:type_name -> api.AggFunc - 6, // 1: api.SearchRequest.aggs:type_name -> api.AggQuery + 7, // 1: api.SearchRequest.aggs:type_name -> api.AggQuery 1, // 2: api.SearchRequest.order:type_name -> api.Order - 31, // 3: api.SearchResponse.id_sources:type_name -> api.SearchResponse.IdWithHint - 35, // 4: api.SearchResponse.histogram:type_name -> api.SearchResponse.HistogramEntry - 34, // 5: api.SearchResponse.aggs:type_name -> api.SearchResponse.Agg + 35, // 3: api.SearchResponse.id_sources:type_name -> api.SearchResponse.IdWithHint + 39, // 4: api.SearchResponse.histogram:type_name -> api.SearchResponse.HistogramEntry + 38, // 5: api.SearchResponse.aggs:type_name -> api.SearchResponse.Agg 2, // 6: api.SearchResponse.code:type_name -> api.SearchErrorCode - 9, // 7: api.SearchResponse.explain:type_name -> api.ExplainEntry - 38, // 8: api.ExplainEntry.duration:type_name -> google.protobuf.Duration - 9, // 9: api.ExplainEntry.children:type_name -> api.ExplainEntry - 38, // 10: api.StartAsyncSearchRequest.retention:type_name -> google.protobuf.Duration - 6, // 11: api.StartAsyncSearchRequest.aggs:type_name -> api.AggQuery + 10, // 7: api.SearchResponse.explain:type_name -> api.ExplainEntry + 42, // 8: api.ExplainEntry.duration:type_name -> google.protobuf.Duration + 10, // 9: api.ExplainEntry.children:type_name -> api.ExplainEntry + 42, // 10: api.StartAsyncSearchRequest.retention:type_name -> google.protobuf.Duration + 7, // 11: api.StartAsyncSearchRequest.aggs:type_name -> api.AggQuery 1, // 12: api.FetchAsyncSearchResultRequest.order:type_name -> api.Order 3, // 13: api.FetchAsyncSearchResultResponse.status:type_name -> api.AsyncSearchStatus - 8, // 14: api.FetchAsyncSearchResultResponse.response:type_name -> api.SearchResponse - 39, // 15: api.FetchAsyncSearchResultResponse.started_at:type_name -> google.protobuf.Timestamp - 39, // 16: api.FetchAsyncSearchResultResponse.expires_at:type_name -> google.protobuf.Timestamp - 39, // 17: api.FetchAsyncSearchResultResponse.canceled_at:type_name -> google.protobuf.Timestamp - 6, // 18: api.FetchAsyncSearchResultResponse.aggs:type_name -> api.AggQuery - 39, // 19: api.FetchAsyncSearchResultResponse.from:type_name -> google.protobuf.Timestamp - 39, // 20: api.FetchAsyncSearchResultResponse.to:type_name -> google.protobuf.Timestamp - 38, // 21: api.FetchAsyncSearchResultResponse.retention:type_name -> google.protobuf.Duration + 9, // 14: api.FetchAsyncSearchResultResponse.response:type_name -> api.SearchResponse + 43, // 15: api.FetchAsyncSearchResultResponse.started_at:type_name -> google.protobuf.Timestamp + 43, // 16: api.FetchAsyncSearchResultResponse.expires_at:type_name -> google.protobuf.Timestamp + 43, // 17: api.FetchAsyncSearchResultResponse.canceled_at:type_name -> google.protobuf.Timestamp + 7, // 18: api.FetchAsyncSearchResultResponse.aggs:type_name -> api.AggQuery + 43, // 19: api.FetchAsyncSearchResultResponse.from:type_name -> google.protobuf.Timestamp + 43, // 20: api.FetchAsyncSearchResultResponse.to:type_name -> google.protobuf.Timestamp + 42, // 21: api.FetchAsyncSearchResultResponse.retention:type_name -> google.protobuf.Duration 3, // 22: api.GetAsyncSearchesListRequest.status:type_name -> api.AsyncSearchStatus - 20, // 23: api.GetAsyncSearchesListResponse.searches:type_name -> api.AsyncSearchesListItem + 21, // 23: api.GetAsyncSearchesListResponse.searches:type_name -> api.AsyncSearchesListItem 3, // 24: api.AsyncSearchesListItem.status:type_name -> api.AsyncSearchStatus - 39, // 25: api.AsyncSearchesListItem.started_at:type_name -> google.protobuf.Timestamp - 39, // 26: api.AsyncSearchesListItem.expires_at:type_name -> google.protobuf.Timestamp - 39, // 27: api.AsyncSearchesListItem.canceled_at:type_name -> google.protobuf.Timestamp - 6, // 28: api.AsyncSearchesListItem.aggs:type_name -> api.AggQuery - 39, // 29: api.AsyncSearchesListItem.from:type_name -> google.protobuf.Timestamp - 39, // 30: api.AsyncSearchesListItem.to:type_name -> google.protobuf.Timestamp - 38, // 31: api.AsyncSearchesListItem.retention:type_name -> google.protobuf.Duration - 21, // 32: api.FetchRequest.ids_with_hints:type_name -> api.IdWithHint - 22, // 33: api.FetchRequest.fields_filter:type_name -> api.FieldsFilter - 39, // 34: api.StatusResponse.oldest_time:type_name -> google.protobuf.Timestamp - 1, // 35: api.OnePhaseSearchRequest.order:type_name -> api.Order - 22, // 36: api.OnePhaseSearchRequest.fields_filter:type_name -> api.FieldsFilter - 29, // 37: api.OnePhaseSearchResponse.header:type_name -> api.Header - 28, // 38: api.OnePhaseSearchResponse.document:type_name -> api.Document - 5, // 39: api.Document.data:type_name -> api.BinaryData - 2, // 40: api.Header.code:type_name -> api.SearchErrorCode - 9, // 41: api.Header.explain:type_name -> api.ExplainEntry - 30, // 42: api.SearchResponse.IdWithHint.id:type_name -> api.SearchResponse.Id - 39, // 43: api.SearchResponse.Bin.ts:type_name -> google.protobuf.Timestamp - 32, // 44: api.SearchResponse.Bin.hist:type_name -> api.SearchResponse.Histogram - 36, // 45: api.SearchResponse.Agg.agg:type_name -> api.SearchResponse.Agg.AggEntry - 37, // 46: api.SearchResponse.Agg.agg_histogram:type_name -> api.SearchResponse.Agg.AggHistogramEntry - 33, // 47: api.SearchResponse.Agg.timeseries:type_name -> api.SearchResponse.Bin - 32, // 48: api.SearchResponse.Agg.AggHistogramEntry.value:type_name -> api.SearchResponse.Histogram - 4, // 49: api.StoreApi.Bulk:input_type -> api.BulkRequest - 7, // 50: api.StoreApi.Search:input_type -> api.SearchRequest - 10, // 51: api.StoreApi.StartAsyncSearch:input_type -> api.StartAsyncSearchRequest - 12, // 52: api.StoreApi.FetchAsyncSearchResult:input_type -> api.FetchAsyncSearchResultRequest - 14, // 53: api.StoreApi.CancelAsyncSearch:input_type -> api.CancelAsyncSearchRequest - 16, // 54: api.StoreApi.DeleteAsyncSearch:input_type -> api.DeleteAsyncSearchRequest - 18, // 55: api.StoreApi.GetAsyncSearchesList:input_type -> api.GetAsyncSearchesListRequest - 23, // 56: api.StoreApi.Fetch:input_type -> api.FetchRequest - 24, // 57: api.StoreApi.Status:input_type -> api.StatusRequest - 26, // 58: api.StoreApi.OnePhaseSearch:input_type -> api.OnePhaseSearchRequest - 40, // 59: api.StoreApi.Bulk:output_type -> google.protobuf.Empty - 8, // 60: api.StoreApi.Search:output_type -> api.SearchResponse - 11, // 61: api.StoreApi.StartAsyncSearch:output_type -> api.StartAsyncSearchResponse - 13, // 62: api.StoreApi.FetchAsyncSearchResult:output_type -> api.FetchAsyncSearchResultResponse - 15, // 63: api.StoreApi.CancelAsyncSearch:output_type -> api.CancelAsyncSearchResponse - 17, // 64: api.StoreApi.DeleteAsyncSearch:output_type -> api.DeleteAsyncSearchResponse - 19, // 65: api.StoreApi.GetAsyncSearchesList:output_type -> api.GetAsyncSearchesListResponse - 5, // 66: api.StoreApi.Fetch:output_type -> api.BinaryData - 25, // 67: api.StoreApi.Status:output_type -> api.StatusResponse - 27, // 68: api.StoreApi.OnePhaseSearch:output_type -> api.OnePhaseSearchResponse - 59, // [59:69] is the sub-list for method output_type - 49, // [49:59] is the sub-list for method input_type - 49, // [49:49] is the sub-list for extension type_name - 49, // [49:49] is the sub-list for extension extendee - 0, // [0:49] is the sub-list for field type_name + 43, // 25: api.AsyncSearchesListItem.started_at:type_name -> google.protobuf.Timestamp + 43, // 26: api.AsyncSearchesListItem.expires_at:type_name -> google.protobuf.Timestamp + 43, // 27: api.AsyncSearchesListItem.canceled_at:type_name -> google.protobuf.Timestamp + 7, // 28: api.AsyncSearchesListItem.aggs:type_name -> api.AggQuery + 43, // 29: api.AsyncSearchesListItem.from:type_name -> google.protobuf.Timestamp + 43, // 30: api.AsyncSearchesListItem.to:type_name -> google.protobuf.Timestamp + 42, // 31: api.AsyncSearchesListItem.retention:type_name -> google.protobuf.Duration + 22, // 32: api.FetchRequest.ids_with_hints:type_name -> api.IdWithHint + 23, // 33: api.FetchRequest.fields_filter:type_name -> api.FieldsFilter + 43, // 34: api.StatusResponse.oldest_time:type_name -> google.protobuf.Timestamp + 43, // 35: api.OnePhaseSearchRequest.from:type_name -> google.protobuf.Timestamp + 43, // 36: api.OnePhaseSearchRequest.to:type_name -> google.protobuf.Timestamp + 1, // 37: api.OnePhaseSearchRequest.order:type_name -> api.Order + 23, // 38: api.OnePhaseSearchRequest.fields_filter:type_name -> api.FieldsFilter + 29, // 39: api.OnePhaseSearchResponse.header:type_name -> api.Header + 32, // 40: api.OnePhaseSearchResponse.batch:type_name -> api.RecordsBatch + 30, // 41: api.Header.metadata:type_name -> api.Metadata + 31, // 42: api.Header.typing:type_name -> api.Typing + 2, // 43: api.Metadata.code:type_name -> api.SearchErrorCode + 10, // 44: api.Metadata.explain:type_name -> api.ExplainEntry + 4, // 45: api.Typing.type:type_name -> api.DataType + 33, // 46: api.RecordsBatch.records:type_name -> api.Record + 34, // 47: api.SearchResponse.IdWithHint.id:type_name -> api.SearchResponse.Id + 43, // 48: api.SearchResponse.Bin.ts:type_name -> google.protobuf.Timestamp + 36, // 49: api.SearchResponse.Bin.hist:type_name -> api.SearchResponse.Histogram + 40, // 50: api.SearchResponse.Agg.agg:type_name -> api.SearchResponse.Agg.AggEntry + 41, // 51: api.SearchResponse.Agg.agg_histogram:type_name -> api.SearchResponse.Agg.AggHistogramEntry + 37, // 52: api.SearchResponse.Agg.timeseries:type_name -> api.SearchResponse.Bin + 36, // 53: api.SearchResponse.Agg.AggHistogramEntry.value:type_name -> api.SearchResponse.Histogram + 5, // 54: api.StoreApi.Bulk:input_type -> api.BulkRequest + 8, // 55: api.StoreApi.Search:input_type -> api.SearchRequest + 11, // 56: api.StoreApi.StartAsyncSearch:input_type -> api.StartAsyncSearchRequest + 13, // 57: api.StoreApi.FetchAsyncSearchResult:input_type -> api.FetchAsyncSearchResultRequest + 15, // 58: api.StoreApi.CancelAsyncSearch:input_type -> api.CancelAsyncSearchRequest + 17, // 59: api.StoreApi.DeleteAsyncSearch:input_type -> api.DeleteAsyncSearchRequest + 19, // 60: api.StoreApi.GetAsyncSearchesList:input_type -> api.GetAsyncSearchesListRequest + 24, // 61: api.StoreApi.Fetch:input_type -> api.FetchRequest + 25, // 62: api.StoreApi.Status:input_type -> api.StatusRequest + 27, // 63: api.StoreApi.OnePhaseSearch:input_type -> api.OnePhaseSearchRequest + 44, // 64: api.StoreApi.Bulk:output_type -> google.protobuf.Empty + 9, // 65: api.StoreApi.Search:output_type -> api.SearchResponse + 12, // 66: api.StoreApi.StartAsyncSearch:output_type -> api.StartAsyncSearchResponse + 14, // 67: api.StoreApi.FetchAsyncSearchResult:output_type -> api.FetchAsyncSearchResultResponse + 16, // 68: api.StoreApi.CancelAsyncSearch:output_type -> api.CancelAsyncSearchResponse + 18, // 69: api.StoreApi.DeleteAsyncSearch:output_type -> api.DeleteAsyncSearchResponse + 20, // 70: api.StoreApi.GetAsyncSearchesList:output_type -> api.GetAsyncSearchesListResponse + 6, // 71: api.StoreApi.Fetch:output_type -> api.BinaryData + 26, // 72: api.StoreApi.Status:output_type -> api.StatusResponse + 28, // 73: api.StoreApi.OnePhaseSearch:output_type -> api.OnePhaseSearchResponse + 64, // [64:74] is the sub-list for method output_type + 54, // [54:64] is the sub-list for method input_type + 54, // [54:54] is the sub-list for extension type_name + 54, // [54:54] is the sub-list for extension extendee + 0, // [0:54] is the sub-list for field type_name } func init() { file_storeapi_store_api_proto_init() } @@ -3028,7 +3272,7 @@ func file_storeapi_store_api_proto_init() { file_storeapi_store_api_proto_msgTypes[16].OneofWrappers = []any{} file_storeapi_store_api_proto_msgTypes[23].OneofWrappers = []any{ (*OnePhaseSearchResponse_Header)(nil), - (*OnePhaseSearchResponse_Document)(nil), + (*OnePhaseSearchResponse_Batch)(nil), } file_storeapi_store_api_proto_msgTypes[25].OneofWrappers = []any{} type x struct{} @@ -3036,8 +3280,8 @@ func file_storeapi_store_api_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_storeapi_store_api_proto_rawDesc), len(file_storeapi_store_api_proto_rawDesc)), - NumEnums: 4, - NumMessages: 34, + NumEnums: 5, + NumMessages: 37, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/storeapi/store_api_vtproto.pb.go b/pkg/storeapi/store_api_vtproto.pb.go index 7c3ffdf3..6df6a19d 100644 --- a/pkg/storeapi/store_api_vtproto.pb.go +++ b/pkg/storeapi/store_api_vtproto.pb.go @@ -710,8 +710,8 @@ func (m *OnePhaseSearchRequest) CloneVT() *OnePhaseSearchRequest { } r := new(OnePhaseSearchRequest) r.Query = m.Query - r.From = m.From - r.To = m.To + r.From = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.From).CloneVT()) + r.To = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.To).CloneVT()) r.Size = m.Size r.Offset = m.Offset r.Explain = m.Explain @@ -760,21 +760,28 @@ func (m *OnePhaseSearchResponse_Header) CloneVT() isOnePhaseSearchResponse_Respo return r } -func (m *OnePhaseSearchResponse_Document) CloneVT() isOnePhaseSearchResponse_ResponseType { +func (m *OnePhaseSearchResponse_Batch) CloneVT() isOnePhaseSearchResponse_ResponseType { if m == nil { - return (*OnePhaseSearchResponse_Document)(nil) + return (*OnePhaseSearchResponse_Batch)(nil) } - r := new(OnePhaseSearchResponse_Document) - r.Document = m.Document.CloneVT() + r := new(OnePhaseSearchResponse_Batch) + r.Batch = m.Batch.CloneVT() return r } -func (m *Document) CloneVT() *Document { +func (m *Header) CloneVT() *Header { if m == nil { - return (*Document)(nil) + return (*Header)(nil) + } + r := new(Header) + r.Metadata = m.Metadata.CloneVT() + if rhs := m.Typing; rhs != nil { + tmpContainer := make([]*Typing, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Typing = tmpContainer } - r := new(Document) - r.Data = m.Data.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -782,15 +789,15 @@ func (m *Document) CloneVT() *Document { return r } -func (m *Document) CloneMessageVT() proto.Message { +func (m *Header) CloneMessageVT() proto.Message { return m.CloneVT() } -func (m *Header) CloneVT() *Header { +func (m *Metadata) CloneVT() *Metadata { if m == nil { - return (*Header)(nil) + return (*Metadata)(nil) } - r := new(Header) + r := new(Metadata) r.Total = m.Total r.Code = m.Code r.Explain = m.Explain.CloneVT() @@ -806,7 +813,73 @@ func (m *Header) CloneVT() *Header { return r } -func (m *Header) CloneMessageVT() proto.Message { +func (m *Metadata) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Typing) CloneVT() *Typing { + if m == nil { + return (*Typing)(nil) + } + r := new(Typing) + r.Title = m.Title + r.Type = m.Type + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Typing) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *RecordsBatch) CloneVT() *RecordsBatch { + if m == nil { + return (*RecordsBatch)(nil) + } + r := new(RecordsBatch) + if rhs := m.Records; rhs != nil { + tmpContainer := make([]*Record, len(rhs)) + for k, v := range rhs { + tmpContainer[k] = v.CloneVT() + } + r.Records = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *RecordsBatch) CloneMessageVT() proto.Message { + return m.CloneVT() +} + +func (m *Record) CloneVT() *Record { + if m == nil { + return (*Record)(nil) + } + r := new(Record) + if rhs := m.RawData; rhs != nil { + tmpContainer := make([][]byte, len(rhs)) + for k, v := range rhs { + tmpBytes := make([]byte, len(v)) + copy(tmpBytes, v) + tmpContainer[k] = tmpBytes + } + r.RawData = tmpContainer + } + if len(m.unknownFields) > 0 { + r.unknownFields = make([]byte, len(m.unknownFields)) + copy(r.unknownFields, m.unknownFields) + } + return r +} + +func (m *Record) CloneMessageVT() proto.Message { return m.CloneVT() } @@ -1810,10 +1883,10 @@ func (this *OnePhaseSearchRequest) EqualVT(that *OnePhaseSearchRequest) bool { if this.Query != that.Query { return false } - if this.From != that.From { + if !(*timestamppb1.Timestamp)(this.From).EqualVT((*timestamppb1.Timestamp)(that.From)) { return false } - if this.To != that.To { + if !(*timestamppb1.Timestamp)(this.To).EqualVT((*timestamppb1.Timestamp)(that.To)) { return false } if this.Size != that.Size { @@ -1900,8 +1973,8 @@ func (this *OnePhaseSearchResponse_Header) EqualVT(thatIface isOnePhaseSearchRes return true } -func (this *OnePhaseSearchResponse_Document) EqualVT(thatIface isOnePhaseSearchResponse_ResponseType) bool { - that, ok := thatIface.(*OnePhaseSearchResponse_Document) +func (this *OnePhaseSearchResponse_Batch) EqualVT(thatIface isOnePhaseSearchResponse_ResponseType) bool { + that, ok := thatIface.(*OnePhaseSearchResponse_Batch) if !ok { return false } @@ -1911,12 +1984,12 @@ func (this *OnePhaseSearchResponse_Document) EqualVT(thatIface isOnePhaseSearchR if this == nil && that != nil || this != nil && that == nil { return false } - if p, q := this.Document, that.Document; p != q { + if p, q := this.Batch, that.Batch; p != q { if p == nil { - p = &Document{} + p = &RecordsBatch{} } if q == nil { - q = &Document{} + q = &RecordsBatch{} } if !p.EqualVT(q) { return false @@ -1925,26 +1998,43 @@ func (this *OnePhaseSearchResponse_Document) EqualVT(thatIface isOnePhaseSearchR return true } -func (this *Document) EqualVT(that *Document) bool { +func (this *Header) EqualVT(that *Header) bool { if this == that { return true } else if this == nil || that == nil { return false } - if !this.Data.EqualVT(that.Data) { + if !this.Metadata.EqualVT(that.Metadata) { return false } + if len(this.Typing) != len(that.Typing) { + return false + } + for i, vx := range this.Typing { + vy := that.Typing[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &Typing{} + } + if q == nil { + q = &Typing{} + } + if !p.EqualVT(q) { + return false + } + } + } return string(this.unknownFields) == string(that.unknownFields) } -func (this *Document) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*Document) +func (this *Header) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Header) if !ok { return false } return this.EqualVT(that) } -func (this *Header) EqualVT(that *Header) bool { +func (this *Metadata) EqualVT(that *Metadata) bool { if this == that { return true } else if this == nil || that == nil { @@ -1953,6 +2043,9 @@ func (this *Header) EqualVT(that *Header) bool { if this.Total != that.Total { return false } + if this.Code != that.Code { + return false + } if len(this.Errors) != len(that.Errors) { return false } @@ -1962,17 +2055,94 @@ func (this *Header) EqualVT(that *Header) bool { return false } } - if this.Code != that.Code { + if !this.Explain.EqualVT(that.Explain) { return false } - if !this.Explain.EqualVT(that.Explain) { + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Metadata) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Metadata) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Typing) EqualVT(that *Typing) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if this.Title != that.Title { + return false + } + if this.Type != that.Type { return false } return string(this.unknownFields) == string(that.unknownFields) } -func (this *Header) EqualMessageVT(thatMsg proto.Message) bool { - that, ok := thatMsg.(*Header) +func (this *Typing) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Typing) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *RecordsBatch) EqualVT(that *RecordsBatch) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if len(this.Records) != len(that.Records) { + return false + } + for i, vx := range this.Records { + vy := that.Records[i] + if p, q := vx, vy; p != q { + if p == nil { + p = &Record{} + } + if q == nil { + q = &Record{} + } + if !p.EqualVT(q) { + return false + } + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *RecordsBatch) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*RecordsBatch) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *Record) EqualVT(that *Record) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if len(this.RawData) != len(that.RawData) { + return false + } + for i, vx := range this.RawData { + vy := that.RawData[i] + if string(vx) != string(vy) { + return false + } + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *Record) EqualMessageVT(thatMsg proto.Message) bool { + that, ok := thatMsg.(*Record) if !ok { return false } @@ -4333,15 +4503,25 @@ func (m *OnePhaseSearchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) i-- dAtA[i] = 0x20 } - if m.To != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.To)) + if m.To != nil { + size, err := (*timestamppb1.Timestamp)(m.To).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x1a } - if m.From != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.From)) + if m.From != nil { + size, err := (*timestamppb1.Timestamp)(m.From).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } if len(m.Query) > 0 { i -= len(m.Query) @@ -4418,15 +4598,15 @@ func (m *OnePhaseSearchResponse_Header) MarshalToSizedBufferVT(dAtA []byte) (int } return len(dAtA) - i, nil } -func (m *OnePhaseSearchResponse_Document) MarshalToVT(dAtA []byte) (int, error) { +func (m *OnePhaseSearchResponse_Batch) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *OnePhaseSearchResponse_Document) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *OnePhaseSearchResponse_Batch) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) - if m.Document != nil { - size, err := m.Document.MarshalToSizedBufferVT(dAtA[:i]) + if m.Batch != nil { + size, err := m.Batch.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -4441,7 +4621,7 @@ func (m *OnePhaseSearchResponse_Document) MarshalToSizedBufferVT(dAtA []byte) (i } return len(dAtA) - i, nil } -func (m *Document) MarshalVT() (dAtA []byte, err error) { +func (m *Header) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4454,12 +4634,12 @@ func (m *Document) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Document) MarshalToVT(dAtA []byte) (int, error) { +func (m *Header) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Document) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Header) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4471,8 +4651,20 @@ func (m *Document) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Data != nil { - size, err := m.Data.MarshalToSizedBufferVT(dAtA[:i]) + if len(m.Typing) > 0 { + for iNdEx := len(m.Typing) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Typing[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if m.Metadata != nil { + size, err := m.Metadata.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -4484,7 +4676,7 @@ func (m *Document) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Header) MarshalVT() (dAtA []byte, err error) { +func (m *Metadata) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -4497,12 +4689,12 @@ func (m *Header) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Header) MarshalToVT(dAtA []byte) (int, error) { +func (m *Metadata) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Header) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Metadata) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4524,20 +4716,20 @@ func (m *Header) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - if m.Code != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x18 - } if len(m.Errors) > 0 { for iNdEx := len(m.Errors) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Errors[iNdEx]) copy(dAtA[i:], m.Errors[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Errors[iNdEx]))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } } + if m.Code != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x10 + } if m.Total != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) i-- @@ -4546,25 +4738,25 @@ func (m *Header) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *BulkRequest) MarshalVTStrict() (dAtA []byte, err error) { +func (m *Typing) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *BulkRequest) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *Typing) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *BulkRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Typing) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4576,47 +4768,40 @@ func (m *BulkRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Metas) > 0 { - i -= len(m.Metas) - copy(dAtA[i:], m.Metas) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Metas))) - i-- - dAtA[i] = 0x1a - } - if len(m.Docs) > 0 { - i -= len(m.Docs) - copy(dAtA[i:], m.Docs) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Docs))) + if m.Type != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Type)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x10 } - if m.Count != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Count)) + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Title))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *BinaryData) MarshalVTStrict() (dAtA []byte, err error) { +func (m *RecordsBatch) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *BinaryData) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *RecordsBatch) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *BinaryData) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *RecordsBatch) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4628,35 +4813,40 @@ func (m *BinaryData) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0xa + if len(m.Records) > 0 { + for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Records[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } } return len(dAtA) - i, nil } -func (m *AggQuery) MarshalVTStrict() (dAtA []byte, err error) { +func (m *Record) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } size := m.SizeVT() dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (m *AggQuery) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *Record) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *AggQuery) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Record) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -4668,14 +4858,148 @@ func (m *AggQuery) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Interval != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Interval)) - i-- - dAtA[i] = 0x30 + if len(m.RawData) > 0 { + for iNdEx := len(m.RawData) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.RawData[iNdEx]) + copy(dAtA[i:], m.RawData[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RawData[iNdEx]))) + i-- + dAtA[i] = 0xa + } } - if len(m.Quantiles) > 0 { - for iNdEx := len(m.Quantiles) - 1; iNdEx >= 0; iNdEx-- { - f1 := math.Float64bits(float64(m.Quantiles[iNdEx])) + return len(dAtA) - i, nil +} + +func (m *BulkRequest) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BulkRequest) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *BulkRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Metas) > 0 { + i -= len(m.Metas) + copy(dAtA[i:], m.Metas) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Metas))) + i-- + dAtA[i] = 0x1a + } + if len(m.Docs) > 0 { + i -= len(m.Docs) + copy(dAtA[i:], m.Docs) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Docs))) + i-- + dAtA[i] = 0x12 + } + if m.Count != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Count)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *BinaryData) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BinaryData) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *BinaryData) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AggQuery) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AggQuery) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *AggQuery) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Interval != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Interval)) + i-- + dAtA[i] = 0x30 + } + if len(m.Quantiles) > 0 { + for iNdEx := len(m.Quantiles) - 1; iNdEx >= 0; iNdEx-- { + f1 := math.Float64bits(float64(m.Quantiles[iNdEx])) i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) } @@ -6430,15 +6754,25 @@ func (m *OnePhaseSearchRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, i-- dAtA[i] = 0x20 } - if m.To != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.To)) + if m.To != nil { + size, err := (*timestamppb1.Timestamp)(m.To).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x1a } - if m.From != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.From)) + if m.From != nil { + size, err := (*timestamppb1.Timestamp)(m.From).MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } if len(m.Query) > 0 { i -= len(m.Query) @@ -6480,7 +6814,7 @@ func (m *OnePhaseSearchResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if msg, ok := m.ResponseType.(*OnePhaseSearchResponse_Document); ok { + if msg, ok := m.ResponseType.(*OnePhaseSearchResponse_Batch); ok { size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err @@ -6520,15 +6854,15 @@ func (m *OnePhaseSearchResponse_Header) MarshalToSizedBufferVTStrict(dAtA []byte } return len(dAtA) - i, nil } -func (m *OnePhaseSearchResponse_Document) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *OnePhaseSearchResponse_Batch) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *OnePhaseSearchResponse_Document) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *OnePhaseSearchResponse_Batch) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i := len(dAtA) - if m.Document != nil { - size, err := m.Document.MarshalToSizedBufferVTStrict(dAtA[:i]) + if m.Batch != nil { + size, err := m.Batch.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } @@ -6543,7 +6877,7 @@ func (m *OnePhaseSearchResponse_Document) MarshalToSizedBufferVTStrict(dAtA []by } return len(dAtA) - i, nil } -func (m *Document) MarshalVTStrict() (dAtA []byte, err error) { +func (m *Header) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -6556,12 +6890,12 @@ func (m *Document) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Document) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *Header) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *Document) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Header) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -6573,8 +6907,20 @@ func (m *Document) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Data != nil { - size, err := m.Data.MarshalToSizedBufferVTStrict(dAtA[:i]) + if len(m.Typing) > 0 { + for iNdEx := len(m.Typing) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Typing[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if m.Metadata != nil { + size, err := m.Metadata.MarshalToSizedBufferVTStrict(dAtA[:i]) if err != nil { return 0, err } @@ -6586,7 +6932,7 @@ func (m *Document) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Header) MarshalVTStrict() (dAtA []byte, err error) { +func (m *Metadata) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -6599,12 +6945,12 @@ func (m *Header) MarshalVTStrict() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Header) MarshalToVTStrict(dAtA []byte) (int, error) { +func (m *Metadata) MarshalToVTStrict(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *Header) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { +func (m *Metadata) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -6626,20 +6972,20 @@ func (m *Header) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - if m.Code != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x18 - } if len(m.Errors) > 0 { for iNdEx := len(m.Errors) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Errors[iNdEx]) copy(dAtA[i:], m.Errors[iNdEx]) i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Errors[iNdEx]))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } } + if m.Code != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x10 + } if m.Total != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Total)) i-- @@ -6648,54 +6994,186 @@ func (m *Header) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *BulkRequest) SizeVT() (n int) { +func (m *Typing) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Typing) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Typing) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.Count != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Count)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - l = len(m.Docs) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.Type != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x10 } - l = len(m.Metas) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *BinaryData) SizeVT() (n int) { +func (m *RecordsBatch) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil } - var l int - _ = l - l = len(m.Data) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil } -func (m *AggQuery) SizeVT() (n int) { +func (m *RecordsBatch) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *RecordsBatch) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Field) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.GroupBy) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Records) > 0 { + for iNdEx := len(m.Records) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Records[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Record) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Record) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *Record) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.RawData) > 0 { + for iNdEx := len(m.RawData) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.RawData[iNdEx]) + copy(dAtA[i:], m.RawData[iNdEx]) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RawData[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *BulkRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Count != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Count)) + } + l = len(m.Docs) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.Metas) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *BinaryData) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Data) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (m *AggQuery) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Field) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + l = len(m.GroupBy) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Func != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.Func)) @@ -7378,11 +7856,13 @@ func (m *OnePhaseSearchRequest) SizeVT() (n int) { if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } - if m.From != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.From)) + if m.From != nil { + l = (*timestamppb1.Timestamp)(m.From).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } - if m.To != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.To)) + if m.To != nil { + l = (*timestamppb1.Timestamp)(m.To).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Size != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.Size)) @@ -7438,35 +7918,41 @@ func (m *OnePhaseSearchResponse_Header) SizeVT() (n int) { } return n } -func (m *OnePhaseSearchResponse_Document) SizeVT() (n int) { +func (m *OnePhaseSearchResponse_Batch) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l - if m.Document != nil { - l = m.Document.SizeVT() + if m.Batch != nil { + l = m.Batch.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } else { n += 3 } return n } -func (m *Document) SizeVT() (n int) { +func (m *Header) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l - if m.Data != nil { - l = m.Data.SizeVT() + if m.Metadata != nil { + l = m.Metadata.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } + if len(m.Typing) > 0 { + for _, e := range m.Typing { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } n += len(m.unknownFields) return n } -func (m *Header) SizeVT() (n int) { +func (m *Metadata) SizeVT() (n int) { if m == nil { return 0 } @@ -7475,15 +7961,15 @@ func (m *Header) SizeVT() (n int) { if m.Total != 0 { n += 1 + protohelpers.SizeOfVarint(uint64(m.Total)) } + if m.Code != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Code)) + } if len(m.Errors) > 0 { for _, s := range m.Errors { l = len(s) n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } - if m.Code != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Code)) - } if m.Explain != nil { l = m.Explain.SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) @@ -7492,6 +7978,55 @@ func (m *Header) SizeVT() (n int) { return n } +func (m *Typing) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.Type != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Type)) + } + n += len(m.unknownFields) + return n +} + +func (m *RecordsBatch) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Records) > 0 { + for _, e := range m.Records { + l = e.SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + +func (m *Record) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.RawData) > 0 { + for _, b := range m.RawData { + l = len(b) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } + } + n += len(m.unknownFields) + return n +} + func (m *BulkRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -12346,10 +12881,10 @@ func (m *OnePhaseSearchRequest) UnmarshalVT(dAtA []byte) error { m.Query = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) } - m.From = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12359,16 +12894,33 @@ func (m *OnePhaseSearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.From |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.From == nil { + m.From = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 3: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) } - m.To = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12378,11 +12930,28 @@ func (m *OnePhaseSearchRequest) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.To |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.To == nil { + m.To = ×tamppb.Timestamp{} + } + if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) @@ -12642,7 +13211,7 @@ func (m *OnePhaseSearchResponse) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Document", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Batch", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12669,16 +13238,16 @@ func (m *OnePhaseSearchResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if oneof, ok := m.ResponseType.(*OnePhaseSearchResponse_Document); ok { - if err := oneof.Document.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if oneof, ok := m.ResponseType.(*OnePhaseSearchResponse_Batch); ok { + if err := oneof.Batch.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } } else { - v := &Document{} + v := &RecordsBatch{} if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } - m.ResponseType = &OnePhaseSearchResponse_Document{Document: v} + m.ResponseType = &OnePhaseSearchResponse_Batch{Batch: v} } iNdEx = postIndex default: @@ -12703,7 +13272,7 @@ func (m *OnePhaseSearchResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Document) UnmarshalVT(dAtA []byte) error { +func (m *Header) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12726,15 +13295,15 @@ func (m *Document) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Document: wiretype end group for non-group") + return fmt.Errorf("proto: Header: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Document: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12761,10 +13330,44 @@ func (m *Document) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Data == nil { - m.Data = &BinaryData{} + if m.Metadata == nil { + m.Metadata = &Metadata{} + } + if err := m.Metadata.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Typing", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF } - if err := m.Data.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.Typing = append(m.Typing, &Typing{}) + if err := m.Typing[len(m.Typing)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -12790,7 +13393,7 @@ func (m *Document) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Header) UnmarshalVT(dAtA []byte) error { +func (m *Metadata) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12813,10 +13416,10 @@ func (m *Header) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Header: wiretype end group for non-group") + return fmt.Errorf("proto: Metadata: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -12839,10 +13442,10 @@ func (m *Header) UnmarshalVT(dAtA []byte) error { } } case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) } - var stringLen uint64 + m.Code = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12852,29 +13455,16 @@ func (m *Header) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Code |= SearchErrorCode(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Errors = append(m.Errors, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -12884,11 +13474,24 @@ func (m *Header) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Code |= SearchErrorCode(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Errors = append(m.Errors, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) @@ -12947,7 +13550,7 @@ func (m *Header) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *BulkRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *Typing) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12970,36 +13573,17 @@ func (m *BulkRequest) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: BulkRequest: wiretype end group for non-group") + return fmt.Errorf("proto: Typing: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: BulkRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Typing: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) - } - m.Count = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Count |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Docs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13009,28 +13593,29 @@ func (m *BulkRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Docs = dAtA[iNdEx:postIndex] + m.Title = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metas", wireType) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var byteLen int + m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13040,23 +13625,11 @@ func (m *BulkRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + m.Type |= DataType(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Metas = dAtA[iNdEx:postIndex] - iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -13079,7 +13652,7 @@ func (m *BulkRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *BinaryData) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *RecordsBatch) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13102,17 +13675,17 @@ func (m *BinaryData) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: BinaryData: wiretype end group for non-group") + return fmt.Errorf("proto: RecordsBatch: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: BinaryData: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RecordsBatch: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13122,22 +13695,25 @@ func (m *BinaryData) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Data = dAtA[iNdEx:postIndex] + m.Records = append(m.Records, &Record{}) + if err := m.Records[len(m.Records)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -13161,7 +13737,7 @@ func (m *BinaryData) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *Record) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13184,53 +13760,17 @@ func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AggQuery: wiretype end group for non-group") + return fmt.Errorf("proto: Record: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AggQuery: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Record: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Field = stringValue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupBy", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RawData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13240,120 +13780,24 @@ func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.GroupBy = stringValue + m.RawData = append(m.RawData, make([]byte, postIndex-iNdEx)) + copy(m.RawData[len(m.RawData)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Func", wireType) - } - m.Func = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Func |= AggFunc(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Quantiles = append(m.Quantiles, v2) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - elementCount = packedLen / 8 - if elementCount != 0 && len(m.Quantiles) == 0 { - m.Quantiles = make([]float64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Quantiles = append(m.Quantiles, v2) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Quantiles", wireType) - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) - } - m.Interval = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Interval |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -13376,7 +13820,7 @@ func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *BulkRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13399,17 +13843,17 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchRequest: wiretype end group for non-group") + return fmt.Errorf("proto: BulkRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: BulkRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) } - var stringLen uint64 + m.Count = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13419,33 +13863,16 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Count |= int64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Query = stringValue - iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Docs", wireType) } - m.From = 0 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13455,16 +13882,28 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.From |= int64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Docs = dAtA[iNdEx:postIndex] + iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metas", wireType) } - m.To = 0 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13474,54 +13913,79 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.To |= int64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + if byteLen < 0 { + return protohelpers.ErrInvalidLength } - m.Size = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Size |= int64(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + if postIndex > l { + return io.ErrUnexpectedEOF } - m.Offset = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Offset |= int64(b&0x7F) << shift - if b < 0x80 { - break - } + m.Metas = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength } - m.Interval = 0 + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BinaryData) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BinaryData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BinaryData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13531,14 +13995,77 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Interval |= int64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 7: + if byteLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = dAtA[iNdEx:postIndex] + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AggQuery) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AggQuery: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AggQuery: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggregation", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13570,13 +14097,13 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Aggregation = stringValue + m.Field = stringValue iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupBy", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13586,17 +14113,33 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.Explain = bool(v != 0) - case 10: + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.GroupBy = stringValue + iNdEx = postIndex + case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Func", wireType) } - var v int + m.Func = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13606,106 +14149,70 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.Func |= AggFunc(b&0x7F) << shift if b < 0x80 { break } } - m.WithTotal = bool(v != 0) - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregationFilter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { + case 5: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.AggregationFilter = stringValue - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Quantiles = append(m.Quantiles, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + if packedLen < 0 { + return protohelpers.ErrInvalidLength } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) - } - m.Order = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - m.Order |= Order(b&0x7F) << shift - if b < 0x80 { - break + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Quantiles) == 0 { + m.Quantiles = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Quantiles = append(m.Quantiles, v2) } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Quantiles", wireType) } - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OffsetId", wireType) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) } - var stringLen uint64 + m.Interval = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13715,28 +14222,11 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Interval |= int64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.OffsetId = stringValue - iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -13759,7 +14249,7 @@ func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *SearchResponse_Id) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *SearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13782,17 +14272,17 @@ func (m *SearchResponse_Id) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SearchResponse_Id: wiretype end group for non-group") + return fmt.Errorf("proto: SearchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SearchResponse_Id: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } - m.Mid = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13802,16 +14292,33 @@ func (m *SearchResponse_Id) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Mid |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Query = stringValue + iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Rid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) } - m.Rid = 0 + m.From = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13821,67 +14328,16 @@ func (m *SearchResponse_Id) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Rid |= uint64(b&0x7F) << shift + m.From |= int64(b&0x7F) << shift if b < 0x80 { break } } - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SearchResponse_IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SearchResponse_IdWithHint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SearchResponse_IdWithHint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) } - var msglen int + m.To = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -13891,17 +14347,434 @@ func (m *SearchResponse_IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.To |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + } + m.Size = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Size |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + } + m.Offset = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Offset |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + } + m.Interval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Interval |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Aggregation", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Aggregation = stringValue + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Explain = bool(v != 0) + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.WithTotal = bool(v != 0) + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregationFilter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.AggregationFilter = stringValue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Aggs = append(m.Aggs, &AggQuery{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + m.Order = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Order |= Order(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OffsetId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.OffsetId = stringValue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchResponse_Id) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SearchResponse_Id: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchResponse_Id: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType) + } + m.Mid = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Mid |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Rid", wireType) + } + m.Rid = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Rid |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SearchResponse_IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SearchResponse_IdWithHint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SearchResponse_IdWithHint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -16514,25 +17387,217 @@ func (m *DeleteAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { if shift >= 64 { return protohelpers.ErrIntOverflow } - if iNdEx >= l { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeleteAsyncSearchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeleteAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetAsyncSearchesListRequest) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetAsyncSearchesListRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetAsyncSearchesListRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var v AsyncSearchStatus + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= AsyncSearchStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Status = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Ids = append(m.Ids, stringValue) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetAsyncSearchesListResponse) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetAsyncSearchesListResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetAsyncSearchesListResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Searches", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.Searches = append(m.Searches, &AsyncSearchesListItem{}) + if err := m.Searches[len(m.Searches)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeleteAsyncSearchResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteAsyncSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { + iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -16555,7 +17620,7 @@ func (m *DeleteAsyncSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *GetAsyncSearchesListRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -16578,17 +17643,53 @@ func (m *GetAsyncSearchesListRequest) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetAsyncSearchesListRequest: wiretype end group for non-group") + return fmt.Errorf("proto: AsyncSearchesListItem: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetAsyncSearchesListRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AsyncSearchesListItem: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.SearchId = stringValue + iNdEx = postIndex + case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - var v AsyncSearchStatus + m.Status = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16598,17 +17699,16 @@ func (m *GetAsyncSearchesListRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= AsyncSearchStatus(b&0x7F) << shift + m.Status |= AsyncSearchStatus(b&0x7F) << shift if b < 0x80 { break } } - m.Status = &v - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16618,82 +17718,160 @@ func (m *GetAsyncSearchesListRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + if m.StartedAt == nil { + m.StartedAt = ×tamppb.Timestamp{} } - m.Ids = append(m.Ids, stringValue) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { + if err := (*timestamppb1.Timestamp)(m.StartedAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { return protohelpers.ErrInvalidLength } - if (iNdEx + skippy) > l { + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetAsyncSearchesListResponse) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow + if m.ExpiresAt == nil { + m.ExpiresAt = ×tamppb.Timestamp{} } - if iNdEx >= l { + if err := (*timestamppb1.Timestamp)(m.ExpiresAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CanceledAt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if m.CanceledAt == nil { + m.CanceledAt = ×tamppb.Timestamp{} } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GetAsyncSearchesListResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetAsyncSearchesListResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FracsDone", wireType) + } + m.FracsDone = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FracsDone |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FracsQueue", wireType) + } + m.FracsQueue = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FracsQueue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DiskUsage", wireType) + } + m.DiskUsage = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DiskUsage |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Searches", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -16720,65 +17898,33 @@ func (m *GetAsyncSearchesListResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Searches = append(m.Searches, &AsyncSearchesListItem{}) - if err := m.Searches[len(m.Searches)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + m.Aggs = append(m.Aggs, &AggQuery{}) + if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.HistogramInterval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HistogramInterval |= int64(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AsyncSearchesListItem: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AsyncSearchesListItem: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 11: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -16810,30 +17956,11 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.SearchId = stringValue + m.Query = stringValue iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= AsyncSearchStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: + case 12: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -16860,16 +17987,16 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.StartedAt == nil { - m.StartedAt = ×tamppb.Timestamp{} + if m.From == nil { + m.From = ×tamppb.Timestamp{} } - if err := (*timestamppb1.Timestamp)(m.StartedAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: + case 13: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -16896,16 +18023,16 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ExpiresAt == nil { - m.ExpiresAt = ×tamppb.Timestamp{} + if m.To == nil { + m.To = ×tamppb.Timestamp{} } - if err := (*timestamppb1.Timestamp)(m.ExpiresAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 5: + case 14: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CanceledAt", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Retention", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -16932,37 +18059,18 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.CanceledAt == nil { - m.CanceledAt = ×tamppb.Timestamp{} + if m.Retention == nil { + m.Retention = &durationpb.Duration{} } - if err := (*timestamppb1.Timestamp)(m.CanceledAt).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := (*durationpb1.Duration)(m.Retention).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FracsDone", wireType) - } - m.FracsDone = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FracsDone |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: + case 15: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FracsQueue", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) } - m.FracsQueue = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16972,16 +18080,17 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.FracsQueue |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - case 8: + m.WithDocs = bool(v != 0) + case 16: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DiskUsage", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) } - m.DiskUsage = 0 + m.Size = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -16991,16 +18100,16 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.DiskUsage |= uint64(b&0x7F) << shift + m.Size |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 9: + case 17: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aggs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17010,31 +18119,84 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Aggs = append(m.Aggs, &AggQuery{}) - if err := m.Aggs[len(m.Aggs)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.Error = stringValue iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HistogramInterval", wireType) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - m.HistogramInterval = 0 + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IdWithHint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IdWithHint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17044,14 +18206,31 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.HistogramInterval |= int64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 11: + intStringLen := int(stringLen) + if intStringLen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + } + m.Id = stringValue + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hint", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -17083,13 +18262,64 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Query = stringValue + m.Hint = stringValue iNdEx = postIndex - case 12: + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FieldsFilter) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FieldsFilter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FieldsFilter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17099,33 +18329,33 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.From == nil { - m.From = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.Fields = append(m.Fields, stringValue) iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowList", wireType) } - var msglen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17135,33 +18365,68 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength + m.AllowList = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + msglen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return protohelpers.ErrInvalidLength } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if m.To == nil { - m.To = ×tamppb.Timestamp{} + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FetchRequest) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow } - if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + if iNdEx >= l { + return io.ErrUnexpectedEOF } - iNdEx = postIndex - case 14: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FetchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FetchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Retention", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17171,31 +18436,31 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Retention == nil { - m.Retention = &durationpb.Duration{} - } - if err := (*durationpb1.Duration)(m.Retention).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.Ids = append(m.Ids, stringValue) iNdEx = postIndex - case 15: + case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithDocs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -17212,12 +18477,12 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { break } } - m.WithDocs = bool(v != 0) - case 16: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + m.Explain = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IdsWithHints", wireType) } - m.Size = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17227,16 +18492,31 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Size |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 17: + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IdsWithHints = append(m.IdsWithHints, &IdWithHint{}) + if err := m.IdsWithHints[len(m.IdsWithHints)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FieldsFilter", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17246,28 +18526,79 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } - if postIndex > l { + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldsFilter == nil { + m.FieldsFilter = &FieldsFilter{} + } + if err := m.FieldsFilter.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StatusRequest) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - m.Error = stringValue - iNdEx = postIndex + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatusRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -17290,7 +18621,7 @@ func (m *AsyncSearchesListItem) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *StatusResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -17313,17 +18644,17 @@ func (m *IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IdWithHint: wiretype end group for non-group") + return fmt.Errorf("proto: StatusResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IdWithHint: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OldestTime", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17333,63 +18664,27 @@ func (m *IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Id = stringValue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hint", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF + if m.OldestTime == nil { + m.OldestTime = ×tamppb.Timestamp{} } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) + if err := (*timestamppb1.Timestamp)(m.OldestTime).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Hint = stringValue iNdEx = postIndex default: iNdEx = preIndex @@ -17413,7 +18708,7 @@ func (m *IdWithHint) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *FieldsFilter) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *OnePhaseSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -17436,15 +18731,15 @@ func (m *FieldsFilter) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: FieldsFilter: wiretype end group for non-group") + return fmt.Errorf("proto: OnePhaseSearchRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: FieldsFilter: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: OnePhaseSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -17476,13 +18771,13 @@ func (m *FieldsFilter) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.Fields = append(m.Fields, stringValue) + m.Query = stringValue iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowList", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17492,68 +18787,127 @@ func (m *FieldsFilter) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.AllowList = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err + if msglen < 0 { + return protohelpers.ErrInvalidLength } - if (skippy < 0) || (iNdEx+skippy) < 0 { + postIndex := iNdEx + msglen + if postIndex < 0 { return protohelpers.ErrInvalidLength } - if (iNdEx + skippy) > l { + if postIndex > l { return io.ErrUnexpectedEOF } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FetchRequest) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow + if m.From == nil { + m.From = ×tamppb.Timestamp{} } - if iNdEx >= l { + if err := (*timestamppb1.Timestamp)(m.From).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if m.To == nil { + m.To = ×tamppb.Timestamp{} } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FetchRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FetchRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + if err := (*timestamppb1.Timestamp)(m.To).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + } + m.Size = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Size |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + } + m.Offset = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Offset |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Explain = bool(v != 0) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17563,33 +18917,17 @@ func (m *FetchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Ids = append(m.Ids, stringValue) - iNdEx = postIndex - case 3: + m.WithTotal = bool(v != 0) + case 8: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) } - var v int + m.Order = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17599,17 +18937,16 @@ func (m *FetchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.Order |= Order(b&0x7F) << shift if b < 0x80 { break } } - m.Explain = bool(v != 0) - case 4: + case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IdsWithHints", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OffsetId", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17619,27 +18956,29 @@ func (m *FetchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.IdsWithHints = append(m.IdsWithHints, &IdWithHint{}) - if err := m.IdsWithHints[len(m.IdsWithHints)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.OffsetId = stringValue iNdEx = postIndex - case 5: + case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field FieldsFilter", wireType) } @@ -17697,7 +19036,7 @@ func (m *FetchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *StatusRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *OnePhaseSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -17720,66 +19059,56 @@ func (m *StatusRequest) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StatusRequest: wiretype end group for non-group") + return fmt.Errorf("proto: OnePhaseSearchResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: OnePhaseSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + if msglen < 0 { + return protohelpers.ErrInvalidLength } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StatusResponse) UnmarshalVTUnsafe(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if oneof, ok := m.ResponseType.(*OnePhaseSearchResponse_Header); ok { + if err := oneof.Header.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &Header{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.ResponseType = &OnePhaseSearchResponse_Header{Header: v} } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StatusResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OldestTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Batch", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -17806,11 +19135,16 @@ func (m *StatusResponse) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.OldestTime == nil { - m.OldestTime = ×tamppb.Timestamp{} - } - if err := (*timestamppb1.Timestamp)(m.OldestTime).UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err + if oneof, ok := m.ResponseType.(*OnePhaseSearchResponse_Batch); ok { + if err := oneof.Batch.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &RecordsBatch{} + if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.ResponseType = &OnePhaseSearchResponse_Batch{Batch: v} } iNdEx = postIndex default: @@ -17835,7 +19169,7 @@ func (m *StatusResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *OnePhaseSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *Header) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -17858,17 +19192,17 @@ func (m *OnePhaseSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: OnePhaseSearchRequest: wiretype end group for non-group") + return fmt.Errorf("proto: Header: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: OnePhaseSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17878,109 +19212,33 @@ func (m *OnePhaseSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if msglen < 0 { return protohelpers.ErrInvalidLength } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Query = stringValue - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - m.From = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.From |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - m.To = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.To |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) - } - m.Size = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Size |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) - } - m.Offset = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Offset |= int64(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + if postIndex > l { + return io.ErrUnexpectedEOF } - var v int + if m.Metadata == nil { + m.Metadata = &Metadata{} + } + if err := m.Metadata.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Typing", wireType) + } + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -17990,17 +19248,82 @@ func (m *OnePhaseSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.Explain = bool(v != 0) - case 7: + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Typing = append(m.Typing, &Typing{}) + if err := m.Typing[len(m.Typing)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protohelpers.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Metadata) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Metadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WithTotal", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) } - var v int + m.Total = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -18010,17 +19333,16 @@ func (m *OnePhaseSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.Total |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.WithTotal = bool(v != 0) - case 8: + case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) } - m.Order = 0 + m.Code = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -18030,14 +19352,14 @@ func (m *OnePhaseSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Order |= Order(b&0x7F) << shift + m.Code |= SearchErrorCode(b&0x7F) << shift if b < 0x80 { break } } - case 9: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OffsetId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -18069,11 +19391,11 @@ func (m *OnePhaseSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if intStringLen > 0 { stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } - m.OffsetId = stringValue + m.Errors = append(m.Errors, stringValue) iNdEx = postIndex - case 10: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldsFilter", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -18100,10 +19422,10 @@ func (m *OnePhaseSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.FieldsFilter == nil { - m.FieldsFilter = &FieldsFilter{} + if m.Explain == nil { + m.Explain = &ExplainEntry{} } - if err := m.FieldsFilter.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Explain.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -18129,7 +19451,7 @@ func (m *OnePhaseSearchRequest) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *OnePhaseSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *Typing) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -18152,17 +19474,17 @@ func (m *OnePhaseSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: OnePhaseSearchResponse: wiretype end group for non-group") + return fmt.Errorf("proto: Typing: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: OnePhaseSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Typing: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -18172,38 +19494,33 @@ func (m *OnePhaseSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if oneof, ok := m.ResponseType.(*OnePhaseSearchResponse_Header); ok { - if err := oneof.Header.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &Header{} - if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ResponseType = &OnePhaseSearchResponse_Header{Header: v} + var stringValue string + if intStringLen > 0 { + stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) } + m.Title = stringValue iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Document", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var msglen int + m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -18213,33 +19530,11 @@ func (m *OnePhaseSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Type |= DataType(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if oneof, ok := m.ResponseType.(*OnePhaseSearchResponse_Document); ok { - if err := oneof.Document.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &Document{} - if err := v.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.ResponseType = &OnePhaseSearchResponse_Document{Document: v} - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := protohelpers.Skip(dAtA[iNdEx:]) @@ -18262,7 +19557,7 @@ func (m *OnePhaseSearchResponse) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *Document) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *RecordsBatch) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -18285,15 +19580,15 @@ func (m *Document) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Document: wiretype end group for non-group") + return fmt.Errorf("proto: RecordsBatch: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Document: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RecordsBatch: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Records", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -18320,10 +19615,8 @@ func (m *Document) UnmarshalVTUnsafe(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Data == nil { - m.Data = &BinaryData{} - } - if err := m.Data.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + m.Records = append(m.Records, &Record{}) + if err := m.Records[len(m.Records)-1].UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -18349,7 +19642,7 @@ func (m *Document) UnmarshalVTUnsafe(dAtA []byte) error { } return nil } -func (m *Header) UnmarshalVTUnsafe(dAtA []byte) error { +func (m *Record) UnmarshalVTUnsafe(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -18372,91 +19665,17 @@ func (m *Header) UnmarshalVTUnsafe(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Header: wiretype end group for non-group") + return fmt.Errorf("proto: Record: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Record: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) - } - m.Total = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Total |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var stringValue string - if intStringLen > 0 { - stringValue = unsafe.String(&dAtA[iNdEx], intStringLen) - } - m.Errors = append(m.Errors, stringValue) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= SearchErrorCode(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Explain", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RawData", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protohelpers.ErrIntOverflow @@ -18466,27 +19685,22 @@ func (m *Header) UnmarshalVTUnsafe(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return protohelpers.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Explain == nil { - m.Explain = &ExplainEntry{} - } - if err := m.Explain.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.RawData = append(m.RawData, dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/proxy/search/one_phase_search.go b/proxy/search/one_phase_search.go index b91f4f29..8d319f15 100644 --- a/proxy/search/one_phase_search.go +++ b/proxy/search/one_phase_search.go @@ -2,24 +2,26 @@ package search import ( "context" + "encoding/binary" "errors" "fmt" "io" + "math" "github.com/alecthomas/units" "google.golang.org/grpc" + "google.golang.org/protobuf/types/known/timestamppb" "github.com/ozontech/seq-db/pkg/storeapi" "github.com/ozontech/seq-db/querytracer" "github.com/ozontech/seq-db/seq" - "github.com/ozontech/seq-db/storage" ) func (si *Ingestor) OnePhaseSearch( ctx context.Context, sr *SearchRequest, tr *querytracer.Tracer, -) (*seq.QPR, DocsIterator, error) { +) (*seq.QPR, DocsIterator, AggsIterator, error) { searchStores := si.config.HotStores if si.config.HotReadStores != nil && len(si.config.HotReadStores.Shards) > 0 { searchStores = si.config.HotReadStores @@ -29,14 +31,14 @@ func (si *Ingestor) OnePhaseSearch( client, has := si.clients[host] if !has { - return nil, nil, fmt.Errorf("can't fetch: no client for host %s", host) + return nil, nil, nil, fmt.Errorf("can't fetch: no client for host %s", host) } fieldsFilter := tryParseFieldsFilter(string(sr.Q)) req := &storeapi.OnePhaseSearchRequest{ Query: string(sr.Q), - From: int64(sr.From), - To: int64(sr.To), + From: timestamppb.New(sr.From.Time()), + To: timestamppb.New(sr.To.Time()), Size: int64(sr.Size), Offset: int64(sr.Offset), Explain: sr.Explain, @@ -54,60 +56,125 @@ func (si *Ingestor) OnePhaseSearch( grpc.MaxCallSendMsgSize(256*int(units.MiB)), ) if err != nil { - return nil, nil, fmt.Errorf("can't fetch docs: %s", err.Error()) + return nil, nil, nil, fmt.Errorf("can't fetch docs: %s", err.Error()) } msg, err := stream.Recv() if err != nil { - return nil, nil, nil + return nil, nil, nil, nil } header := msg.GetHeader() - errs := make([]seq.ErrorSource, 0, len(header.Errors)) - for _, err := range header.Errors { + errs := make([]seq.ErrorSource, 0, len(header.Metadata.Errors)) + for _, err := range header.Metadata.Errors { errs = append(errs, seq.ErrorSource{ErrStr: err}) } qpr := &seq.QPR{ - Total: header.Total, + Total: header.Metadata.Total, Errors: errs, } - return qpr, &OnePhaseSearchIterator{stream: stream, limit: sr.Size}, nil + return qpr, &OnePhaseSearchDocsIterator{stream: stream, limit: sr.Size}, &OnePhaseSearchAggsIterator{stream: stream, limit: sr.Size}, nil } -type OnePhaseSearchIterator struct { +type OnePhaseSearchDocsIterator struct { stream storeapi.StoreApi_OnePhaseSearchClient + curBatch []*storeapi.Record + fetched int limit int } -func (it *OnePhaseSearchIterator) Next() (StreamingDoc, error) { +func (it *OnePhaseSearchDocsIterator) Next() (StreamingDoc, error) { if it.fetched >= it.limit { return StreamingDoc{}, io.EOF } - data, err := it.stream.Recv() - if errors.Is(err, io.EOF) { - return StreamingDoc{}, io.EOF - } - if err != nil { - return StreamingDoc{}, err + if len(it.curBatch) == 0 { + data, err := it.stream.Recv() + if errors.Is(err, io.EOF) { + return StreamingDoc{}, io.EOF + } + if err != nil { + return StreamingDoc{}, err + } + it.curBatch = data.GetBatch().Records } - doc := data.GetDocument() - block := storage.DocBlock(doc.Data.Data) - mid := block.GetExt1() + // TODO: get fields values from columns info + + record := it.curBatch[0] + it.curBatch = it.curBatch[1:] it.fetched++ return StreamingDoc{ ID: seq.ID{ - MID: seq.MID(mid), - RID: seq.RID(block.GetExt2()), + MID: seq.MID(binary.LittleEndian.Uint64(record.RawData[0])), + RID: seq.RID(binary.LittleEndian.Uint64(record.RawData[1])), }, - Data: block.Payload(), + Data: record.RawData[2], + }, nil +} + +type StreamingAgg struct { + Label string + Min float64 + Max float64 + Sum float64 + Total uint64 + NotExists uint64 +} + +type AggsIterator interface { + Next() (StreamingAgg, error) +} + +type OnePhaseSearchAggsIterator struct { + stream storeapi.StoreApi_OnePhaseSearchClient + + curBatch []*storeapi.Record + + fetched int + limit int +} + +func (it *OnePhaseSearchAggsIterator) Next() (StreamingAgg, error) { + if it.fetched >= it.limit { + return StreamingAgg{}, io.EOF + } + + if len(it.curBatch) == 0 { + data, err := it.stream.Recv() + if errors.Is(err, io.EOF) { + return StreamingAgg{}, io.EOF + } + if err != nil { + return StreamingAgg{}, err + } + it.curBatch = data.GetBatch().Records + } + + // TODO: get fields values from columns info + + record := it.curBatch[0] + it.curBatch = it.curBatch[1:] + + it.fetched++ + + return StreamingAgg{ + Label: string(record.RawData[0]), + Min: Float64FromBytes(record.RawData[1]), + Max: Float64FromBytes(record.RawData[2]), + Sum: Float64FromBytes(record.RawData[3]), + Total: binary.LittleEndian.Uint64(record.RawData[4]), + NotExists: binary.LittleEndian.Uint64(record.RawData[5]), }, nil } + +func Float64FromBytes(in []byte) float64 { + return math.Float64frombits(binary.LittleEndian.Uint64(in)) +} diff --git a/proxyapi/grpc_one_phase_search.go b/proxyapi/grpc_one_phase_search.go index 23b8ce49..05d309ab 100644 --- a/proxyapi/grpc_one_phase_search.go +++ b/proxyapi/grpc_one_phase_search.go @@ -3,6 +3,7 @@ package proxyapi import ( "context" "errors" + "fmt" "time" "go.opencensus.io/trace" @@ -12,13 +13,14 @@ import ( "github.com/ozontech/seq-db/consts" "github.com/ozontech/seq-db/metric" + "github.com/ozontech/seq-db/parser" "github.com/ozontech/seq-db/pkg/seqproxyapi/v1" "github.com/ozontech/seq-db/proxy/search" "github.com/ozontech/seq-db/querytracer" "github.com/ozontech/seq-db/seq" ) -func (g *grpcV1) OnePhaseSearch(ctx context.Context, req *seqproxyapi.SearchRequest) (*seqproxyapi.SearchResponse, error) { +func (g *grpcV1) OnePhaseSearch(ctx context.Context, req *seqproxyapi.SearchRequest) (*seqproxyapi.ComplexSearchResponse, error) { ctx, cancel := context.WithTimeout(ctx, g.config.SearchTimeout) defer cancel() @@ -34,30 +36,68 @@ func (g *grpcV1) OnePhaseSearch(ctx context.Context, req *seqproxyapi.SearchRequ WithTotal: req.WithTotal, Order: req.Order, } - sResp, err := g.doOnePhaseSearch(ctx, proxyReq, true) + sResp, aggsStream, err := g.doOnePhaseSearch(ctx, proxyReq, true) if err != nil { return nil, err } - if sResp.err != nil && !shouldHaveResponse(sResp.err.Code) { - return &seqproxyapi.SearchResponse{Error: sResp.err}, nil - } - resp := &seqproxyapi.SearchResponse{ - Docs: makeProtoDocsKek(sResp.docsStream), + resp := &seqproxyapi.ComplexSearchResponse{ Total: int64(sResp.qpr.Total), Error: &seqproxyapi.Error{ Code: seqproxyapi.ErrorCode_ERROR_CODE_NO, }, } + if sResp.err != nil { - resp.Error = sResp.err + if shouldHaveResponse(sResp.err.Code) { + resp.Error = sResp.err + } else { + return &seqproxyapi.ComplexSearchResponse{Error: sResp.err}, nil + } + } + + statsAggs := extractStatsPipesFromQuery(req.Query.Query) + hasAggs := len(statsAggs) > 0 + + if hasAggs { + sResp.qpr.Aggs = convertAggsStreamToAggregationResults(aggsStream) + kek := aggregationArgsFromStatsAggs(statsAggs) + allAggs := sResp.qpr.Aggregate(kek) + resp.Aggs = makeProtoAggregation(allAggs) + } else { + resp.Docs = makeProtoDocsKek(sResp.docsStream) } return resp, nil } +func convertAggsStreamToAggregationResults(aggs search.AggsIterator) []seq.AggregatableSamples { + result := make([]seq.AggregatableSamples, 0) + to := make(map[seq.AggBin]*seq.SamplesContainer) + for agg, err := aggs.Next(); err == nil; agg, err = aggs.Next() { + + tbin := seq.AggBin{ + MID: consts.DummyMID, + Token: agg.Label, + } + + to[tbin] = &seq.SamplesContainer{ + Min: agg.Min, + Max: agg.Max, + Sum: agg.Sum, + Total: int64(agg.Total), + NotExists: int64(agg.NotExists), + } + } + result = append(result, seq.AggregatableSamples{ + SamplesByBin: to, + // NotExists: int64(agg.NotExists), + }) + return result +} + func makeProtoDocsKek(docs search.DocsIterator) []*seqproxyapi.Document { - // TODO: paginate here (???) + // TODO: paginate (???) respDocs := make([]*seqproxyapi.Document, 0) for doc, err := docs.Next(); err == nil; doc, err = docs.Next() { respDocs = append(respDocs, &seqproxyapi.Document{ @@ -73,20 +113,20 @@ func (g *grpcV1) doOnePhaseSearch( ctx context.Context, req *seqproxyapi.ComplexSearchRequest, shouldFetch bool, -) (*proxySearchResponse, error) { +) (*proxySearchResponse, search.AggsIterator, error) { metric.SearchOverall.Add(1) span := trace.FromContext(ctx) defer span.End() if req.Query == nil { - return nil, status.Error(codes.InvalidArgument, "search query must be provided") + return nil, nil, status.Error(codes.InvalidArgument, "search query must be provided") } if req.Query.From == nil || req.Query.To == nil { - return nil, status.Error(codes.InvalidArgument, `search query "from" and "to" fields must be provided`) + return nil, nil, status.Error(codes.InvalidArgument, `search query "from" and "to" fields must be provided`) } if req.Offset != 0 && req.OffsetId != "" { - return nil, status.Error(codes.InvalidArgument, `only one of "offset" and "offset_id" must be provided`) + return nil, nil, status.Error(codes.InvalidArgument, `only one of "offset" and "offset_id" must be provided`) } fromTime := req.Query.From.AsTime() @@ -107,7 +147,7 @@ func (g *grpcV1) doOnePhaseSearch( rlQuery := getSearchQueryFromGRPCReqForRateLimiter(req) if !g.rateLimiter.Account(rlQuery) { - return nil, status.Error(codes.ResourceExhausted, consts.ErrRequestWasRateLimited.Error()) + return nil, nil, status.Error(codes.ResourceExhausted, consts.ErrRequestWasRateLimited.Error()) } proxyReq := &search.SearchRequest{ @@ -124,7 +164,7 @@ func (g *grpcV1) doOnePhaseSearch( } tr := querytracer.New(req.Query.Explain, "proxy/OnePhaseSearch") - qpr, docsStream, err := g.searchIngestor.OnePhaseSearch(ctx, proxyReq, tr) + qpr, docsStream, aggsStream, err := g.searchIngestor.OnePhaseSearch(ctx, proxyReq, tr) psr := &proxySearchResponse{ qpr: qpr, docsStream: docsStream, @@ -132,17 +172,17 @@ func (g *grpcV1) doOnePhaseSearch( if e, ok := parseProxyError(err); ok { psr.err = e - return psr, nil + return psr, nil, nil } if errors.Is(err, consts.ErrInvalidArgument) { - return nil, status.Error(codes.InvalidArgument, err.Error()) + return nil, nil, status.Error(codes.InvalidArgument, err.Error()) } if st, ok := status.FromError(err); ok { // could not parse a query if st.Code() == codes.InvalidArgument { - return nil, err + return nil, nil, err } } @@ -152,14 +192,70 @@ func (g *grpcV1) doOnePhaseSearch( Code: seqproxyapi.ErrorCode_ERROR_CODE_PARTIAL_RESPONSE, Message: err.Error(), } - return psr, nil + return psr, aggsStream, nil } if err = processSearchErrors(qpr, err); err != nil { metric.SearchErrors.Inc() - return nil, err + return nil, nil, err } g.tryMirrorRequest(req) - return psr, nil + return psr, aggsStream, nil +} + +func extractStatsPipesFromQuery(query string) []parser.StatsAgg { + if query == "" { + return nil + } + + seqql, err := parser.ParseSeqQL(query, nil) + if err != nil { + return nil + } + + var result []parser.StatsAgg + for _, pipe := range seqql.Pipes { + statsPipe, ok := pipe.(*parser.PipeStats) + if !ok { + continue + } + result = append(result, statsPipe.Aggs...) + } + return result +} + +func aggregationArgsFromStatsAggs(aggs []parser.StatsAgg) []seq.AggregateArgs { + args := make([]seq.AggregateArgs, len(aggs)) + for i, agg := range aggs { + args[i] = seq.AggregateArgs{ + Func: mustConvertStringToAggFunc(agg.Func), + Quantiles: agg.Quantiles, + SkipWithoutTimestamp: agg.Interval != "", + } + } + return args +} + +func mustConvertStringToAggFunc(funcName string) seq.AggFunc { + switch funcName { + case "count": + return seq.AggFuncCount + case "sum": + return seq.AggFuncSum + case "min": + return seq.AggFuncMin + case "max": + return seq.AggFuncMax + case "avg": + return seq.AggFuncAvg + case "quantile": + return seq.AggFuncQuantile + case "unique": + return seq.AggFuncUnique + case "unique_count": + return seq.AggFuncUniqueCount + default: + panic(fmt.Errorf("unknown aggregation function: %s", funcName)) + } } diff --git a/proxyapi/grpc_v1.go b/proxyapi/grpc_v1.go index 65cf91e0..2299ba06 100644 --- a/proxyapi/grpc_v1.go +++ b/proxyapi/grpc_v1.go @@ -38,7 +38,7 @@ type SearchIngestor interface { CancelAsyncSearch(ctx context.Context, id string) error DeleteAsyncSearch(ctx context.Context, id string) error GetAsyncSearchesList(context.Context, search.GetAsyncSearchesListRequest) ([]*search.AsyncSearchesListItem, error) - OnePhaseSearch(ctx context.Context, sr *search.SearchRequest, tr *querytracer.Tracer) (*seq.QPR, search.DocsIterator, error) + OnePhaseSearch(ctx context.Context, sr *search.SearchRequest, tr *querytracer.Tracer) (*seq.QPR, search.DocsIterator, search.AggsIterator, error) } type MappingProvider interface { diff --git a/proxyapi/mock/grpc_v1.go b/proxyapi/mock/grpc_v1.go index 12e3f7ed..30c83fcc 100644 --- a/proxyapi/mock/grpc_v1.go +++ b/proxyapi/mock/grpc_v1.go @@ -116,13 +116,14 @@ func (mr *MockSearchIngestorMockRecorder) GetAsyncSearchesList(arg0, arg1 interf } // OnePhaseSearch mocks base method. -func (m *MockSearchIngestor) OnePhaseSearch(ctx context.Context, sr *search.SearchRequest, tr *querytracer.Tracer) (*seq.QPR, search.DocsIterator, error) { +func (m *MockSearchIngestor) OnePhaseSearch(ctx context.Context, sr *search.SearchRequest, tr *querytracer.Tracer) (*seq.QPR, search.DocsIterator, search.AggsIterator, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "OnePhaseSearch", ctx, sr, tr) ret0, _ := ret[0].(*seq.QPR) ret1, _ := ret[1].(search.DocsIterator) - ret2, _ := ret[2].(error) - return ret0, ret1, ret2 + ret2, _ := ret[2].(search.AggsIterator) + ret3, _ := ret[3].(error) + return ret0, ret1, ret2, ret3 } // OnePhaseSearch indicates an expected call of OnePhaseSearch. diff --git a/storeapi/grpc_one_phase_search.go b/storeapi/grpc_one_phase_search.go index c3538071..ca7d6229 100644 --- a/storeapi/grpc_one_phase_search.go +++ b/storeapi/grpc_one_phase_search.go @@ -2,15 +2,20 @@ package storeapi import ( "context" + "encoding/binary" "fmt" + "math" + "time" "go.opencensus.io/trace" "go.uber.org/zap" "github.com/ozontech/seq-db/logger" + "github.com/ozontech/seq-db/parser" "github.com/ozontech/seq-db/pkg/storeapi" "github.com/ozontech/seq-db/querytracer" "github.com/ozontech/seq-db/seq" + "github.com/ozontech/seq-db/storage" "github.com/ozontech/seq-db/tracing" "github.com/ozontech/seq-db/util" ) @@ -24,8 +29,8 @@ func (g *GrpcV1) OnePhaseSearch( if span.IsRecordingEvents() { span.AddAttributes(trace.StringAttribute("request", req.Query)) - span.AddAttributes(trace.Int64Attribute("from", req.From)) - span.AddAttributes(trace.Int64Attribute("to", req.From)) + span.AddAttributes(trace.StringAttribute("from", req.From.AsTime().Format(time.RFC3339Nano))) + span.AddAttributes(trace.StringAttribute("to", req.To.AsTime().Format(time.RFC3339Nano))) span.AddAttributes(trace.Int64Attribute("size", req.Size)) span.AddAttributes(trace.Int64Attribute("offset", req.Offset)) span.AddAttributes(trace.StringAttribute("offset_id", req.OffsetId)) @@ -46,11 +51,26 @@ func (g *GrpcV1) doOnePhaseSearch( req *storeapi.OnePhaseSearchRequest, stream storeapi.StoreApi_OnePhaseSearchServer, ) error { - tr := querytracer.New(req.Explain, "store/Search") + statsAggs := extractStatsPipesFromQuery(req.Query) + hasAggs := len(statsAggs) > 0 + + if hasAggs { + return g.doOnePhaseSearchWithAggs(ctx, req, stream, statsAggs) + } + + return g.doOnePhaseSearchDocs(ctx, req, stream) +} + +func (g *GrpcV1) doOnePhaseSearchDocs( + ctx context.Context, + req *storeapi.OnePhaseSearchRequest, + stream storeapi.StoreApi_OnePhaseSearchServer, +) error { + tr := querytracer.New(req.Explain, "store/OnePhaseSearchDocs") data, err := g.doSearch(ctx, &storeapi.SearchRequest{ Query: req.Query, - From: req.From, - To: req.To, + From: int64(seq.TimeToMID(req.From.AsTime())), + To: int64(seq.TimeToMID(req.To.AsTime())), Size: req.Size, Offset: req.Offset, Explain: req.Explain, @@ -70,10 +90,18 @@ func (g *GrpcV1) doOnePhaseSearch( err = stream.Send(&storeapi.OnePhaseSearchResponse{ ResponseType: &storeapi.OnePhaseSearchResponse_Header{ Header: &storeapi.Header{ - Total: data.Total, - Errors: data.Errors, - Code: data.Code, - Explain: data.Explain, + Metadata: &storeapi.Metadata{ + Total: data.Total, + Code: data.Code, + Errors: data.Errors, + Explain: data.Explain, + }, + Typing: []*storeapi.Typing{ + // TODO: conditional typing + {Title: "mid", Type: storeapi.DataType_UINT64}, + {Title: "rid", Type: storeapi.DataType_UINT64}, + {Title: "data", Type: storeapi.DataType_RAW_DOCUMENT}, + }, }, }, }) @@ -94,10 +122,21 @@ func (g *GrpcV1) doOnePhaseSearch( } send := func(block []byte) error { + // TODO: get rid of hardcode + docBlock := storage.DocBlock(block) return stream.Send(&storeapi.OnePhaseSearchResponse{ - ResponseType: &storeapi.OnePhaseSearchResponse_Document{ - Document: &storeapi.Document{ - Data: &storeapi.BinaryData{Data: block}, + ResponseType: &storeapi.OnePhaseSearchResponse_Batch{ + Batch: &storeapi.RecordsBatch{ + // TODO: batch + Records: []*storeapi.Record{ + { + RawData: [][]byte{ + Uint64ToBytes(docBlock.GetExt1()), + Uint64ToBytes(docBlock.GetExt2()), + docBlock.Payload(), + }, + }, + }, }, }, }) @@ -109,3 +148,183 @@ func (g *GrpcV1) doOnePhaseSearch( return nil } + +// TODO: bytes pool (???), varint (???) +func Uint64ToBytes(val uint64) []byte { + b := make([]byte, 8) + binary.LittleEndian.PutUint64(b, val) + return b +} + +func Float64ToBytes(val float64) []byte { + b := make([]byte, 8) + binary.LittleEndian.PutUint64(b, math.Float64bits(val)) + return b +} + +func (g *GrpcV1) doOnePhaseSearchWithAggs( + ctx context.Context, + req *storeapi.OnePhaseSearchRequest, + stream storeapi.StoreApi_OnePhaseSearchServer, + statsAggs []parser.StatsAgg, +) error { + tr := querytracer.New(req.Explain, "store/OnePhaseSearchWithAggs") + + aggQ, err := convertStatsAggsToStoreApiAgg(statsAggs) + if err != nil { + return fmt.Errorf("failed to convert stats aggs: %w", err) + } + + data, err := g.doSearch(ctx, &storeapi.SearchRequest{ + Query: req.Query, + From: int64(seq.TimeToMID(req.From.AsTime())), + To: int64(seq.TimeToMID(req.To.AsTime())), + Size: req.Size, + Offset: req.Offset, + Explain: req.Explain, + WithTotal: req.WithTotal, + Order: req.Order, + OffsetId: req.OffsetId, + Aggs: aggQ, + }, tr) + if err != nil { + return fmt.Errorf("search error: %w", err) + } + tr.Done() + + err = stream.Send(&storeapi.OnePhaseSearchResponse{ + ResponseType: &storeapi.OnePhaseSearchResponse_Header{ + Header: &storeapi.Header{ + Metadata: &storeapi.Metadata{ + Total: data.Total, + Code: data.Code, + Errors: data.Errors, + Explain: data.Explain, + }, + Typing: []*storeapi.Typing{ + // TODO: conditional typing + {Title: "token", Type: storeapi.DataType_STRING}, + {Title: "min", Type: storeapi.DataType_FLOAT64}, + {Title: "max", Type: storeapi.DataType_FLOAT64}, + {Title: "sum", Type: storeapi.DataType_FLOAT64}, + {Title: "total", Type: storeapi.DataType_UINT64}, + {Title: "not_exists", Type: storeapi.DataType_UINT64}, + }, + }, + }, + }) + if err != nil { + if util.IsCancelled(ctx) { + logger.Info("one phase search request is canceled") + return nil + } + return fmt.Errorf("error sending aggs: %w", err) + } + + for _, agg := range data.Aggs { + for _, bin := range agg.Timeseries { + err := stream.Send(&storeapi.OnePhaseSearchResponse{ + ResponseType: &storeapi.OnePhaseSearchResponse_Batch{ + Batch: &storeapi.RecordsBatch{ + // TODO: batch + Records: []*storeapi.Record{ + { + RawData: [][]byte{ + []byte(bin.Label), + Float64ToBytes(bin.Hist.Min), + Float64ToBytes(bin.Hist.Max), + Float64ToBytes(bin.Hist.Sum), + Uint64ToBytes(uint64(bin.Hist.Total)), + Uint64ToBytes(uint64(bin.Hist.NotExists)), + }, + }, + }, + }, + }, + }) + if err != nil { + if util.IsCancelled(ctx) { + logger.Info("one phase search request is canceled") + return nil + } + return fmt.Errorf("error sending aggs: %w", err) + } + } + } + + return nil +} + +func extractStatsPipesFromQuery(query string) []parser.StatsAgg { + if query == "" { + return nil + } + + seqql, err := parser.ParseSeqQL(query, nil) + if err != nil { + return nil + } + + var result []parser.StatsAgg + for _, pipe := range seqql.Pipes { + statsPipe, ok := pipe.(*parser.PipeStats) + if !ok { + continue + } + result = append(result, statsPipe.Aggs...) + } + return result +} + +func convertStatsAggsToStoreApiAgg(statsAggs []parser.StatsAgg) ([]*storeapi.AggQuery, error) { + result := make([]*storeapi.AggQuery, 0, len(statsAggs)) + + for _, agg := range statsAggs { + aggFunc, err := convertStringToAggFunc(agg.Func) + if err != nil { + return nil, err + } + + procAgg := &storeapi.AggQuery{ + Field: agg.Field, + GroupBy: agg.GroupBy, + Func: aggFunc, + Quantiles: agg.Quantiles, + } + + if agg.Interval != "" { + interval, err := util.ParseDuration(agg.Interval) + if err != nil { + return nil, fmt.Errorf("failed to parse interval: %w", err) + } + procAgg.Interval = interval.Nanoseconds() + } + + result = append(result, procAgg) + } + + return result, nil +} + +func convertStringToAggFunc(funcName string) (storeapi.AggFunc, error) { + switch funcName { + case "count": + return storeapi.AggFunc_AGG_FUNC_COUNT, nil + case "sum": + return storeapi.AggFunc_AGG_FUNC_SUM, nil + case "min": + return storeapi.AggFunc_AGG_FUNC_MIN, nil + case "max": + return storeapi.AggFunc_AGG_FUNC_MAX, nil + case "avg": + return storeapi.AggFunc_AGG_FUNC_AVG, nil + case "quantile": + return storeapi.AggFunc_AGG_FUNC_QUANTILE, nil + case "unique": + return storeapi.AggFunc_AGG_FUNC_UNIQUE, nil + case "unique_count": + return storeapi.AggFunc_AGG_FUNC_UNIQUE_COUNT, nil + default: + return 0, fmt.Errorf("unknown aggregation function: %s", funcName) + } +} From 7a58d66fa4b0d96cf3941c5a50a860522487fceb Mon Sep 17 00:00:00 2001 From: Daniil Forshev Date: Tue, 28 Apr 2026 16:40:41 +0500 Subject: [PATCH 4/4] feat(query engine): init --- query/data_source.go | 22 ++++++ query/exec/aggregator.go | 5 ++ query/exec/executor_combination_test.go | 36 ++++++++++ query/exec/filter.go | 92 +++++++++++++++++++++++++ query/exec/filter_test.go | 67 ++++++++++++++++++ query/exec/limiter.go | 35 ++++++++++ query/exec/limiter_test.go | 72 +++++++++++++++++++ query/exec/projector.go | 5 ++ query/producer.go | 10 +++ query/record.go | 82 ++++++++++++++++++++++ 10 files changed, 426 insertions(+) create mode 100644 query/data_source.go create mode 100644 query/exec/aggregator.go create mode 100644 query/exec/executor_combination_test.go create mode 100644 query/exec/filter.go create mode 100644 query/exec/filter_test.go create mode 100644 query/exec/limiter.go create mode 100644 query/exec/limiter_test.go create mode 100644 query/exec/projector.go create mode 100644 query/producer.go create mode 100644 query/record.go diff --git a/query/data_source.go b/query/data_source.go new file mode 100644 index 00000000..bd515813 --- /dev/null +++ b/query/data_source.go @@ -0,0 +1,22 @@ +package query + +import "github.com/ozontech/seq-db/frac" + +type DataSource interface { + Scan() (*Record, bool) +} + +type FractionDataSource struct { + frac frac.Fraction + // TODO: +} + +func NewFractionDatasource() *FractionDataSource { + // TODO: + return &FractionDataSource{} +} + +func (s *FractionDataSource) Next() (*Record, bool) { + // TODO: + return nil, false +} diff --git a/query/exec/aggregator.go b/query/exec/aggregator.go new file mode 100644 index 00000000..e03f2b6c --- /dev/null +++ b/query/exec/aggregator.go @@ -0,0 +1,5 @@ +package exec + +type Aggregator struct { + // TODO: aggregate +} diff --git a/query/exec/executor_combination_test.go b/query/exec/executor_combination_test.go new file mode 100644 index 00000000..7832c314 --- /dev/null +++ b/query/exec/executor_combination_test.go @@ -0,0 +1,36 @@ +package exec + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/ozontech/seq-db/query" +) + +func TestExecutorsCombination(t *testing.T) { + inputData := makeTestInputRecords(10) + producer := testProducer{data: inputData} + + const ( + cond = 5 + limit = 2 + ) + + wantData := make([]*query.Record, 0) + for _, r := range inputData { + if r.Vals[0].Decoded().(uint32) > uint32(cond) { + wantData = append(wantData, r) + } + } + + filter := NewFilter(&producer, 0, NewGt[uint32](cond)) + limiter := NewLimiter(filter, limit) + + outputData := make([]*query.Record, 0) + for r, has := limiter.Next(); has; r, has = limiter.Next() { + outputData = append(outputData, r) + } + + assert.Equal(t, wantData[:limit], outputData) +} diff --git a/query/exec/filter.go b/query/exec/filter.go new file mode 100644 index 00000000..a337c4fe --- /dev/null +++ b/query/exec/filter.go @@ -0,0 +1,92 @@ +package exec + +import ( + "cmp" + + "github.com/ozontech/seq-db/query" +) + +type FilterExpr[T any] interface { + Eval(T) bool +} + +type Filter[T any] struct { + input query.RecordProducer + + colIdx int + expr FilterExpr[T] +} + +func NewFilter[T any]( + input query.RecordProducer, + colIdx int, + expr FilterExpr[T], +) *Filter[T] { + return &Filter[T]{ + input: input, + expr: expr, + } +} + +func (f *Filter[T]) Next() (*query.Record, bool) { + for { + r, has := f.input.Next() + if !has { + return nil, false + } + + // TODO: some comparisons don't need decoded data + passes := f.expr.Eval(r.Vals[f.colIdx].Decoded().(T)) + if passes { + return r, true + } + } +} + +type Eq[T comparable] struct { + pred T +} + +func NewEq[T comparable]( + pred T, +) *Eq[T] { + return &Eq[T]{ + pred: pred, + } +} + +func (e *Eq[T]) Eval(other T) bool { + return other == e.pred +} + +type Gt[T cmp.Ordered] struct { + pred T +} + +func NewGt[T cmp.Ordered]( + pred T, +) *Gt[T] { + return &Gt[T]{ + pred: pred, + } +} + +func (e *Gt[T]) Eval(other T) bool { + return other > e.pred +} + +type Lt[T cmp.Ordered] struct { + pred T +} + +func NewLt[T cmp.Ordered]( + pred T, +) *Lt[T] { + return &Lt[T]{ + pred: pred, + } +} + +func (e *Lt[T]) Eval(other T) bool { + return other < e.pred +} diff --git a/query/exec/filter_test.go b/query/exec/filter_test.go new file mode 100644 index 00000000..a5f9292b --- /dev/null +++ b/query/exec/filter_test.go @@ -0,0 +1,67 @@ +package exec + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/ozontech/seq-db/query" +) + +func TestFilterEq(t *testing.T) { + const cond = 5 + + filterExpr := NewEq[uint32](cond) + + testFilter(t, 0, filterExpr, func(r *query.Record) bool { + return r.Vals[0].Decoded().(uint32) == uint32(cond) + }) +} + +func TestFilterGt(t *testing.T) { + const cond = 5 + + filterExpr := NewGt[uint32](cond) + + testFilter(t, 0, filterExpr, func(r *query.Record) bool { + return r.Vals[0].Decoded().(uint32) > uint32(cond) + }) +} + +func TestFilterLt(t *testing.T) { + const cond = 5 + + filterExpr := NewLt[uint32](cond) + + testFilter(t, 0, filterExpr, func(r *query.Record) bool { + return r.Vals[0].Decoded().(uint32) < uint32(cond) + }) +} + +func testFilter( + t *testing.T, + colIdx int, + filterExpr FilterExpr[uint32], + wantFilterFunc func(*query.Record) bool, +) { + t.Helper() + + inputData := makeTestInputRecords(10) + input := testProducer{data: inputData} + + wantData := make([]*query.Record, 0) + for _, r := range inputData { + if wantFilterFunc(r) { + wantData = append(wantData, r) + } + } + + filter := NewFilter(&input, colIdx, filterExpr) + + outputData := make([]*query.Record, 0) + for r, has := filter.Next(); has; r, has = filter.Next() { + outputData = append(outputData, r) + } + + assert.Equal(t, wantData, outputData) +} diff --git a/query/exec/limiter.go b/query/exec/limiter.go new file mode 100644 index 00000000..134c6d7c --- /dev/null +++ b/query/exec/limiter.go @@ -0,0 +1,35 @@ +package exec + +import "github.com/ozontech/seq-db/query" + +type Limiter struct { + input query.RecordProducer + + limit uint32 + produced uint32 +} + +func NewLimiter( + input query.RecordProducer, + limit uint32, +) *Limiter { + return &Limiter{ + input: input, + limit: limit, + } +} + +func (l *Limiter) Next() (*query.Record, bool) { + if l.produced >= l.limit { + return nil, false + } + + r, has := l.input.Next() + if !has { + return nil, false + } + + l.produced++ + + return r, true +} diff --git a/query/exec/limiter_test.go b/query/exec/limiter_test.go new file mode 100644 index 00000000..f108ccae --- /dev/null +++ b/query/exec/limiter_test.go @@ -0,0 +1,72 @@ +package exec + +import ( + "encoding/binary" + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/ozontech/seq-db/query" +) + +func TestLimiterLessThanInputLen(t *testing.T) { + const limit = 5 + testLimiter(t, limit) +} + +func TestLimiterGreaterThanInputLen(t *testing.T) { + const limit = 50 + testLimiter(t, limit) +} + +func testLimiter(t *testing.T, limit uint32) { + t.Helper() + + inputData := makeTestInputRecords(10) + input := testProducer{data: inputData} + + limiter := NewLimiter(&input, limit) + + outputData := make([]*query.Record, 0) + for r, has := limiter.Next(); has; r, has = limiter.Next() { + outputData = append(outputData, r) + } + + assert.Equal(t, inputData[:min(len(inputData), int(limit))], outputData) +} + +type testProducer struct { + data []*query.Record + cur int +} + +func (p *testProducer) Next() (*query.Record, bool) { + if p.cur >= len(p.data) { + return nil, false + } + + r := p.data[p.cur] + p.cur++ + + return r, true +} + +func makeTestInputRecords(count int) []*query.Record { + out := make([]*query.Record, 0, count) + + for i := range count { + out = append(out, &query.Record{ + Vals: []*query.RecordVals{ + query.NewRecordVals(query.DataTypeUint32, Uint32ToBytes(uint32(i))), + }, + }) + } + + return out +} + +func Uint32ToBytes(val uint32) []byte { + b := make([]byte, 8) + binary.LittleEndian.PutUint32(b, val) + return b +} diff --git a/query/exec/projector.go b/query/exec/projector.go new file mode 100644 index 00000000..092189d6 --- /dev/null +++ b/query/exec/projector.go @@ -0,0 +1,5 @@ +package exec + +type Projection struct { + // TODO: project (now it's fields filter) +} diff --git a/query/producer.go b/query/producer.go new file mode 100644 index 00000000..39bab6d7 --- /dev/null +++ b/query/producer.go @@ -0,0 +1,10 @@ +package query + +type RecordProducer interface { + // TODO: Next() (*Record, metadata) // где в мете ошибка + какая-нибудь дополнительная инфа + Next() (*Record, bool) // TODO: record as interface (???) +} + +type BatchedRecordProducer interface { + NextBatch() ([]*Record, bool) +} diff --git a/query/record.go b/query/record.go new file mode 100644 index 00000000..4d0fbeb5 --- /dev/null +++ b/query/record.go @@ -0,0 +1,82 @@ +package query + +import ( + "encoding/binary" + "fmt" +) + +type RecordType byte + +// TODO: do we need it? only AggState? +const ( + RecordTypeDocument RecordType = iota + RecordTypeAggregation +) + +// executors make use of val's index, executor's parameters has colIdx field +type Record struct { + Vals []*RecordVals +} + +func NewRecord(vals []*RecordVals) *Record { + return &Record{ + Vals: vals, + } +} + +type DataType byte + +const ( + DataTypeBytes DataType = iota + DataTypeDocument + DataTypeString + DataTypeUint32 + DataTypeUint64 + DataTypeInt32 + DataTypeInt64 + DataTypeFloat64 + // TODO: the rest of types +) + +// TODO: executors make use of val's index. the plan knows which executors use which col indexes +type RecordVals struct { + Type DataType + + // for lazy decoding + rawData []byte // raw data + + // TODO: which type: + // 1 - any + type switch/assert + // 2 - interface with Eval() method, (like Datum in cockroach) + decoded any +} + +func NewRecordVals(dataType DataType, rawData []byte) *RecordVals { + return &RecordVals{ + Type: dataType, + rawData: rawData, + } +} + +func (rv *RecordVals) Decoded() any { + if rv.decoded == nil { + rv.ensureDecoded() + } + return rv.decoded +} + +func (rv *RecordVals) ensureDecoded() { + // TODO: all types + switch rv.Type { + case DataTypeBytes: + rv.decoded = rv.rawData + case DataTypeString: + rv.decoded = string(rv.rawData) + case DataTypeUint32: + rv.decoded = binary.LittleEndian.Uint32(rv.rawData) + case DataTypeUint64: + rv.decoded = binary.LittleEndian.Uint64(rv.rawData) + default: + panic(fmt.Errorf("unknown data type")) // TODO: ??? + } +}