mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 01:22:29 +08:00
Plugins: Refactor plugin repository API (#69063)
* support grafana wildcard version * undo go.mod changes * tidy * flesh out tests * refactor * add tests * tidy naming * undo some changes * split interfaces * separation * update new signature * simplify * update var namings * unexport types * introduce opts pattern * reorder test * fix compat checks * middle ground * unexport client * move back * fix tests * inline logger * make client usable * use fake logger * tidy errors * remove unused types * fix test * review fixes * rework compatibility * adjust installer * fix tests * opts => cfg * remove unused var * fix var name
This commit is contained in:
@ -67,8 +67,11 @@ func installCommand(c utils.CommandLine) error {
|
||||
// installPlugin downloads the plugin code as a zip file from the Grafana.com API
|
||||
// and then extracts the zip into the plugin's directory.
|
||||
func installPlugin(ctx context.Context, pluginID, version string, c utils.CommandLine) error {
|
||||
skipTLSVerify := c.Bool("insecure")
|
||||
repository := repo.New(skipTLSVerify, c.PluginRepoURL(), services.Logger)
|
||||
repository := repo.NewManager(repo.ManagerCfg{
|
||||
SkipTLSVerify: c.Bool("insecure"),
|
||||
BaseURL: c.PluginRepoURL(),
|
||||
Logger: services.Logger,
|
||||
})
|
||||
|
||||
compatOpts := repo.NewCompatOpts(services.GrafanaVersion, runtime.GOOS, runtime.GOARCH)
|
||||
|
||||
|
Reference in New Issue
Block a user