service

package
v0.0.0-...-fb7f86c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2023 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProvideDashboardPluginService

func ProvideDashboardPluginService(
	features featuremgmt.FeatureToggles, orig *DashboardServiceImpl,
) dashboards.PluginService

Types

type DashboardServiceImpl

type DashboardServiceImpl struct {
	// contains filtered or unexported fields
}

func ProvideDashboardServiceImpl

func ProvideDashboardServiceImpl(
	cfg *setting.Cfg, dashboardStore dashboards.Store, folderStore folder.FolderStore, dashAlertExtractor alerting.DashAlertExtractor,
	features featuremgmt.FeatureToggles, folderPermissionsService accesscontrol.FolderPermissionsService,
	dashboardPermissionsService accesscontrol.DashboardPermissionsService, ac accesscontrol.AccessControl,
	folderSvc folder.Service,
) (*DashboardServiceImpl, error)

This is the uber service that implements a three smaller services

func (*DashboardServiceImpl) BuildSaveDashboardCommand

func (dr *DashboardServiceImpl) BuildSaveDashboardCommand(ctx context.Context, dto *dashboards.SaveDashboardDTO, shouldValidateAlerts bool,
	validateProvisionedDashboard bool) (*dashboards.SaveDashboardCommand, error)

func (DashboardServiceImpl) CountInFolder

func (dr DashboardServiceImpl) CountInFolder(ctx context.Context, orgID int64, folderUID string, u *user.SignedInUser) (int64, error)

func (*DashboardServiceImpl) DeleteACLByUser

func (dr *DashboardServiceImpl) DeleteACLByUser(ctx context.Context, userID int64) error

func (*DashboardServiceImpl) DeleteDashboard

func (dr *DashboardServiceImpl) DeleteDashboard(ctx context.Context, dashboardId int64, orgId int64) error

DeleteDashboard removes dashboard from the DB. Errors out if the dashboard was provisioned. Should be used for operations by the user where we want to make sure user does not delete provisioned dashboard.

func (*DashboardServiceImpl) DeleteInFolder

func (dr *DashboardServiceImpl) DeleteInFolder(ctx context.Context, orgID int64, folderUID string, u *user.SignedInUser) error

func (*DashboardServiceImpl) DeleteOrphanedProvisionedDashboards

func (dr *DashboardServiceImpl) DeleteOrphanedProvisionedDashboards(ctx context.Context, cmd *dashboards.DeleteOrphanedProvisionedDashboardsCommand) error

func (*DashboardServiceImpl) DeleteProvisionedDashboard

func (dr *DashboardServiceImpl) DeleteProvisionedDashboard(ctx context.Context, dashboardId int64, orgId int64) error

DeleteProvisionedDashboard removes dashboard from the DB even if it is provisioned.

func (*DashboardServiceImpl) GetDashboard

func (*DashboardServiceImpl) GetDashboardACLInfoList

func (*DashboardServiceImpl) GetDashboardByPublicUid

func (dr *DashboardServiceImpl) GetDashboardByPublicUid(ctx context.Context, dashboardPublicUid string) (*dashboards.Dashboard, error)

func (*DashboardServiceImpl) GetDashboardTags

func (*DashboardServiceImpl) GetDashboardUIDByID

func (*DashboardServiceImpl) GetDashboards

func (*DashboardServiceImpl) GetDashboardsByPluginID

func (*DashboardServiceImpl) GetProvisionedDashboardData

func (dr *DashboardServiceImpl) GetProvisionedDashboardData(ctx context.Context, name string) ([]*dashboards.DashboardProvisioning, error)

func (*DashboardServiceImpl) GetProvisionedDashboardDataByDashboardID

func (dr *DashboardServiceImpl) GetProvisionedDashboardDataByDashboardID(ctx context.Context, dashboardID int64) (*dashboards.DashboardProvisioning, error)

func (*DashboardServiceImpl) GetProvisionedDashboardDataByDashboardUID

func (dr *DashboardServiceImpl) GetProvisionedDashboardDataByDashboardUID(ctx context.Context, orgID int64, dashboardUID string) (*dashboards.DashboardProvisioning, error)

func (*DashboardServiceImpl) ImportDashboard

func (*DashboardServiceImpl) Kind

func (dr *DashboardServiceImpl) Kind() string

func (*DashboardServiceImpl) MakeUserAdmin

func (dr *DashboardServiceImpl) MakeUserAdmin(ctx context.Context, orgID int64, userID int64, dashboardID int64, setViewAndEditPermissions bool) error

func (*DashboardServiceImpl) SaveDashboard

func (dr *DashboardServiceImpl) SaveDashboard(ctx context.Context, dto *dashboards.SaveDashboardDTO,
	allowUiUpdate bool) (*dashboards.Dashboard, error)

func (*DashboardServiceImpl) SaveFolderForProvisionedDashboards

func (dr *DashboardServiceImpl) SaveFolderForProvisionedDashboards(ctx context.Context, dto *dashboards.SaveDashboardDTO) (*dashboards.Dashboard, error)

func (*DashboardServiceImpl) SaveProvisionedDashboard

func (dr *DashboardServiceImpl) SaveProvisionedDashboard(ctx context.Context, dto *dashboards.SaveDashboardDTO,
	provisioning *dashboards.DashboardProvisioning) (*dashboards.Dashboard, error)

func (*DashboardServiceImpl) SearchDashboards

func (*DashboardServiceImpl) UnprovisionDashboard

func (dr *DashboardServiceImpl) UnprovisionDashboard(ctx context.Context, dashboardId int64) error

UnprovisionDashboard removes info about dashboard being provisioned. Used after provisioning configs are changed and provisioned dashboards are left behind but not deleted.

func (*DashboardServiceImpl) UpdateDashboardACL

func (dr *DashboardServiceImpl) UpdateDashboardACL(ctx context.Context, uid int64, items []*dashboards.DashboardACL) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL