Files
grafana/pkg/services/dashboardversion/model.go
T
idafurjes f69c9bd704 Split Delete expired dashboard version store (#49610)
* Split Delete expired dashboard version store

* Add method to fakes

* Fix lint

* Fix lint 2

* Use split store method in cleanup

* Add tests

* Remove DeleteExpiredVersions from sqlstore

* Fix lint

* Fix integration tests
2022-05-31 11:56:05 +02:00

38 lines
843 B
Go

package dashver
import (
"errors"
"time"
"github.com/grafana/grafana/pkg/components/simplejson"
)
var (
ErrDashboardVersionNotFound = errors.New("dashboard version not found")
ErrNoVersionsForDashboardId = errors.New("no dashboard versions found for the given DashboardId")
)
type DashboardVersion struct {
ID int64 `json:"id"`
DashboardID int64 `json:"dashboardId"`
ParentVersion int `json:"parentVersion"`
RestoredFrom int `json:"restoredFrom"`
Version int `json:"version"`
Created time.Time `json:"created"`
CreatedBy int64 `json:"createdBy"`
Message string `json:"message"`
Data *simplejson.Json `json:"data"`
}
type GetDashboardVersionQuery struct {
DashboardID int64
OrgID int64
Version int
}
type DeleteExpiredVersionsCommand struct {
DeletedRows int64
}