Plugins: Move store and plugin dto to pluginsintegration (#74655)
move store and plugin dto
This commit is contained in:
@@ -18,7 +18,7 @@ import (
|
||||
"github.com/grafana/grafana/pkg/infra/httpclient/httpclientprovider"
|
||||
"github.com/grafana/grafana/pkg/infra/log"
|
||||
"github.com/grafana/grafana/pkg/infra/tracing"
|
||||
"github.com/grafana/grafana/pkg/plugins"
|
||||
"github.com/grafana/grafana/pkg/services/pluginsintegration/pluginstore"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
)
|
||||
|
||||
@@ -27,14 +27,14 @@ type PluginsService struct {
|
||||
|
||||
enabled bool
|
||||
grafanaVersion string
|
||||
pluginStore plugins.Store
|
||||
pluginStore pluginstore.Store
|
||||
httpClient httpClient
|
||||
mutex sync.RWMutex
|
||||
log log.Logger
|
||||
tracer tracing.Tracer
|
||||
}
|
||||
|
||||
func ProvidePluginsService(cfg *setting.Cfg, pluginStore plugins.Store, tracer tracing.Tracer) (*PluginsService, error) {
|
||||
func ProvidePluginsService(cfg *setting.Cfg, pluginStore pluginstore.Store, tracer tracing.Tracer) (*PluginsService, error) {
|
||||
logger := log.New("plugins.update.checker")
|
||||
cl, err := httpclient.New(httpclient.Options{
|
||||
Middlewares: []httpclient.Middleware{
|
||||
@@ -180,7 +180,7 @@ func canUpdate(v1, v2 string) bool {
|
||||
return ver1.LessThan(ver2)
|
||||
}
|
||||
|
||||
func (s *PluginsService) pluginIDsCSV(m map[string]plugins.PluginDTO) string {
|
||||
func (s *PluginsService) pluginIDsCSV(m map[string]pluginstore.Plugin) string {
|
||||
ids := make([]string, 0, len(m))
|
||||
for pluginID := range m {
|
||||
ids = append(ids, pluginID)
|
||||
@@ -189,8 +189,8 @@ func (s *PluginsService) pluginIDsCSV(m map[string]plugins.PluginDTO) string {
|
||||
return strings.Join(ids, ",")
|
||||
}
|
||||
|
||||
func (s *PluginsService) pluginsEligibleForVersionCheck(ctx context.Context) map[string]plugins.PluginDTO {
|
||||
result := make(map[string]plugins.PluginDTO)
|
||||
func (s *PluginsService) pluginsEligibleForVersionCheck(ctx context.Context) map[string]pluginstore.Plugin {
|
||||
result := make(map[string]pluginstore.Plugin)
|
||||
for _, p := range s.pluginStore.Plugins(ctx) {
|
||||
if p.IsCorePlugin() {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user