folderimpl

package
v11.1.4-modfix Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_BATCH_SIZE = 999
View Source
const FULLPATH_SEPARATOR = "/"

Variables

This section is empty.

Functions

func NewFakeStore

func NewFakeStore() *fakeStore

func NewGetFoldersQuery

func NewGetFoldersQuery(q folder.GetFoldersQuery) getFoldersQuery

func ProvideService

func ProvideService(
	ac accesscontrol.AccessControl,
	bus bus.Bus,
	dashboardStore dashboards.Store,
	folderStore folder.FolderStore,
	db db.DB,
	features featuremgmt.FeatureToggles,
	supportBundles supportbundles.Service,
	r prometheus.Registerer,
) folder.Service

func ProvideStore

func ProvideStore(db db.DB) *sqlStore

func SplitFullpath

func SplitFullpath(s string) []string

SplitFullpath splits a string into an array of strings using the FULLPATH_SEPARATOR as the delimiter. It handles escape characters by appending the separator and the new string if the current string ends with an escape character. The resulting array does not contain empty strings.

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, folderUID *string) (*folder.Folder, error)

func (*DashboardFolderStoreImpl) GetFolderByUID

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

func (*DashboardFolderStoreImpl) GetFolders

func (d *DashboardFolderStoreImpl) GetFolders(ctx context.Context, orgID int64, uids []string) (map[string]*folder.Folder, error)

GetFolders returns all folders for the given orgID and UIDs. If no UIDs are provided then all folders for the org are returned.

type Service

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

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, q *folder.GetChildrenQuery) ([]*folder.Folder, error)

func (*Service) GetDescendantCounts

func (*Service) GetFolders

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

func (*Service) GetParents

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

func (*Service) GetSharedWithMe

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

GetSharedWithMe returns folders available to user, which cannot be accessed from the root folders

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