Chore: Use db.DB interface instead of sqlstore (#54358)

* use db.DB interface instead of sqlstore

* make store service depends on db.DB instead of sqlstore
This commit is contained in:
ying-jeanne
2022-08-26 19:07:58 -05:00
committed by GitHub
parent 216185b7f0
commit fe062f2eaa
3 changed files with 10 additions and 9 deletions

View File

@@ -16,7 +16,7 @@ import (
ac "github.com/grafana/grafana/pkg/services/accesscontrol"
"github.com/grafana/grafana/pkg/services/featuremgmt"
"github.com/grafana/grafana/pkg/services/quota"
"github.com/grafana/grafana/pkg/services/sqlstore"
"github.com/grafana/grafana/pkg/services/sqlstore/db"
"github.com/grafana/grafana/pkg/services/user"
"github.com/grafana/grafana/pkg/setting"
)
@@ -83,7 +83,7 @@ type StorageService interface {
}
type standardStorageService struct {
sql *sqlstore.SQLStore
sql db.DB
tree *nestedTree
cfg *GlobalStorageConfig
authService storageAuthService
@@ -91,7 +91,7 @@ type standardStorageService struct {
}
func ProvideService(
sql *sqlstore.SQLStore,
sql db.DB,
features featuremgmt.FeatureToggles,
cfg *setting.Cfg,
quotaService quota.Service,
@@ -242,7 +242,7 @@ func createSystemBrandingPathFilter() filestorage.PathFilter {
}
func newStandardStorageService(
sql *sqlstore.SQLStore,
sql db.DB,
globalRoots []storageRuntime,
initializeOrgStorages func(orgId int64) []storageRuntime,
authService storageAuthService,