grafana/pkg/tsdb/influxdb/models.go

50 lines
888 B
Go
Raw Normal View History

package influxdb
2016-10-05 03:28:05 +08:00
import "time"
2016-10-05 16:56:34 +08:00
type Query struct {
2016-10-05 03:28:05 +08:00
Measurement string
Policy string
ResultFormat string
2016-10-05 16:56:34 +08:00
Tags []*Tag
GroupBy []*QueryPart
Selects []*Select
RawQuery string
UseRawQuery bool
2016-11-09 02:22:59 +08:00
Alias string
Interval time.Duration
Tz string
2016-10-05 03:28:05 +08:00
}
type Tag struct {
Key string
Operator string
Value string
Condition string
2016-10-05 03:28:05 +08:00
}
2016-10-05 16:56:34 +08:00
type Select []QueryPart
2016-10-06 20:16:26 +08:00
type Response struct {
Results []Result
Error string
2016-10-06 20:16:26 +08:00
}
type Result struct {
Series []Row
Messages []*Message
Error string
2016-10-06 20:16:26 +08: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"`
}