数据 输入输出 处理
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.7 KiB

package HBJCAS
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 int64 `json:"key"`
DocCount int64 `json:"doc_count"`
GroupDate struct {
Buckets []BucketsXY `json:"buckets"`
} `json:"groupDate"`
}
type BucketsX struct {
KeyAsString time.Time `json:"key_as_string"`
Key int64 `json:"key"`
DocCount int `json:"doc_count"`
X ExtendedStats `json:"x"`
}
type BucketsXY struct {
BucketsX
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"`
}