internal

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

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 Arg

type Arg struct {
	Name    string
	Version string
}

type Manager

type Manager struct {
	RuntimeEnvContext *env.RuntimeEnvContext // runtime environment context
	// contains filtered or unexported fields
}

func NewSdkManager

func NewSdkManager() (*Manager, error)

NewSdkManager create a new SdkManager

func (*Manager) Add

func (m *Manager) Add(pluginName, url, alias string) error

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) CleanTmp added in v0.2.3

func (m *Manager) CleanTmp()

func (*Manager) Close

func (m *Manager) Close()

func (*Manager) GetRegistryAddress added in v0.3.0

func (m *Manager) GetRegistryAddress(uri string) string

func (*Manager) LoadAllSdk

func (m *Manager) LoadAllSdk() ([]sdk.Sdk, error)

func (*Manager) LookupSdk

func (m *Manager) LookupSdk(name string) (sdk.Sdk, error)

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 (m *Manager) LookupSdkWithInstall(name string, autoConfirm bool) (sdk.Sdk, error)

func (*Manager) ParseLegacyFile added in v0.4.0

func (m *Manager) ParseLegacyFile(dirPath string, output func(sdkname, version string)) error

ParseLegacyFile parse legacy file and output the sdkname and version

func (*Manager) Remove

func (m *Manager) Remove(pluginName string) error

func (*Manager) ResolveVersion added in v0.7.0

func (m *Manager) ResolveVersion(sdkName string, version sdk.Version) sdk.Version

func (*Manager) Update

func (m *Manager) Update(pluginName string) error

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

Jump to

Keyboard shortcuts

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