models.go 866 B

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