Documentation ¶
Index ¶
- type LibraryInfo
- type LibraryPanelService
- func (lps *LibraryPanelService) ConnectLibraryPanelsForDashboard(c context.Context, signedInUser identity.Requester, dash *dashboards.Dashboard) error
- func (lps LibraryPanelService) CountInFolders(ctx context.Context, orgID int64, folderUIDs []string, u identity.Requester) (int64, error)
- func (lps LibraryPanelService) DeleteInFolders(ctx context.Context, orgID int64, folderUIDs []string, user identity.Requester) error
- func (lps *LibraryPanelService) ImportLibraryPanelsForDashboard(c context.Context, signedInUser identity.Requester, ...) error
- func (lps LibraryPanelService) Kind() string
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LibraryInfo ¶
type LibraryInfo struct { Panels []*any LibraryPanels *simplejson.Json }
type LibraryPanelService ¶
type LibraryPanelService struct { Cfg *setting.Cfg SQLStore db.DB RouteRegister routing.RouteRegister LibraryElementService libraryelements.Service FolderService folder.Service // contains filtered or unexported fields }
LibraryPanelService is the service for the Panel Library feature.
func ProvideService ¶
func ProvideService(cfg *setting.Cfg, sqlStore db.DB, routeRegister routing.RouteRegister, libraryElementService libraryelements.Service, folderService folder.Service) (*LibraryPanelService, error)
func (*LibraryPanelService) ConnectLibraryPanelsForDashboard ¶
func (lps *LibraryPanelService) ConnectLibraryPanelsForDashboard(c context.Context, signedInUser identity.Requester, dash *dashboards.Dashboard) error
ConnectLibraryPanelsForDashboard loops through all panels in dashboard JSON and connects any library panels to the dashboard.
func (LibraryPanelService) CountInFolders ¶
func (lps LibraryPanelService) CountInFolders(ctx context.Context, orgID int64, folderUIDs []string, u identity.Requester) (int64, error)
CountInFolder is a handler for retrieving the number of library panels contained within a given folder and for a specific organisation.
func (LibraryPanelService) DeleteInFolders ¶
func (lps LibraryPanelService) DeleteInFolders(ctx context.Context, orgID int64, folderUIDs []string, user identity.Requester) error
DeleteInFolder deletes the library panels contained in a given folder.
func (*LibraryPanelService) ImportLibraryPanelsForDashboard ¶
func (lps *LibraryPanelService) ImportLibraryPanelsForDashboard(c context.Context, signedInUser identity.Requester, libraryPanels *simplejson.Json, panels []any, folderID int64, folderUID string) error
ImportLibraryPanelsForDashboard loops through all panels in dashboard JSON and creates any missing library panels in the database.
func (LibraryPanelService) Kind ¶
func (lps LibraryPanelService) Kind() string
Kind returns the name of the library panel type of entity.
type Service ¶
type Service interface { ConnectLibraryPanelsForDashboard(c context.Context, signedInUser identity.Requester, dash *dashboards.Dashboard) error ImportLibraryPanelsForDashboard(c context.Context, signedInUser identity.Requester, libraryPanels *simplejson.Json, panels []any, folderID int64, folderUID string) error }
Service is a service for operating on library panels.