Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllTemplateVariables ¶
GetAllTemplateVariables collects template variables from all registered plugins
func RegisterTemplateProvider ¶
func RegisterTemplateProvider(provider TemplateProvider)
RegisterTemplateProvider adds a template provider to the global registry
Types ¶
type Plugin ¶
type Plugin interface {
// Name returns the name of the plugin
Name() string
// Types returns the set of plugin types this plugin implements.
// Type names match interface names for reflective discovery.
Types() PluginTypeSet
}
Plugin is the base interface all plugins must implement
func GetPluginsByType ¶
func GetPluginsByType(pluginType PluginType) []Plugin
GetPluginsByType returns all plugins that implement a specific type
type PluginType ¶
type PluginType string
PluginType represents the type of plugin capability. Values match interface names for reflective discovery.
const ( // TypeVCS indicates a version control system plugin TypeVCS PluginType = "VCS" // TypeTemplateProvider indicates a plugin that provides template variables TypeTemplateProvider PluginType = "TemplateProvider" // TypeOutput indicates an output format plugin TypeOutput PluginType = "Output" // TypeHook indicates a lifecycle hook plugin TypeHook PluginType = "Hook" )
type PluginTypeSet ¶
type PluginTypeSet map[PluginType]struct{}
PluginTypeSet represents a set of plugin types
func NewPluginTypeSet ¶
func NewPluginTypeSet(types ...PluginType) PluginTypeSet
NewPluginTypeSet creates a new set from the given types
func (PluginTypeSet) Contains ¶
func (s PluginTypeSet) Contains(t PluginType) bool
Contains checks if the set contains the given type
func (PluginTypeSet) Slice ¶
func (s PluginTypeSet) Slice() []PluginType
Slice returns the types as a slice
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds all registered plugins
type TemplateProvider ¶
type TemplateProvider interface {
Plugin
// GetTemplateVariables returns plugin-specific template variables
// The context map provides access to existing variables the plugin might need
// (e.g., ShortHash for creating prefixed hash variables)
GetTemplateVariables(context map[string]string) map[string]string
}
TemplateProvider is an interface for plugins that can provide template variables
func GetTemplateProviders ¶
func GetTemplateProviders() []TemplateProvider
GetTemplateProviders returns all registered template providers