grafana/pkg/tsdb/influxdb/models.go

54 lines
931 B
Go
Raw Normal View History

package influxdb
2016-10-04 14:28:05 -05: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
RawQuery string
UseRawQuery bool
2016-11-08 12:22:59 -06:00
Alias string
Interval time.Duration
Tz 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"`
}