mirror of
https://github.com/grafana/grafana.git
synced 2024-11-30 12:44:10 -06:00
41 lines
576 B
Go
41 lines
576 B
Go
package models
|
|
|
|
import "errors"
|
|
|
|
var ErrCommandValidationFailed = errors.New("Command missing required fields")
|
|
|
|
type Star struct {
|
|
Id int64
|
|
UserId int64
|
|
DashboardId int64
|
|
}
|
|
|
|
// ----------------------
|
|
// COMMANDS
|
|
|
|
type StarDashboardCommand struct {
|
|
UserId int64
|
|
DashboardId int64
|
|
}
|
|
|
|
type UnstarDashboardCommand struct {
|
|
UserId int64
|
|
DashboardId int64
|
|
}
|
|
|
|
// ---------------------
|
|
// QUERIES
|
|
|
|
type GetUserStarsQuery struct {
|
|
UserId int64
|
|
|
|
Result []Star
|
|
}
|
|
|
|
type IsStarredByUserQuery struct {
|
|
UserId int64
|
|
DashboardId int64
|
|
|
|
Result bool
|
|
}
|