Chore: Delete unused db in orgs and use db in datasources (#57085)

* Delete unused db in orgs and use db in datasources

* Sort imports
This commit is contained in:
Selene 2022-10-17 16:27:56 +02:00 committed by GitHub
parent 6524a0b437
commit ba6c715708
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 8 deletions

View File

@ -36,7 +36,7 @@ type SqlStore struct {
logger log.Logger
}
func CreateStore(db sqlstore.Store, logger log.Logger) *SqlStore {
func CreateStore(db db.DB, logger log.Logger) *SqlStore {
return &SqlStore{db: db, logger: logger}
}

View File

@ -7,7 +7,7 @@ import (
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/services/org"
"github.com/grafana/grafana/pkg/services/sqlstore"
"github.com/grafana/grafana/pkg/services/sqlstore/db"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/util"
)
@ -16,11 +16,9 @@ type Service struct {
store store
cfg *setting.Cfg
log log.Logger
// TODO remove sqlstore and use db.DB
sqlStore sqlstore.Store
}
func ProvideService(db sqlstore.Store, cfg *setting.Cfg) org.Service {
func ProvideService(db db.DB, cfg *setting.Cfg) org.Service {
log := log.New("org service")
return &Service{
store: &sqlStore{
@ -29,9 +27,8 @@ func ProvideService(db sqlstore.Store, cfg *setting.Cfg) org.Service {
log: log,
cfg: cfg,
},
cfg: cfg,
log: log,
sqlStore: db,
cfg: cfg,
log: log,
}
}