Documentation
¶
Index ¶
- Variables
- func IsLuaPluginDir(pluginDirPath string) bool
- type PluginWrapper
- func (l *PluginWrapper) Available(args []string) ([]*base.Package, error)
- func (l *PluginWrapper) Close()
- func (l *PluginWrapper) EnvKeys(sdkPackage *base.Package) (*env.Envs, error)
- func (l *PluginWrapper) HasFunction(name string) bool
- func (l *PluginWrapper) ParseLegacyFile(path string, installedVersions func() []base.Version) (base.Version, error)
- func (l *PluginWrapper) PostInstall(rootPath string, sdks []*base.Info) error
- func (l *PluginWrapper) PreInstall(version base.Version) (*base.Package, error)
- func (l *PluginWrapper) PreUninstall(p *base.Package) error
- func (l *PluginWrapper) PreUse(version base.Version, previousVersion base.Version, scope base.UseScope, ...) (base.Version, error)
- func (l *PluginWrapper) ShowNotes()
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPluginNotFound = errors.New("plugin not found")
Functions ¶
func IsLuaPluginDir ¶
Types ¶
type PluginWrapper ¶
type PluginWrapper struct {
// plugin source path
Path string
*base.PluginInfo
// contains filtered or unexported fields
}
func CreatePluginFromPath ¶
func NewLuaPlugin ¶
func NewLuaPlugin(pluginDirPath string, config *config.Config, runtimeVersion string) (*PluginWrapper, error)
NewLuaPlugin creates a new LuaPlugin instance from the specified directory path. The plugin directory must meet one of the following conditions: - The directory must contain a metadata.lua file and a hooks directory that includes all must be implemented hook functions. - The directory contain a main.lua file that defines the plugin object and all hook functions.
func (*PluginWrapper) Available ¶
func (l *PluginWrapper) Available(args []string) ([]*base.Package, error)
func (*PluginWrapper) Close ¶
func (l *PluginWrapper) Close()
func (*PluginWrapper) HasFunction ¶
func (l *PluginWrapper) HasFunction(name string) bool
func (*PluginWrapper) ParseLegacyFile ¶
func (*PluginWrapper) PostInstall ¶
func (l *PluginWrapper) PostInstall(rootPath string, sdks []*base.Info) error
func (*PluginWrapper) PreInstall ¶
func (*PluginWrapper) PreUninstall ¶
func (l *PluginWrapper) PreUninstall(p *base.Package) error
func (*PluginWrapper) ShowNotes ¶
func (l *PluginWrapper) ShowNotes()
ShowNotes prints the notes of the plugin.
Click to show internal directories.
Click to hide internal directories.