mirror of
https://github.com/grafana/grafana.git
synced 2024-12-29 10:21:41 -06:00
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:
parent
6524a0b437
commit
ba6c715708
@ -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}
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user