plugins

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterBuiltinPlugins

func RegisterBuiltinPlugins(cfg *config.Config, registry *PluginRegistry)

RegisterBuiltinPlugins registers all builtin plugins with the provided registry.

Types

type PluginInfo

type PluginInfo interface {
	Name() string
	Description() string
	Version() string
}

PluginInfo is a common interface that all plugins should implement. It provides basic metadata about a plugin.

type PluginMetadata

type PluginMetadata struct {
	// Type is the plugin type identifier.
	Type PluginType `json:"type"`

	// Name is the unique plugin name.
	Name string `json:"name"`

	// Description explains what the plugin does.
	Description string `json:"description"`

	// Version is the plugin version (semver format).
	Version string `json:"version"`

	// ConfigPath is the YAML path for configuration (e.g., "plugins.tag-manager").
	ConfigPath string `json:"config_path,omitempty"`
}

PluginMetadata contains metadata about a built-in plugin.

func GetBuiltinPlugins

func GetBuiltinPlugins() []PluginMetadata

GetBuiltinPlugins returns metadata for all built-in plugins.

type PluginRegistry

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

PluginRegistry is a thread-safe registry for all plugin instances. It replaces global package-level variables with a centralized, injectable registry.

func NewPluginRegistry

func NewPluginRegistry() *PluginRegistry

NewPluginRegistry creates a new empty plugin registry.

func (*PluginRegistry) GetAuditLog

func (r *PluginRegistry) GetAuditLog() auditlog.AuditLog

GetAuditLog retrieves the registered audit log, or nil if not registered.

func (*PluginRegistry) GetChangelogGenerator

func (r *PluginRegistry) GetChangelogGenerator() changeloggenerator.ChangelogGenerator

GetChangelogGenerator retrieves the registered changelog generator, or nil if not registered.

func (*PluginRegistry) GetChangelogParser

func (r *PluginRegistry) GetChangelogParser() changelogparser.ChangelogInferrer

GetChangelogParser retrieves the registered changelog parser, or nil if not registered.

func (*PluginRegistry) GetCommitParser

func (r *PluginRegistry) GetCommitParser() commitparser.CommitParser

GetCommitParser retrieves the registered commit parser, or nil if not registered.

func (*PluginRegistry) GetDependencyChecker

func (r *PluginRegistry) GetDependencyChecker() dependencycheck.DependencyChecker

GetDependencyChecker retrieves the registered dependency checker, or nil if not registered.

func (*PluginRegistry) GetReleaseGate

func (r *PluginRegistry) GetReleaseGate() releasegate.ReleaseGate

GetReleaseGate retrieves the registered release gate, or nil if not registered.

func (*PluginRegistry) GetTagManager

func (r *PluginRegistry) GetTagManager() tagmanager.TagManager

GetTagManager retrieves the registered tag manager, or nil if not registered.

func (*PluginRegistry) GetVersionValidator

func (r *PluginRegistry) GetVersionValidator() versionvalidator.VersionValidator

GetVersionValidator retrieves the registered version validator, or nil if not registered.

func (*PluginRegistry) RegisterAuditLog

func (r *PluginRegistry) RegisterAuditLog(al auditlog.AuditLog) error

RegisterAuditLog registers an audit log plugin.

func (*PluginRegistry) RegisterChangelogGenerator

func (r *PluginRegistry) RegisterChangelogGenerator(cg changeloggenerator.ChangelogGenerator) error

RegisterChangelogGenerator registers a changelog generator plugin.

func (*PluginRegistry) RegisterChangelogParser

func (r *PluginRegistry) RegisterChangelogParser(cp changelogparser.ChangelogInferrer) error

RegisterChangelogParser registers a changelog parser plugin.

func (*PluginRegistry) RegisterCommitParser

func (r *PluginRegistry) RegisterCommitParser(p commitparser.CommitParser) error

RegisterCommitParser registers a commit parser plugin.

func (*PluginRegistry) RegisterDependencyChecker

func (r *PluginRegistry) RegisterDependencyChecker(dc dependencycheck.DependencyChecker) error

RegisterDependencyChecker registers a dependency checker plugin.

func (*PluginRegistry) RegisterReleaseGate

func (r *PluginRegistry) RegisterReleaseGate(rg releasegate.ReleaseGate) error

RegisterReleaseGate registers a release gate plugin.

func (*PluginRegistry) RegisterTagManager

func (r *PluginRegistry) RegisterTagManager(tm tagmanager.TagManager) error

RegisterTagManager registers a tag manager plugin.

func (*PluginRegistry) RegisterVersionValidator

func (r *PluginRegistry) RegisterVersionValidator(vv versionvalidator.VersionValidator) error

RegisterVersionValidator registers a version validator plugin.

func (*PluginRegistry) Reset

func (r *PluginRegistry) Reset()

Reset clears all registered plugins. Useful for testing.

type PluginType

type PluginType string

PluginType represents the type of a plugin.

const (
	TypeCommitParser       PluginType = "commit-parser"
	TypeTagManager         PluginType = "tag-manager"
	TypeVersionValidator   PluginType = "version-validator"
	TypeDependencyChecker  PluginType = "dependency-check"
	TypeChangelogParser    PluginType = "changelog-parser"
	TypeChangelogGenerator PluginType = "changelog-generator"
	TypeReleaseGate        PluginType = "release-gate"
	TypeAuditLog           PluginType = "audit-log"
)

Jump to

Keyboard shortcuts

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