github.com/siglens/siglens@v0.0.0-20240328180423-f7ce9ae441ed/pkg/ast/pipesearch/resultStructs.go (about) 1 /* 2 Copyright 2023. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package pipesearch 18 19 import "github.com/siglens/siglens/pkg/segment/structs" 20 21 type PipeSearchResponseOuter struct { 22 Hits PipeSearchResponse `json:"hits"` 23 Aggs map[string]AggregationResults `json:"aggregations"` 24 ElapedTimeMS int64 `json:"elapedTimeMS"` 25 AllPossibleColumns []string `json:"allColumns"` 26 Errors []string `json:"errors,omitempty"` 27 MeasureFunctions []string `json:"measureFunctions,omitempty"` 28 MeasureResults []*structs.BucketHolder `json:"measure,omitempty"` 29 GroupByCols []string `json:"groupByCols,omitempty"` 30 Qtype string `json:"qtype,omitempty"` 31 CanScrollMore bool `json:"can_scroll_more"` 32 TotalRRCCount interface{} `json:"total_rrc_count,omitempty"` 33 BucketCount int `json:"bucketCount,omitempty"` 34 DashboardPanelId string `json:"dashboardPanelId"` 35 } 36 37 type PipeSearchResponse struct { 38 TotalMatched interface{} `json:"totalMatched"` 39 Hits []map[string]interface{} `json:"records"` 40 } 41 42 type AggregationResults struct { 43 Buckets []map[string]interface{} `json:"buckets"` 44 } 45 46 type PipeSearchWSUpdateResponse struct { 47 Hits PipeSearchResponse `json:"hits,omitempty"` 48 AllPossibleColumns []string `json:"allColumns,omitempty"` 49 Completion float64 `json:"percent_complete"` 50 State string `json:"state,omitempty"` 51 TotalEventsSearched interface{} `json:"total_events_searched,omitempty"` 52 MeasureFunctions []string `json:"measureFunctions,omitempty"` 53 MeasureResults []*structs.BucketHolder `json:"measure,omitempty"` 54 GroupByCols []string `json:"groupByCols,omitempty"` 55 Qtype string `json:"qtype,omitempty"` 56 BucketCount int `json:"bucketCount,omitempty"` 57 SortByTimestampAtDefault bool `json:"sortByTimestampAtDefault"` 58 } 59 60 type PipeSearchCompleteResponse struct { 61 State string `json:"state,omitempty"` 62 TotalMatched interface{} `json:"totalMatched,omitempty"` 63 TotalEventsSearched interface{} `json:"total_events_searched,omitempty"` 64 CanScrollMore bool `json:"can_scroll_more"` 65 TotalRRCCount interface{} `json:"total_rrc_count,omitempty"` 66 MeasureFunctions []string `json:"measureFunctions,omitempty"` 67 MeasureResults []*structs.BucketHolder `json:"measure,omitempty"` 68 GroupByCols []string `json:"groupByCols,omitempty"` 69 Qtype string `json:"qtype,omitempty"` 70 BucketCount int `json:"bucketCount,omitempty"` 71 IsTimechart bool `json:"isTimechart"` 72 }