Documentation ¶
Overview ¶
Package catalog implements catalog management functions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Catalog ¶
type Catalog interface { // Upsert inserts/updates the given plugin. Upsert(plugin cliv1alpha1.PluginDescriptor) // Get looks up the descriptor of a plugin given its name. Get(pluginName string) (cliv1alpha1.PluginDescriptor, bool) // List returns the list of active plugins. // Active plugin means the plugin that are available to the user // based on the current logged-in server. List() []cliv1alpha1.PluginDescriptor // Delete deletes the given plugin from the catalog, but it does not delete the installation. Delete(plugin string) }
Catalog is the interface that maintains an index of the installed plugins as well as the active plugins.
type ContextCatalog ¶
type ContextCatalog struct {
// contains filtered or unexported fields
}
ContextCatalog denotes a local plugin catalog for a given context or stand-alone.
func NewContextCatalog ¶
func NewContextCatalog(context string) (*ContextCatalog, error)
NewContextCatalog creates context-aware catalog
func (*ContextCatalog) Delete ¶
func (c *ContextCatalog) Delete(plugin string) error
Delete deletes the given plugin from the catalog, but it does not delete the installation.
func (*ContextCatalog) Get ¶
func (c *ContextCatalog) Get(plugin string) (cliv1alpha1.PluginDescriptor, bool)
Get looks up the descriptor of a plugin given its name.
func (*ContextCatalog) List ¶
func (c *ContextCatalog) List() []cliv1alpha1.PluginDescriptor
List returns the list of active plugins. Active plugin means the plugin that are available to the user based on the current logged-in server.
func (*ContextCatalog) Upsert ¶
func (c *ContextCatalog) Upsert(plugin *cliv1alpha1.PluginDescriptor) error
Upsert inserts/updates the given plugin.
Click to show internal directories.
Click to hide internal directories.