2016-10-04 09:25:33 -05:00
|
|
|
package influxdb
|
2016-10-04 14:28:05 -05:00
|
|
|
|
2017-11-15 04:22:00 -06:00
|
|
|
import "time"
|
|
|
|
|
2016-10-05 03:56:34 -05:00
|
|
|
type Query struct {
|
2016-10-04 14:28:05 -05:00
|
|
|
Measurement string
|
|
|
|
Policy string
|
|
|
|
ResultFormat string
|
2016-10-05 03:56:34 -05:00
|
|
|
Tags []*Tag
|
|
|
|
GroupBy []*QueryPart
|
|
|
|
Selects []*Select
|
2016-10-11 11:29:09 -05:00
|
|
|
RawQuery string
|
2016-11-10 07:16:18 -06:00
|
|
|
UseRawQuery bool
|
2016-11-08 12:22:59 -06:00
|
|
|
Alias string
|
2017-11-15 04:22:00 -06:00
|
|
|
Interval time.Duration
|
2018-12-21 09:38:53 -06:00
|
|
|
Tz string
|
2016-10-04 14:28:05 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
type Tag struct {
|
2016-10-05 09:57:32 -05:00
|
|
|
Key string
|
|
|
|
Operator string
|
|
|
|
Value string
|
|
|
|
Condition string
|
2016-10-04 14:28:05 -05:00
|
|
|
}
|
|
|
|
|
2016-10-05 03:56:34 -05:00
|
|
|
type Select []QueryPart
|
|
|
|
|
2016-10-04 14:28:05 -05:00
|
|
|
type InfluxDbSelect struct {
|
|
|
|
Type string
|
|
|
|
}
|
2016-10-06 07:16:26 -05:00
|
|
|
|
|
|
|
type Response struct {
|
|
|
|
Results []Result
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
|
|
|
type Result struct {
|
|
|
|
Series []Row
|
|
|
|
Messages []*Message
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
|
|
|
type Message struct {
|
|
|
|
Level string `json:"level,omitempty"`
|
|
|
|
Text string `json:"text,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Row struct {
|
|
|
|
Name string `json:"name,omitempty"`
|
|
|
|
Tags map[string]string `json:"tags,omitempty"`
|
|
|
|
Columns []string `json:"columns,omitempty"`
|
|
|
|
Values [][]interface{} `json:"values,omitempty"`
|
|
|
|
}
|