mirror of
https://github.com/grafana/grafana.git
synced 2025-01-01 11:47:05 -06:00
9855e74b92
Chore: Refactor quota service (#57586) * Chore: refactore quota service * Apply suggestions from code review
51 lines
1.1 KiB
Go
51 lines
1.1 KiB
Go
package dashboards
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/grafana/grafana/pkg/models"
|
|
"github.com/grafana/grafana/pkg/services/quota"
|
|
"github.com/grafana/grafana/pkg/services/user"
|
|
)
|
|
|
|
type SaveDashboardDTO struct {
|
|
OrgId int64
|
|
UpdatedAt time.Time
|
|
User *user.SignedInUser
|
|
Message string
|
|
Overwrite bool
|
|
Dashboard *models.Dashboard
|
|
}
|
|
|
|
type DashboardSearchProjection struct {
|
|
ID int64 `xorm:"id"`
|
|
UID string `xorm:"uid"`
|
|
Title string
|
|
Slug string
|
|
Term string
|
|
IsFolder bool
|
|
FolderID int64 `xorm:"folder_id"`
|
|
FolderUID string `xorm:"folder_uid"`
|
|
FolderSlug string
|
|
FolderTitle string
|
|
SortMeta int64
|
|
}
|
|
|
|
const (
|
|
QuotaTargetSrv quota.TargetSrv = "dashboard"
|
|
QuotaTarget quota.Target = "dashboard"
|
|
)
|
|
|
|
type CountDashboardsInFolderQuery struct {
|
|
FolderUID string
|
|
OrgID int64
|
|
}
|
|
|
|
// TODO: CountDashboardsInFolderRequest is the request passed from the service
|
|
// to the store layer. The FolderID will be replaced with FolderUID when
|
|
// dashboards are updated with parent folder UIDs.
|
|
type CountDashboardsInFolderRequest struct {
|
|
FolderID int64
|
|
OrgID int64
|
|
}
|