Dashboard snapshot: added delete key which can be used to delete snapshots, #1623
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user