types.go 828 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package stackdriver
  2. import (
  3. "net/url"
  4. "time"
  5. )
  6. type StackdriverQuery struct {
  7. Target string
  8. Params url.Values
  9. RefID string
  10. GroupBys []string
  11. }
  12. type StackdriverResponse struct {
  13. TimeSeries []struct {
  14. Metric struct {
  15. Labels map[string]string `json:"labels"`
  16. Type string `json:"type"`
  17. } `json:"metric"`
  18. Resource struct {
  19. Type string `json:"type"`
  20. Labels map[string]string `json:"labels"`
  21. } `json:"resource"`
  22. MetricKind string `json:"metricKind"`
  23. ValueType string `json:"valueType"`
  24. Points []struct {
  25. Interval struct {
  26. StartTime time.Time `json:"startTime"`
  27. EndTime time.Time `json:"endTime"`
  28. } `json:"interval"`
  29. Value struct {
  30. DoubleValue float64 `json:"doubleValue"`
  31. } `json:"value"`
  32. } `json:"points"`
  33. } `json:"timeSeries"`
  34. }