plugin

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPluginNotFound = errors.New("plugin not found")

Functions

func IsLuaPluginDir

func IsLuaPluginDir(pluginDirPath string) bool

Types

type PluginWrapper

type PluginWrapper struct {

	// plugin source path
	Path string
	*base.PluginInfo
	// contains filtered or unexported fields
}

func CreatePluginFromPath

func CreatePluginFromPath(tempInstallPath string, config *config.Config, runtimeVersion string) (*PluginWrapper, error)

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) EnvKeys

func (l *PluginWrapper) EnvKeys(sdkPackage *base.Package) (*env.Envs, error)

func (*PluginWrapper) HasFunction

func (l *PluginWrapper) HasFunction(name string) bool

func (*PluginWrapper) ParseLegacyFile

func (l *PluginWrapper) ParseLegacyFile(path string, installedVersions func() []base.Version) (base.Version, error)

func (*PluginWrapper) PostInstall

func (l *PluginWrapper) PostInstall(rootPath string, sdks []*base.Info) error

func (*PluginWrapper) PreInstall

func (l *PluginWrapper) PreInstall(version base.Version) (*base.Package, error)

func (*PluginWrapper) PreUninstall

func (l *PluginWrapper) PreUninstall(p *base.Package) error

func (*PluginWrapper) PreUse

func (l *PluginWrapper) PreUse(version base.Version, previousVersion base.Version, scope base.UseScope, cwd string, installedSdks []*base.Package) (base.Version, error)

func (*PluginWrapper) ShowNotes

func (l *PluginWrapper) ShowNotes()

ShowNotes prints the notes of the plugin.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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