MCPcopy Index your code
hub / github.com/cloudfoundry/cli / NewPluginInstaller

Function NewPluginInstaller

cf/actors/plugininstaller/plugin_installer.go:28–49  ·  view source on GitHub ↗
(context *Context)

Source from the content-addressed store, hash-verified

26type pluginReposFetcher func() []models.PluginRepo
27
28func NewPluginInstaller(context *Context) PluginInstaller {
29 var installer PluginInstaller
30
31 pluginDownloader := &PluginDownloader{UI: context.UI, FileDownloader: context.FileDownloader}
32 if context.RepoName == "" {
33 installer = &pluginInstallerWithoutRepo{
34 UI: context.UI,
35 PluginDownloader: pluginDownloader,
36 RepoName: context.RepoName,
37 }
38 } else {
39 installer = &pluginInstallerWithRepo{
40 UI: context.UI,
41 PluginDownloader: pluginDownloader,
42 RepoName: context.RepoName,
43 Checksummer: context.Checksummer,
44 PluginRepo: context.PluginRepo,
45 GetPluginRepos: context.GetPluginRepos,
46 }
47 }
48 return installer
49}

Callers 1

ExecuteMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected