Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrPluginAlreadyInstalled = errors.New("plugin already installed")
)
Functions ¶
func InstallPlugin ¶
func InstallPlugin( tenant_id string, plugin_unique_identifier plugin_entities.PluginUniqueIdentifier, install_type plugin_entities.PluginRuntimeType, declaration *plugin_entities.PluginDeclaration, source string, meta map[string]any, ) ( *models.Plugin, *models.PluginInstallation, error, )
Create plugin for a tenant, create plugin if it has never been created before and install it to the tenant, return the plugin and the installation if the plugin has been created before, return the plugin which has been created before
Types ¶
type DeletePluginResponse ¶
type DeletePluginResponse struct {
Plugin *models.Plugin
Installation *models.PluginInstallation
// whether the refers of the plugin has been decreased to 0
// which means the whole plugin has been uninstalled, not just the installation
IsPluginDeleted bool
}
func UninstallPlugin ¶
func UninstallPlugin( tenant_id string, plugin_unique_identifier plugin_entities.PluginUniqueIdentifier, installation_id string, declaration *plugin_entities.PluginDeclaration, ) (*DeletePluginResponse, error)
Delete plugin for a tenant, delete the plugin if it has never been created before and uninstall it from the tenant, return the plugin and the installation if the plugin has been created before, return the plugin which has been created before
type UpgradePluginResponse ¶
type UpgradePluginResponse struct {
// whether the original plugin has been deleted
IsOriginalPluginDeleted bool
// the deleted plugin
DeletedPlugin *models.Plugin
}
func UpgradePlugin ¶
func UpgradePlugin( tenant_id string, original_plugin_unique_identifier plugin_entities.PluginUniqueIdentifier, new_plugin_unique_identifier plugin_entities.PluginUniqueIdentifier, originalDeclaration *plugin_entities.PluginDeclaration, newDeclaration *plugin_entities.PluginDeclaration, install_type plugin_entities.PluginRuntimeType, source string, meta map[string]any, ) (*UpgradePluginResponse, error)
Upgrade plugin for a tenant, upgrade the plugin if it has been created before and uninstall the original plugin and install the new plugin, but keep the original installation information like endpoint_setups, etc.