plugins

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin interface {
	// Name returns the name of the plugin (used as the command name)
	Name() string

	// Description returns a short description of what the plugin does
	Description() string

	// Execute runs the plugin with the given arguments and output format
	Execute(args []string, outputFormat string) error
}

Plugin defines the interface that all command plugins must implement

type Registry

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

Registry manages all registered plugins

func NewRegistry

func NewRegistry() *Registry

NewRegistry creates a new plugin registry

func (*Registry) All

func (r *Registry) All() []Plugin

All returns all registered plugins

func (*Registry) Get

func (r *Registry) Get(name string) (Plugin, bool)

Get retrieves a plugin by name

func (*Registry) Register

func (r *Registry) Register(plugin Plugin) error

Register adds a plugin to the registry

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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