grafana/pkg/models/star.go
Arve Knudsen 3d3a7cbba8
Chore: Fix staticcheck issues (#28860)
* Chore: Fix issues reported by staticcheck

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Undo changes

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Chore: Fix issues reported by staticcheck

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix test

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix test

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-05 13:07:06 +01:00

41 lines
601 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 map[int64]bool // dashboard ids
}
type IsStarredByUserQuery struct {
UserId int64
DashboardId int64
Result bool
}