Documentation
¶
Overview ¶
Package plugininventory implements an interface to deal with a plugin inventory. It encapsulates the logic that deals with how plugin inventories are stored so that other entities can use the plugin inventory without knowing its implementation details.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PluginInventory ¶
type PluginInventory interface {
GetAllPlugins() ([]*PluginInventoryEntry, error)
}
PluginInventory is the interface to interact with a plugin inventory. It can be used to get the plugin information for all plugins in the inventory.
func NewSQLiteInventory ¶
func NewSQLiteInventory(discoveryName, inventoryDir, prefix string) PluginInventory
NewSQLiteInventory returns a new PluginInventory connected to the data found at 'inventoryDir'.
type PluginInventoryEntry ¶
type PluginInventoryEntry struct {
// Name of the plugin
Name string
// Target to which the plugin applies
Target configtypes.Target
// Description of the plugin
Description string
// Publisher is the name of the publisher of this plugin
// (e.g., a product group within a company)
Publisher string
// Vendor is the name of the vendor of this plugin (e.g., a company's name)
Vendor string
// Recommended version that Tanzu CLI should install by default.
// The value should be a valid semantic version as defined in
// https://semver.org/. E.g., 2.0.1
RecommendedVersion string
// AvailableVersions is the list of versions available for this plugin.
// The values are sorted in the semver prescribed order as defined in
// https://github.com/Masterminds/semver#sorting-semantic-versions.
AvailableVersions []string
// Artifacts contains an artifact list for every available version.
Artifacts distribution.Artifacts
}
PluginInventoryEntry represents the inventory information about a single plugin as found by the inventory backend.
type SQLiteInventory ¶
type SQLiteInventory struct {
// contains filtered or unexported fields
}
SQLiteInventory is an inventory stored using SQLite
func (*SQLiteInventory) GetAllPlugins ¶
func (b *SQLiteInventory) GetAllPlugins() ([]*PluginInventoryEntry, error)
GetAllPlugins returns all plugins discovered in this backend.