annotations.go 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package dtos
  2. import "github.com/grafana/grafana/pkg/components/simplejson"
  3. type PostAnnotationsCmd struct {
  4. DashboardId int64 `json:"dashboardId"`
  5. PanelId int64 `json:"panelId"`
  6. Time int64 `json:"time"`
  7. Text string `json:"text"`
  8. Tags []string `json:"tags"`
  9. Data *simplejson.Json `json:"data"`
  10. IsRegion bool `json:"isRegion"`
  11. TimeEnd int64 `json:"timeEnd"`
  12. }
  13. type UpdateAnnotationsCmd struct {
  14. Id int64 `json:"id"`
  15. Time int64 `json:"time"`
  16. Text string `json:"text"`
  17. Tags []string `json:"tags"`
  18. IsRegion bool `json:"isRegion"`
  19. TimeEnd int64 `json:"timeEnd"`
  20. }
  21. type PatchAnnotationsCmd struct {
  22. Id int64 `json:"id"`
  23. Time int64 `json:"time"`
  24. Text string `json:"text"`
  25. Tags []string `json:"tags"`
  26. TimeEnd int64 `json:"timeEnd"`
  27. }
  28. type DeleteAnnotationsCmd struct {
  29. AlertId int64 `json:"alertId"`
  30. DashboardId int64 `json:"dashboardId"`
  31. PanelId int64 `json:"panelId"`
  32. AnnotationId int64 `json:"annotationId"`
  33. RegionId int64 `json:"regionId"`
  34. }
  35. type PostGraphiteAnnotationsCmd struct {
  36. When int64 `json:"when"`
  37. What string `json:"what"`
  38. Data string `json:"data"`
  39. Tags interface{} `json:"tags"`
  40. }