grafana/pkg/tsdb/influxdb/models.go

49 lines
824 B
Go
Raw Normal View History

package influxdb
2016-10-04 14:28:05 -05:00
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-07 04:33:17 -05:00
Interval string
2016-10-04 14:28:05 -05:00
}
type Tag struct {
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"`
}