models.go 910 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. package influxdb
  2. import "time"
  3. type Query struct {
  4. Measurement string
  5. Policy string
  6. ResultFormat string
  7. Tags []*Tag
  8. GroupBy []*QueryPart
  9. Selects []*Select
  10. RawQuery string
  11. UseRawQuery bool
  12. Alias string
  13. Interval time.Duration
  14. }
  15. type Tag struct {
  16. Key string
  17. Operator string
  18. Value string
  19. Condition string
  20. }
  21. type Select []QueryPart
  22. type InfluxDbSelect struct {
  23. Type string
  24. }
  25. type Response struct {
  26. Results []Result
  27. Err error
  28. }
  29. type Result struct {
  30. Series []Row
  31. Messages []*Message
  32. Err error
  33. }
  34. type Message struct {
  35. Level string `json:"level,omitempty"`
  36. Text string `json:"text,omitempty"`
  37. }
  38. type Row struct {
  39. Name string `json:"name,omitempty"`
  40. Tags map[string]string `json:"tags,omitempty"`
  41. Columns []string `json:"columns,omitempty"`
  42. Values [][]interface{} `json:"values,omitempty"`
  43. }