types.go 803 B

123456789101112131415161718192021222324252627282930313233343536
  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. }
  11. type StackdriverResponse struct {
  12. TimeSeries []struct {
  13. Metric struct {
  14. Labels map[string]string `json:"labels"`
  15. Type string `json:"type"`
  16. } `json:"metric"`
  17. Resource struct {
  18. Type string `json:"type"`
  19. Labels map[string]string `json:"labels"`
  20. } `json:"resource"`
  21. MetricKind string `json:"metricKind"`
  22. ValueType string `json:"valueType"`
  23. Points []struct {
  24. Interval struct {
  25. StartTime time.Time `json:"startTime"`
  26. EndTime time.Time `json:"endTime"`
  27. } `json:"interval"`
  28. Value struct {
  29. DoubleValue float64 `json:"doubleValue"`
  30. } `json:"value"`
  31. } `json:"points"`
  32. } `json:"timeSeries"`
  33. }