models.go 885 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. UseRawQuery bool
  11. Alias string
  12. Interval string
  13. }
  14. type Tag struct {
  15. Key string
  16. Operator string
  17. Value string
  18. Condition string
  19. }
  20. type Select []QueryPart
  21. type InfluxDbSelect struct {
  22. Type string
  23. }
  24. type Response struct {
  25. Results []Result
  26. Err error
  27. }
  28. type Result struct {
  29. Series []Row
  30. Messages []*Message
  31. Err error
  32. }
  33. type Message struct {
  34. Level string `json:"level,omitempty"`
  35. Text string `json:"text,omitempty"`
  36. }
  37. type Row struct {
  38. Name string `json:"name,omitempty"`
  39. Tags map[string]string `json:"tags,omitempty"`
  40. Columns []string `json:"columns,omitempty"`
  41. Values [][]interface{} `json:"values,omitempty"`
  42. }