plugin

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadFile added in v0.0.11

func DownloadFile(url, dest string) error

func ExtractArchive added in v0.0.11

func ExtractArchive(archive, dest string) error

func PluginInfoExists added in v0.0.11

func PluginInfoExists(pluginDir string) bool

func RunGitLFS added in v0.0.11

func RunGitLFS(repoDir string, args ...string) error

Types

type CompileResult

type CompileResult struct {
	gocompile.CompileResult
	PluginDir  string
	PluginName string
}

func Compile

func Compile(pluginDir string, force bool) CompileResult

type Context added in v0.0.11

type Context struct {
	VMakeDir    string
	PluginDir   string
	CommandName string

	AddSubCommand     func(cmd *cobra.Command)
	RegisterToolchain func(name string, tc *toolchain.Toolchain)
	GetToolchains     func() map[string]*toolchain.Toolchain
	SetOnMissing      func(onMissing func(name string) (*toolchain.Toolchain, error))
	AddGlobalFlags    func(cflags, cxxflags []string)
	DownloadFile      func(url, dest string) error
	ExtractArchive    func(archive, dest string) error
	RunGitLFS         func(repoDir string, args ...string) error
}

type DiscoveredPlugin added in v0.0.11

type DiscoveredPlugin struct {
	RepoName   string
	PluginName string
	PluginDir  string
	Info       *Info
}

type ExtensionRepo added in v0.0.11

type ExtensionRepo struct {
	Name string
	Path string
	URL  string
}

type Info added in v0.0.11

type Info struct {
	Name        string `json:"name"`
	Version     string `json:"version"`
	Description string `json:"description"`
	Entry       string `json:"entry"`
	Enabled     bool   `json:"enabled"`
}

func LoadPluginInfo added in v0.0.11

func LoadPluginInfo(pluginDir string) (*Info, error)

type LoadedPlugin

type LoadedPlugin struct {
	Info   *Info
	Entry  MainFunc
	SoPath string
}

func Load

func Load(soPath string) (*LoadedPlugin, error)

type MainFunc added in v0.0.11

type MainFunc func(ctx *Context)

type Manager added in v0.0.11

type Manager struct {
	*gitstore.Store
	// contains filtered or unexported fields
}

func NewManager added in v0.0.11

func NewManager(vmakeDir string) *Manager

func (*Manager) AddRepo added in v0.0.11

func (m *Manager) AddRepo(name, gitURL string) error

func (*Manager) CompilePlugin added in v0.0.11

func (m *Manager) CompilePlugin(pluginDir string, force bool) (string, error)

func (*Manager) DiscoverPlugins added in v0.0.11

func (m *Manager) DiscoverPlugins() ([]DiscoveredPlugin, error)

func (*Manager) ListRepos added in v0.0.11

func (m *Manager) ListRepos() []ExtensionRepo

func (*Manager) RemoveRepo added in v0.0.11

func (m *Manager) RemoveRepo(name string) error

func (*Manager) UpdateRepo added in v0.0.11

func (m *Manager) UpdateRepo(name string) error

Jump to

Keyboard shortcuts

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