types.go 845 B

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