Files
grafana/pkg/tsdb/influxdb/models.go

53 lines
937 B
Go
Raw Normal View History

package influxdb
2016-10-04 21:28:05 +02:00
import "time"
2016-10-05 10:56:34 +02:00
type Query struct {
Measurement string
Policy string
Tags []*Tag
GroupBy []*QueryPart
Selects []*Select
RawQuery string
UseRawQuery bool
Alias string
Interval time.Duration
Tz string
Limit string
Slimit string
OrderByTime string
RefID string
2016-10-04 21:28:05 +02:00
}
type Tag struct {
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
Error string
2016-10-06 14:16:26 +02:00
}
type Result struct {
Series []Row
Messages []*Message
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"`
}