more work on dashboard snapshots

This commit is contained in:
Torkel Ödegaard
2015-03-21 08:53:16 -04:00
parent a76758255f
commit 964f0861d6
13 changed files with 240 additions and 21 deletions
+33
View File
@@ -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
}
+4
View File
@@ -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")