pluginmanager

package
v0.0.0-...-b25b198 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 27 Imported by: 1

Documentation

Overview

Package pluginmanager is responsible for plugin discovery and installation

Index

Constants

View Source
const (

	// ManifestFileName is the file name for the manifest.
	ManifestFileName = "manifest.yaml"
	// PluginFileName is the file name for the plugin descriptor.
	PluginFileName = "plugin.yaml"
)

Variables

This section is empty.

Functions

func AvailablePlugins

func AvailablePlugins() ([]plugin.Discovered, error)

AvailablePlugins returns the list of available plugins including discovered and installed plugins. Plugin discovery happens for all active contexts

func AvailablePluginsFromLocalSource

func AvailablePluginsFromLocalSource(localPath string) ([]plugin.Discovered, error)

AvailablePluginsFromLocalSource returns the list of available plugins from local source

func Clean

func Clean() error

Clean deletes all plugins and tests.

func DeletePlugin

func DeletePlugin(options DeletePluginOptions) error

DeletePlugin deletes a plugin.

func DescribePlugin

func DescribePlugin(pluginName string, target cliv1alpha1.Target) (desc *cliapi.PluginDescriptor, err error)

DescribePlugin describes a plugin.

func DiscoverPlugins

func DiscoverPlugins() ([]plugin.Discovered, []plugin.Discovered)

DiscoverPlugins returns all the discovered plugins including standalone and context-scoped plugins Context scoped plugin discovery happens for all active contexts

func DiscoverPluginsFromLocalSource

func DiscoverPluginsFromLocalSource(localPath string) ([]plugin.Discovered, error)

DiscoverPluginsFromLocalSource returns the available plugins that are discovered from the provided local path

func DiscoverServerPlugins

func DiscoverServerPlugins() ([]plugin.Discovered, error)

DiscoverServerPlugins returns the available plugins associated all the active contexts

func DiscoverStandalonePlugins

func DiscoverStandalonePlugins() (plugins []plugin.Discovered, err error)

DiscoverStandalonePlugins returns the available standalone plugins

func DiscoveredFromPluginDescriptor

func DiscoveredFromPluginDescriptor(p *cliapi.PluginDescriptor) plugin.Discovered

DiscoveredFromPluginDescriptor returns discovered plugin object from k8sV1alpha1

func FindVersion

func FindVersion(recommendedPluginVersion, requestedVersion string) string

func GetRecommendedVersionOfPlugin

func GetRecommendedVersionOfPlugin(pluginName string, target cliv1alpha1.Target) (string, error)

GetRecommendedVersionOfPlugin returns recommended version of the plugin

func InitializePlugin

func InitializePlugin(descriptor *cliapi.PluginDescriptor) error

InitializePlugin initializes the plugin configuration

func InstallPlugin

func InstallPlugin(pluginName, version string, target cliv1alpha1.Target) error

InstallPlugin installs a plugin from the given repository.

func InstallPluginsFromLocalSource

func InstallPluginsFromLocalSource(pluginName, version string, target cliv1alpha1.Target, localPath string, installTestPlugin bool) error

InstallPluginsFromLocalSource installs plugin from local source directory

func InstalledPlugins

func InstalledPlugins() (serverPlugins, standalonePlugins []cliapi.PluginDescriptor, err error)

InstalledPlugins returns the list of installed context-scoped and standalone plugins.

func InstalledServerPlugins

func InstalledServerPlugins() ([]cliapi.PluginDescriptor, error)

InstalledServerPlugins returns the installed server plugins.

func InstalledStandalonePlugins

func InstalledStandalonePlugins() ([]cliapi.PluginDescriptor, error)

InstalledStandalonePlugins returns the installed standalone plugins.

func SyncPlugins

func SyncPlugins() error

SyncPlugins automatically downloads all available plugins to users machine

func UpgradePlugin

func UpgradePlugin(pluginName, version string, target cliv1alpha1.Target) error

UpgradePlugin upgrades a plugin from the given repository.

func ValidatePlugin

func ValidatePlugin(p *cliapi.PluginDescriptor) (err error)

ValidatePlugin validates the plugin descriptor.

Types

type DeletePluginOptions

type DeletePluginOptions struct {
	Target      cliv1alpha1.Target
	PluginName  string
	ForceDelete bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL