plugin

package
v0.0.0-...-98b0973 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveMainContext

func ResolveMainContext(cmd *cobra.Command) *cobra.Command

ResolveMainContext gets the main context of the cli command from any context execution of any plugin. It's the main func to be used to bind a plugin to the main command cli context

Types

type Initializer

type Initializer interface {
	Initialize(cmd *cobra.Command)
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(pluginsDir string) *Manager

func (*Manager) Install

func (m *Manager) Install(name, pluginPath string) error

func (*Manager) List

func (m *Manager) List() ([]string, error)

func (*Manager) LoadAll

func (m *Manager) LoadAll(cmd *cobra.Command) error

func (*Manager) Uninstall

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

type PluginRegistry

type PluginRegistry struct {
	Plugins map[string]string `json:"plugins"` // map of plugin name to .so file path
}

Jump to

Keyboard shortcuts

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