2016-10-04 16:25:33 +02:00
|
|
|
package influxdb
|
2016-10-04 21:28:05 +02:00
|
|
|
|
2017-11-15 11:22:00 +01:00
|
|
|
import "time"
|
|
|
|
|
2016-10-05 10:56:34 +02:00
|
|
|
type Query struct {
|
2021-09-17 12:33:09 +02:00
|
|
|
Measurement string
|
|
|
|
Policy string
|
|
|
|
Tags []*Tag
|
|
|
|
GroupBy []*QueryPart
|
|
|
|
Selects []*Select
|
|
|
|
RawQuery string
|
|
|
|
UseRawQuery bool
|
|
|
|
Alias string
|
|
|
|
Interval time.Duration
|
|
|
|
Tz string
|
2022-02-09 18:26:16 +00:00
|
|
|
Limit string
|
|
|
|
Slimit string
|
|
|
|
OrderByTime string
|
|
|
|
RefID string
|
2016-10-04 21:28:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type Tag struct {
|
2016-10-05 16:57:32 +02:00
|
|
|
Key string
|
|
|
|
Operator string
|
|
|
|
Value string
|
|
|
|
Condition string
|
2016-10-04 21:28:05 +02:00
|
|
|
}
|
|
|
|
|
2016-10-05 10:56:34 +02:00
|
|
|
type Select []QueryPart
|
|
|
|
|
2016-10-06 14:16:26 +02:00
|
|
|
type Response struct {
|
|
|
|
Results []Result
|
2021-04-22 08:43:17 +02:00
|
|
|
Error string
|
2016-10-06 14:16:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type Result struct {
|
|
|
|
Series []Row
|
|
|
|
Messages []*Message
|
2021-04-22 08:43:17 +02:00
|
|
|
Error string
|
2016-10-06 14:16:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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"`
|
|
|
|
}
|