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.

38 lines
1020 B

package common_models
import "time"
type EsRaw struct {
StructId int `json:"structId"`
IotaDeviceName string `json:"iota_device_name"`
Data map[string]any `json:"data"`
CollectTime time.Time `json:"collect_time"`
Meta map[string]string `json:"meta"`
IotaDevice string `json:"iota_device"`
CreateTime time.Time `json:"create_time"`
}
type EsRawResp 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 []HitRaw `json:"hits"`
} `json:"hits"`
}
type HitRaw struct {
Index string `json:"_index"`
Type string `json:"_type"`
Id string `json:"_id"`
Score float64 `json:"_score"`
Source EsRaw `json:"_source"`
}