annotations.go 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. TimeEnd int64 `json:"timeEnd,omitempty"` // Optional
  8. Text string `json:"text"`
  9. Tags []string `json:"tags"`
  10. Data *simplejson.Json `json:"data"`
  11. }
  12. type UpdateAnnotationsCmd struct {
  13. Id int64 `json:"id"`
  14. Time int64 `json:"time"`
  15. TimeEnd int64 `json:"timeEnd,omitempty"` // Optional
  16. Text string `json:"text"`
  17. Tags []string `json:"tags"`
  18. }
  19. type PatchAnnotationsCmd struct {
  20. Id int64 `json:"id"`
  21. Time int64 `json:"time"`
  22. TimeEnd int64 `json:"timeEnd,omitempty"` // Optional
  23. Text string `json:"text"`
  24. Tags []string `json:"tags"`
  25. }
  26. type DeleteAnnotationsCmd struct {
  27. AlertId int64 `json:"alertId"`
  28. DashboardId int64 `json:"dashboardId"`
  29. PanelId int64 `json:"panelId"`
  30. AnnotationId int64 `json:"annotationId"`
  31. }
  32. type PostGraphiteAnnotationsCmd struct {
  33. When int64 `json:"when"`
  34. What string `json:"what"`
  35. Data string `json:"data"`
  36. Tags interface{} `json:"tags"`
  37. }