more work on dashboard snapshots
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
// DashboardSnapshot model
|
||||
type DashboardSnapshot struct {
|
||||
Id int64
|
||||
Name string
|
||||
Key string
|
||||
|
||||
Expires time.Time
|
||||
Created time.Time
|
||||
Updated time.Time
|
||||
|
||||
Dashboard map[string]interface{}
|
||||
}
|
||||
|
||||
// -----------------
|
||||
// COMMANDS
|
||||
|
||||
type CreateDashboardSnapshotCommand struct {
|
||||
Dashboard map[string]interface{} `json:"dashboard" binding:"Required"`
|
||||
|
||||
Key string `json:"-"`
|
||||
|
||||
Result *DashboardSnapshot
|
||||
}
|
||||
|
||||
type GetDashboardSnapshotQuery struct {
|
||||
Key string
|
||||
|
||||
Result *DashboardSnapshot
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package models
|
||||
|
||||
import "errors"
|
||||
|
||||
type OAuthType int
|
||||
|
||||
const (
|
||||
@@ -7,3 +9,5 @@ const (
|
||||
GOOGLE
|
||||
TWITTER
|
||||
)
|
||||
|
||||
var ErrNotFound = errors.New("Not found")
|
||||
|
||||
Reference in New Issue
Block a user