3 changed files with 61 additions and 3 deletions
@ -0,0 +1,58 @@ |
|||
package models |
|||
|
|||
import "time" |
|||
|
|||
type EsThemeAggDateHistogram struct { |
|||
Took int `json:"took"` |
|||
TimedOut bool `json:"timed_out"` |
|||
Shards struct { |
|||
Total int `json:"total"` |
|||
Successful int `json:"successful"` |
|||
Skipped int `json:"skipped"` |
|||
Failed int `json:"failed"` |
|||
} `json:"_shards"` |
|||
Hits struct { |
|||
Total int `json:"total"` |
|||
MaxScore float64 `json:"max_score"` |
|||
Hits []interface{} `json:"hits"` |
|||
} `json:"hits"` |
|||
Aggregations GPBySensorIdAggByDateHistogram `json:"aggregations"` |
|||
} |
|||
type GPBySensorIdAggByDateHistogram struct { |
|||
GroupSensor struct { |
|||
DocCountErrorUpperBound int `json:"doc_count_error_upper_bound"` |
|||
SumOtherDocCount int `json:"sum_other_doc_count"` |
|||
Buckets []Buckets `json:"buckets"` |
|||
} `json:"groupSensor"` |
|||
} |
|||
|
|||
type Buckets struct { |
|||
Key int `json:"key"` |
|||
DocCount int `json:"doc_count"` |
|||
GroupDate struct { |
|||
Buckets []BucketsXY `json:"buckets"` |
|||
} `json:"groupDate"` |
|||
} |
|||
|
|||
type BucketsXY struct { |
|||
KeyAsString time.Time `json:"key_as_string"` |
|||
Key int64 `json:"key"` |
|||
DocCount int `json:"doc_count"` |
|||
X ExtendedStats `json:"x"` |
|||
Y ExtendedStats `json:"y"` |
|||
} |
|||
|
|||
type ExtendedStats struct { |
|||
Count int `json:"count"` |
|||
Min float64 `json:"min"` |
|||
Max float64 `json:"max"` |
|||
Avg float64 `json:"avg"` |
|||
Sum float64 `json:"sum"` |
|||
SumOfSquares float64 `json:"sum_of_squares"` |
|||
Variance float64 `json:"variance"` |
|||
StdDeviation float64 `json:"std_deviation"` |
|||
StdDeviationBounds struct { |
|||
Upper float64 `json:"upper"` |
|||
Lower float64 `json:"lower"` |
|||
} `json:"std_deviation_bounds"` |
|||
} |
Loading…
Reference in new issue