Documentation
¶
Index ¶
- Constants
- Variables
- type Arg
- type Manager
- func (m *Manager) Add(pluginName, url, alias string) error
- func (m *Manager) Available() (RegistryIndex, error)
- func (m *Manager) CleanTmp()
- func (m *Manager) Close()
- func (m *Manager) GetRegistryAddress(uri string) string
- func (m *Manager) LoadAllSdk() ([]sdk.Sdk, error)
- func (m *Manager) LookupSdk(name string) (sdk.Sdk, error)
- func (m *Manager) LookupSdkWithInstall(name string, autoConfirm bool) (sdk.Sdk, error)
- func (m *Manager) ParseLegacyFile(dirPath string, output func(sdkname, version string)) error
- func (m *Manager) Remove(pluginName string) error
- func (m *Manager) ResolveVersion(sdkName string, version sdk.Version) sdk.Version
- func (m *Manager) Update(pluginName string) error
- type NotFoundError
- type RegistryIndex
- type RegistryIndexItem
- type RegistryPluginManifest
Constants ¶
View Source
const RuntimeVersion = "1.0.4"
Variables ¶
View Source
var (
ManifestNotFound = errors.New("manifest not found")
)
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
RuntimeEnvContext *env.RuntimeEnvContext // runtime environment context
// contains filtered or unexported fields
}
func (*Manager) Add ¶
Add a plugin to plugin home directory 1. If the plugin is an official plugin, fetch the plugin manifest from the registry. 2. If the plugin is a custom plugin, install the plugin from the specified URL. 3. Validate the plugin and install it to the plugin home directory. examples:
vfox add nodejs vfox add --alias node nodejs vfox add --source /path/to/plugin.zip vfox add --source /path/to/plugin.zip --alias node [nodejs]
func (*Manager) Available ¶
func (m *Manager) Available() (RegistryIndex, error)
func (*Manager) GetRegistryAddress ¶ added in v0.3.0
func (*Manager) LookupSdk ¶
LookupSdk lookup sdk by name Loads SDK plugins and generates env keys based on the tool versions in the chain
func (*Manager) LookupSdkWithInstall ¶ added in v0.3.2
func (*Manager) ParseLegacyFile ¶ added in v0.4.0
ParseLegacyFile parse legacy file and output the sdkname and version
func (*Manager) ResolveVersion ¶ added in v0.7.0
type NotFoundError ¶ added in v0.3.2
type NotFoundError struct {
Msg string
}
func (NotFoundError) Error ¶ added in v0.3.2
func (n NotFoundError) Error() string
type RegistryIndex ¶ added in v0.3.0
type RegistryIndex []*RegistryIndexItem
RegistryIndex is the index of the registry
type RegistryIndexItem ¶ added in v0.3.0
type RegistryIndexItem struct {
Name string `json:"name"`
Desc string `json:"desc"`
Homepage string `json:"homepage"`
}
RegistryIndexItem is the item in the registry index
type RegistryPluginManifest ¶ added in v0.3.0
type RegistryPluginManifest struct {
Name string `json:"name"`
Version string `json:"version"`
License string `json:"license"`
Author string `json:"author"`
DownloadUrl string `json:"downloadUrl"`
MinRuntimeVersion string `json:"minRuntimeVersion"`
}
RegistryPluginManifest is the manifest of a remote plugin
Click to show internal directories.
Click to hide internal directories.