Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NewFolderService = func(orgId int64, user *models.SignedInUser) FolderService {
return &dashboardServiceImpl{
orgId: orgId,
user: user,
}
}
NewFolderService factory for creating a new folder service
View Source
var NewProvisioningService = func() DashboardProvisioningService { return &dashboardServiceImpl{ log: log.New("dashboard-provisioning-service"), } }
NewProvisioningService factory for creating a new dashboard provisioning service
View Source
var NewService = func() DashboardService { return &dashboardServiceImpl{ log: log.New("dashboard-service"), } }
NewService factory for creating a new dashboard service
Functions ¶
func MakeUserAdmin ¶
func MockDashboardService ¶
func MockDashboardService(mock *FakeDashboardService)
Types ¶
type DashboardProvisioningService ¶
type DashboardProvisioningService interface { SaveProvisionedDashboard(dto *SaveDashboardDTO, provisioning *models.DashboardProvisioning) (*models.Dashboard, error) SaveFolderForProvisionedDashboards(*SaveDashboardDTO) (*models.Dashboard, error) GetProvisionedDashboardData(name string) ([]*models.DashboardProvisioning, error) GetProvisionedDashboardDataByDashboardID(DashboardId int64) (*models.DashboardProvisioning, error) UnprovisionDashboard(dashboardId int64) error DeleteProvisionedDashboard(dashboardId int64, orgId int64) error }
DashboardProvisioningService service for operating on provisioned dashboards
type DashboardService ¶
type DashboardService interface { SaveDashboard(dto *SaveDashboardDTO, allowUiUpdate bool) (*models.Dashboard, error) ImportDashboard(dto *SaveDashboardDTO) (*models.Dashboard, error) DeleteDashboard(dashboardId int64, orgId int64) error }
DashboardService service for operating on dashboards
type FakeDashboardService ¶
type FakeDashboardService struct { SaveDashboardResult *models.Dashboard SaveDashboardError error SavedDashboards []*SaveDashboardDTO }
func (*FakeDashboardService) DeleteDashboard ¶
func (s *FakeDashboardService) DeleteDashboard(dashboardId int64, orgId int64) error
func (*FakeDashboardService) ImportDashboard ¶
func (s *FakeDashboardService) ImportDashboard(dto *SaveDashboardDTO) (*models.Dashboard, error)
func (*FakeDashboardService) SaveDashboard ¶
func (s *FakeDashboardService) SaveDashboard(dto *SaveDashboardDTO, allowUiUpdate bool) (*models.Dashboard, error)
type FolderService ¶
type FolderService interface { GetFolders(limit int64) ([]*models.Folder, error) GetFolderByID(id int64) (*models.Folder, error) GetFolderByUID(uid string) (*models.Folder, error) CreateFolder(cmd *models.CreateFolderCommand) error UpdateFolder(uid string, cmd *models.UpdateFolderCommand) error DeleteFolder(uid string) (*models.Folder, error) }
FolderService service for operating on folders
Click to show internal directories.
Click to hide internal directories.