dashboard_snapshot.go 1015 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. package models
  2. import "time"
  3. // DashboardSnapshot model
  4. type DashboardSnapshot struct {
  5. Id int64
  6. Name string
  7. Key string
  8. DeleteKey string
  9. OrgId int64
  10. UserId int64
  11. External bool
  12. ExternalUrl string
  13. Expires time.Time
  14. Created time.Time
  15. Updated time.Time
  16. Dashboard map[string]interface{}
  17. }
  18. // -----------------
  19. // COMMANDS
  20. type CreateDashboardSnapshotCommand struct {
  21. Dashboard map[string]interface{} `json:"dashboard" binding:"Required"`
  22. Name string `json:"name" binding:"Required"`
  23. Expires int64 `json:"expires"`
  24. // these are passed when storing an external snapshot ref
  25. External bool `json:"external"`
  26. Key string `json:"key"`
  27. DeleteKey string `json:"deleteKey"`
  28. OrgId int64 `json:"-"`
  29. UserId int64 `json:"-"`
  30. Result *DashboardSnapshot
  31. }
  32. type DeleteDashboardSnapshotCommand struct {
  33. DeleteKey string `json:"-"`
  34. }
  35. type GetDashboardSnapshotQuery struct {
  36. Key string
  37. Result *DashboardSnapshot
  38. }