Dashboard snapshot: added delete key which can be used to delete snapshots, #1623

This commit is contained in:
Torkel Ödegaard
2015-03-26 20:34:58 +01:00
parent 7d0ae23c0e
commit 4322f29f34
7 changed files with 97 additions and 26 deletions
+20 -9
View File
@@ -4,10 +4,14 @@ import "time"
// DashboardSnapshot model
type DashboardSnapshot struct {
Id int64
Name string
Key string
OrgId int64
Id int64
Name string
Key string
DeleteKey string
OrgId int64
UserId int64
External bool
ExternalUrl string
Expires time.Time
Created time.Time
@@ -20,16 +24,23 @@ type DashboardSnapshot struct {
// COMMANDS
type CreateDashboardSnapshotCommand struct {
Dashboard map[string]interface{} `json:"dashboard" binding:"Required"`
External bool `json:"external"`
Expires int64 `json:"expires"`
Dashboard map[string]interface{} `json:"dashboard" binding:"Required"`
External bool `json:"external"`
ExternalUrl string `json:"externalUrl"`
Expires int64 `json:"expires"`
OrgId int64 `json:"-"`
Key string `json:"-"`
OrgId int64 `json:"-"`
UserId int64 `json:"-"`
Key string `json:"-"`
DeleteKey string `json:"-"`
Result *DashboardSnapshot
}
type DeleteDashboardSnapshotCommand struct {
DeleteKey string `json:"-"`
}
type GetDashboardSnapshotQuery struct {
Key string