models.go 824 B

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