Documentation
¶
Index ¶
- Constants
- Variables
- type Arg
- type AvailableHookCtx
- type AvailableHookResult
- type AvailableHookResultItem
- type Category
- type Checksum
- type EnvKeysHookCtx
- type EnvKeysHookResultItem
- type Info
- type LuaCheckSum
- type LuaPlugin
- func (l *LuaPlugin) Available() ([]*Package, error)
- func (l *LuaPlugin) CallFunction(funcName string, args ...lua.LValue) error
- func (l *LuaPlugin) Close()
- func (l *LuaPlugin) EnvKeys(sdkPackage *Package) (*env.Envs, error)
- func (l *LuaPlugin) HasFunction(name string) bool
- func (l *LuaPlugin) Label(version string) string
- func (l *LuaPlugin) PostInstall(rootPath string, sdks []*Info) error
- func (l *LuaPlugin) PreInstall(version Version) (*Package, error)
- func (l *LuaPlugin) PreUse(version Version, previousVersion Version, scope UseScope, cwd string, ...) (Version, error)
- type LuaPluginInfo
- type Manager
- func (m *Manager) Add(pluginName, url, alias string) error
- func (m *Manager) Available() ([]*Category, error)
- func (m *Manager) CleanTmp()
- func (m *Manager) Close()
- func (m *Manager) EnvKeys() (*env.Envs, error)
- func (m *Manager) LoadAllSdk() (map[string]*Sdk, error)
- func (m *Manager) LookupSdk(name string) (*Sdk, error)
- func (m *Manager) Remove(pluginName string) error
- func (m *Manager) Update(pluginName string) error
- type Package
- type PathMeta
- type PostInstallHookCtx
- type PreInstallHookCtx
- type PreInstallHookResult
- type PreInstallHookResultAdditionItem
- type PreUseHookCtx
- type PreUseHookResult
- type RecordSource
- type RemotePluginInfo
- type Sdk
- func (b *Sdk) Available() ([]*Package, error)
- func (b *Sdk) Close()
- func (b *Sdk) Current() Version
- func (b *Sdk) Download(u *url.URL) (string, error)
- func (b *Sdk) EnvKeys(version Version) (*env.Envs, error)
- func (b *Sdk) Install(version Version) error
- func (b *Sdk) List() []Version
- func (b *Sdk) PreUse(version Version, scope UseScope) (Version, error)
- func (b *Sdk) Uninstall(version Version) error
- func (b *Sdk) Use(version Version, scope UseScope) error
- func (b *Sdk) VersionPath(version Version) string
- type UseScope
- type Version
Constants ¶
View Source
const ( LuaPluginObjKey = "PLUGIN" OsType = "OS_TYPE" ArchType = "ARCH_TYPE" )
View Source
const RuntimeVersion = "0.2.5"
Variables ¶
View Source
var NoneChecksum = &Checksum{
Value: "",
Type: "none",
}
Functions ¶
This section is empty.
Types ¶
type AvailableHookCtx ¶ added in v0.2.5
type AvailableHookCtx struct {
RuntimeVersion string `luai:"runtimeVersion"`
}
type AvailableHookResult ¶ added in v0.2.5
type AvailableHookResult = []*AvailableHookResultItem
type AvailableHookResultItem ¶ added in v0.2.5
type Category ¶
type Category struct { Name string `json:"category"` Count string `json:"count"` Plugins []*RemotePluginInfo `json:"files"` }
type EnvKeysHookCtx ¶ added in v0.2.5
type EnvKeysHookResultItem ¶ added in v0.2.5
type LuaCheckSum ¶ added in v0.2.5
type LuaCheckSum struct { Sha256 string `luai:"sha256"` Sha512 string `luai:"sha512"` Sha1 string `luai:"sha1"` Md5 string `luai:"md5"` }
func (*LuaCheckSum) Checksum ¶ added in v0.2.5
func (c *LuaCheckSum) Checksum() *Checksum
type LuaPlugin ¶
type LuaPlugin struct { // plugin source path Filepath string // plugin filename, this is also alias name, sdk-name SdkName string LuaPluginInfo // contains filtered or unexported fields }
func (*LuaPlugin) CallFunction ¶ added in v0.2.5
func (*LuaPlugin) HasFunction ¶ added in v0.2.5
func (*LuaPlugin) PostInstall ¶
type LuaPluginInfo ¶ added in v0.2.5
type Manager ¶
type Manager struct { PathMeta *PathMeta EnvManager env.Manager Record env.Record Config *config.Config // contains filtered or unexported fields }
func NewSdkManager ¶
func NewSdkManager(sources ...RecordSource) *Manager
func NewSdkManagerWithSource ¶
func NewSdkManagerWithSource(sources ...RecordSource) *Manager
type PostInstallHookCtx ¶ added in v0.2.5
type PreInstallHookCtx ¶ added in v0.2.5
type PreInstallHookResult ¶ added in v0.2.5
type PreInstallHookResult struct { Version string `luai:"version"` Url string `luai:"url"` Sha256 string `luai:"sha256"` Sha512 string `luai:"sha512"` Sha1 string `luai:"sha1"` Md5 string `luai:"md5"` Addition []*PreInstallHookResultAdditionItem `luai:"addition"` }
func (*PreInstallHookResult) Info ¶ added in v0.2.5
func (i *PreInstallHookResult) Info() (*Info, error)
type PreInstallHookResultAdditionItem ¶ added in v0.2.5
type PreInstallHookResultAdditionItem struct { Name string `luai:"name"` Url string `luai:"url"` Sha256 string `luai:"sha256"` Sha512 string `luai:"sha512"` Sha1 string `luai:"sha1"` Md5 string `luai:"md5"` }
func (*PreInstallHookResultAdditionItem) Info ¶ added in v0.2.5
func (i *PreInstallHookResultAdditionItem) Info() *Info
type PreUseHookCtx ¶ added in v0.2.5
type PreUseHookResult ¶ added in v0.2.5
type PreUseHookResult struct {
Version string `luai:"version"`
}
type RecordSource ¶
type RecordSource string
const ( GlobalRecordSource RecordSource = "global" ProjectRecordSource RecordSource = "project" SessionRecordSource RecordSource = "session" )
type RemotePluginInfo ¶
type Sdk ¶
type Sdk struct { Plugin *LuaPlugin // current sdk install path InstallPath string // contains filtered or unexported fields }
func (*Sdk) VersionPath ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.