folderimpl

package
v0.0.0-kmdagger3 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFakeStore

func NewFakeStore() *fakeStore

func ProvideService

func ProvideService(
	ac accesscontrol.AccessControl,
	bus bus.Bus,
	cfg *setting.Cfg,
	dashboardStore dashboards.Store,
	folderStore folder.FolderStore,
	db db.DB,
	features featuremgmt.FeatureToggles,
) folder.Service

func ProvideStore

func ProvideStore(db db.DB, cfg *setting.Cfg, features featuremgmt.FeatureToggles) *sqlStore

Types

type DashboardFolderStoreImpl

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

DashboardStore implements the FolderStore interface It fetches folders from the dashboard DB table

func ProvideDashboardFolderStore

func ProvideDashboardFolderStore(sqlStore db.DB) *DashboardFolderStoreImpl

func (*DashboardFolderStoreImpl) GetFolderByID

func (d *DashboardFolderStoreImpl) GetFolderByID(ctx context.Context, orgID int64, id int64) (*folder.Folder, error)

func (*DashboardFolderStoreImpl) GetFolderByTitle

func (d *DashboardFolderStoreImpl) GetFolderByTitle(ctx context.Context, orgID int64, title string) (*folder.Folder, error)

func (*DashboardFolderStoreImpl) GetFolderByUID

func (d *DashboardFolderStoreImpl) GetFolderByUID(ctx context.Context, orgID int64, uid string) (*folder.Folder, error)

type Service

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

func (*Service) BuildSaveDashboardCommand

func (s *Service) BuildSaveDashboardCommand(ctx context.Context, dto *dashboards.SaveDashboardDTO) (*dashboards.SaveDashboardCommand, error)

BuildSaveDashboardCommand is a simplified version on DashboardServiceImpl.BuildSaveDashboardCommand keeping only the meaningful functionality for folders

func (*Service) Create

func (*Service) DBMigration

func (s *Service) DBMigration(db db.DB)

func (*Service) Delete

func (s *Service) Delete(ctx context.Context, cmd *folder.DeleteFolderCommand) error

func (*Service) Get

func (*Service) GetChildren

func (s *Service) GetChildren(ctx context.Context, cmd *folder.GetChildrenQuery) ([]*folder.Folder, error)

func (*Service) GetDescendantCounts

func (s *Service) GetDescendantCounts(ctx context.Context, cmd *folder.GetDescendantCountsQuery) (folder.DescendantCounts, error)

func (*Service) GetParents

func (s *Service) GetParents(ctx context.Context, q folder.GetParentsQuery) ([]*folder.Folder, error)

func (*Service) MakeUserAdmin

func (s *Service) MakeUserAdmin(ctx context.Context, orgID int64, userID, folderID int64, setViewAndEditPermissions bool) error

MakeUserAdmin is copy of DashboardServiceImpl.MakeUserAdmin

func (*Service) Move

func (*Service) RegisterService

func (s *Service) RegisterService(r folder.RegistryService) error

func (*Service) Update

Jump to

Keyboard shortcuts

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