Documentation
¶
Index ¶
- Constants
- func NewFakeStore() *fakeStore
- func NewGetFoldersQuery(q folder.GetFoldersQuery) getFoldersQuery
- func ProvideService(ac accesscontrol.AccessControl, bus bus.Bus, dashboardStore dashboards.Store, ...) folder.Service
- func ProvideStore(db db.DB) *sqlStore
- func SplitFullpath(s string) []string
- type DashboardFolderStoreImpl
- func (d *DashboardFolderStoreImpl) GetFolderByID(ctx context.Context, orgID int64, id int64) (*folder.Folder, error)
- func (d *DashboardFolderStoreImpl) GetFolderByTitle(ctx context.Context, orgID int64, title string, folderUID *string) (*folder.Folder, error)
- func (d *DashboardFolderStoreImpl) GetFolderByUID(ctx context.Context, orgID int64, uid string) (*folder.Folder, error)
- func (d *DashboardFolderStoreImpl) GetFolders(ctx context.Context, orgID int64, uids []string) (map[string]*folder.Folder, error)
- type Service
- func (s *Service) Create(ctx context.Context, cmd *folder.CreateFolderCommand) (*folder.Folder, error)
- func (s *Service) DBMigration(db db.DB)
- func (s *Service) Delete(ctx context.Context, cmd *folder.DeleteFolderCommand) error
- func (s *Service) Get(ctx context.Context, q *folder.GetFolderQuery) (*folder.Folder, error)
- func (s *Service) GetChildren(ctx context.Context, q *folder.GetChildrenQuery) ([]*folder.Folder, error)
- func (s *Service) GetDescendantCounts(ctx context.Context, q *folder.GetDescendantCountsQuery) (folder.DescendantCounts, error)
- func (s *Service) GetFolders(ctx context.Context, q folder.GetFoldersQuery) ([]*folder.Folder, error)
- func (s *Service) GetParents(ctx context.Context, q folder.GetParentsQuery) ([]*folder.Folder, error)
- func (s *Service) GetSharedWithMe(ctx context.Context, q *folder.GetChildrenQuery) ([]*folder.Folder, error)
- func (s *Service) Move(ctx context.Context, cmd *folder.MoveFolderCommand) (*folder.Folder, error)
- func (s *Service) RegisterService(r folder.RegistryService) error
- func (s *Service) Update(ctx context.Context, cmd *folder.UpdateFolderCommand) (*folder.Folder, error)
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 SplitFullpath ¶
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 (*DashboardFolderStoreImpl) GetFolderByTitle ¶
func (*DashboardFolderStoreImpl) GetFolderByUID ¶
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) DBMigration ¶
func (*Service) GetChildren ¶
func (*Service) GetDescendantCounts ¶
func (s *Service) GetDescendantCounts(ctx context.Context, q *folder.GetDescendantCountsQuery) (folder.DescendantCounts, error)
func (*Service) GetFolders ¶
func (*Service) GetParents ¶
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) RegisterService ¶
func (s *Service) RegisterService(r folder.RegistryService) error
Click to show internal directories.
Click to hide internal directories.