mirror of
https://github.com/grafana/grafana.git
synced 2024-11-29 20:24:18 -06:00
518a0d0458
Require guardian.New to take context.Context as first argument. Migrates the GetDashboardAclInfoListQuery to be dispatched using context. Ref #36734 Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com> Co-authored-by: sam boyer <sam.boyer@grafana.com>
23 lines
1021 B
Go
23 lines
1021 B
Go
package dashboards
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/grafana/grafana/pkg/models"
|
|
)
|
|
|
|
// Store is a dashboard store.
|
|
type Store interface {
|
|
// ValidateDashboardBeforeSave validates a dashboard before save.
|
|
ValidateDashboardBeforeSave(dashboard *models.Dashboard, overwrite bool) (bool, error)
|
|
// GetFolderByTitle retrieves a dashboard by its title and is used by unified alerting
|
|
GetFolderByTitle(orgID int64, title string) (*models.Dashboard, error)
|
|
GetProvisionedDataByDashboardID(dashboardID int64) (*models.DashboardProvisioning, error)
|
|
GetProvisionedDashboardData(name string) ([]*models.DashboardProvisioning, error)
|
|
SaveProvisionedDashboard(cmd models.SaveDashboardCommand, provisioning *models.DashboardProvisioning) (*models.Dashboard, error)
|
|
SaveDashboard(cmd models.SaveDashboardCommand) (*models.Dashboard, error)
|
|
UpdateDashboardACLCtx(ctx context.Context, uid int64, items []*models.DashboardAcl) error
|
|
// SaveAlerts saves dashboard alerts.
|
|
SaveAlerts(dashID int64, alerts []*models.Alert) error
|
|
}
|