Grafana CLI Wire Runner (#41012)

* Set up Wire build graph

* Remove enterprise Wire set

* Move runner package outside commands

* Update Makefile (gen-go path)

* Minor prettier fix

* Include new Wire enterprise file into .gitignore

* Update Wire deps

* Update the grabpl version

Co-authored-by: Dan Cech <dcech@grafana.com>
This commit is contained in:
Joan López de la Franca Beltran
2021-11-17 20:43:09 +01:00
committed by GitHub
parent 1b99d88337
commit d49230d291
10 changed files with 206 additions and 43 deletions

View File

@@ -0,0 +1,27 @@
//go:build wireinject && oss
// +build wireinject,oss
package runner
import (
"github.com/google/wire"
"github.com/grafana/grafana/pkg/registry"
"github.com/grafana/grafana/pkg/services/encryption"
"github.com/grafana/grafana/pkg/services/encryption/ossencryption"
"github.com/grafana/grafana/pkg/services/kmsproviders"
"github.com/grafana/grafana/pkg/services/kmsproviders/osskmsproviders"
"github.com/grafana/grafana/pkg/services/sqlstore/migrations"
"github.com/grafana/grafana/pkg/setting"
)
var wireExtsSet = wire.NewSet(
wireSet,
migrations.ProvideOSSMigrations,
wire.Bind(new(registry.DatabaseMigrator), new(*migrations.OSSMigrations)),
setting.ProvideProvider,
wire.Bind(new(setting.Provider), new(*setting.OSSImpl)),
osskmsproviders.ProvideService,
wire.Bind(new(kmsproviders.Service), new(osskmsproviders.Service)),
ossencryption.ProvideService,
wire.Bind(new(encryption.Internal), new(*ossencryption.Service)),
)