models.go 845 B

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