plugin

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Name of the plugin for display and registration purposes
	Name string
	// File name that contains version information
	VersionFileName string
	// Qualifier for SNAPSHOT versions
	VersionQualifier string
	// Required external tools
	RequiredTools []string
}

Config contains configuration values for plugin-specific behavior.

type Factory

type Factory struct {
	// Reference to global hooks
	Hooks *core.HookRegistry
}

Factory is a factory that injects core dependencies into plugin implementations.

func NewFactory

func NewFactory() *Factory

NewFactory creates a new Factory with the specified dependencies.

func (*Factory) NewPlugin

func (factory *Factory) NewPlugin(config Config) Plugin

NewPlugin creates and returns a Plugin instance with all dependencies injected. Plugin implementations can use this method to get a pre-configured Plugin.

type Plugin

type Plugin struct {
	Config Config
	Hooks  *core.HookRegistry // Shared hook registry for all plugins
}

Plugin provides a default implementation for common Plugin interface methods.

func (*Plugin) RegisterHook

func (p *Plugin) RegisterHook(hookType core.HookType, hookFunction core.HookFunction)

RegisterHook is a helper method to register a hook function.

func (*Plugin) RequiredTools

func (p *Plugin) RequiredTools() []string

RequiredTools returns list of required command line tools.

func (*Plugin) String

func (p *Plugin) String() string

String returns the name of the plugin.

func (*Plugin) VersionFileName

func (p *Plugin) VersionFileName() string

VersionFileName returns the filename containing version information.

func (*Plugin) VersionQualifier

func (p *Plugin) VersionQualifier() string

VersionQualifier returns the qualifier for version strings.

Jump to

Keyboard shortcuts

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