models.go 931 B

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