Documentation
¶
Index ¶
- type AnalyzerPlugin
- type GeneratorPlugin
- type IntegrationPlugin
- type Plugin
- type PluginInfo
- type PluginType
- type ProviderPlugin
- type Registry
- func (r *Registry) DisablePlugin(ctx context.Context, pluginID string) error
- func (r *Registry) EnablePlugin(ctx context.Context, pluginID string) error
- func (r *Registry) GetAllPlugins() []Plugin
- func (r *Registry) GetPlugin(pluginID string) (Plugin, error)
- func (r *Registry) GetPluginInfo() []PluginInfo
- func (r *Registry) GetPluginsByType(pluginType PluginType) []Plugin
- func (r *Registry) HealthCheck(ctx context.Context) map[string]error
- func (r *Registry) InitializeAll(ctx context.Context) error
- func (r *Registry) Register(ctx context.Context, plugin Plugin) error
- func (r *Registry) ShutdownAll(ctx context.Context)
- func (r *Registry) Unregister(pluginID string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnalyzerPlugin ¶
type AnalyzerPlugin interface {
Plugin
// AnalyzeProject performs custom project analysis
AnalyzeProject(ctx context.Context, projectPath string) (*analysis.ProjectAnalysis, error)
// GetSupportedLanguages returns languages this analyzer supports
GetSupportedLanguages() []string
// GetConfidenceScore returns how confident this analyzer is for a project
GetConfidenceScore(ctx context.Context, projectPath string) (float64, error)
}
AnalyzerPlugin extends Plugin for project analysis capabilities
type GeneratorPlugin ¶
type GeneratorPlugin interface {
Plugin
// GenerateFile creates a file based on analysis and templates
GenerateFile(ctx context.Context, analysis *analysis.ProjectAnalysis, template string) (string, error)
// GetSupportedTemplates returns templates this generator supports
GetSupportedTemplates() []string
// ValidateTemplate checks if a template is valid
ValidateTemplate(ctx context.Context, template string) error
}
GeneratorPlugin extends Plugin for file generation capabilities
type IntegrationPlugin ¶
type IntegrationPlugin interface {
Plugin
// GetServiceName returns the integrated service name
GetServiceName() string
// TestConnection verifies connectivity to the external service
TestConnection(ctx context.Context) error
// GetCapabilities returns what this integration can do
GetCapabilities() []string
}
IntegrationPlugin extends Plugin for external service integrations
type Plugin ¶
type Plugin interface {
// GetInfo returns plugin metadata
GetInfo() PluginInfo
// Initialize prepares the plugin for use
Initialize(ctx context.Context, config map[string]string) error
// Shutdown cleans up plugin resources
Shutdown(ctx context.Context) error
// IsHealthy checks if the plugin is functioning correctly
IsHealthy(ctx context.Context) error
}
Plugin defines the interface that all plugins must implement
type PluginInfo ¶
type PluginInfo struct {
ID string `json:"id"`
Name string `json:"name"`
Version string `json:"version"`
Type PluginType `json:"type"`
Description string `json:"description"`
Author string `json:"author"`
Tags []string `json:"tags"`
Config map[string]string `json:"config"`
Enabled bool `json:"enabled"`
}
PluginInfo contains metadata about a plugin
type PluginType ¶
type PluginType string
PluginType defines the type of plugin
const ( PluginTypeAnalyzer PluginType = "analyzer" PluginTypeGenerator PluginType = "generator" PluginTypeProvider PluginType = "provider" PluginTypeIntegration PluginType = "integration" )
type ProviderPlugin ¶
type ProviderPlugin interface {
Plugin
// GetProviderName returns the cloud provider name
GetProviderName() string
// GetSupportedResources returns available resources for this provider
GetSupportedResources() []string
// ValidateCredentials checks if provider credentials are valid
ValidateCredentials(ctx context.Context) error
}
ProviderPlugin extends Plugin for cloud provider integrations
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry manages all registered plugins
func NewRegistry ¶
NewRegistry creates a new plugin registry
func (*Registry) DisablePlugin ¶
DisablePlugin disables a specific plugin
func (*Registry) EnablePlugin ¶
EnablePlugin enables a specific plugin
func (*Registry) GetAllPlugins ¶
GetAllPlugins returns all registered plugins
func (*Registry) GetPluginInfo ¶
func (r *Registry) GetPluginInfo() []PluginInfo
GetPluginInfo returns information about all registered plugins
func (*Registry) GetPluginsByType ¶
func (r *Registry) GetPluginsByType(pluginType PluginType) []Plugin
GetPluginsByType returns all plugins of a specific type
func (*Registry) HealthCheck ¶
HealthCheck checks the health of all plugins
func (*Registry) InitializeAll ¶
InitializeAll initializes all registered plugins
func (*Registry) ShutdownAll ¶
ShutdownAll shuts down all registered plugins
func (*Registry) Unregister ¶
Unregister removes a plugin from the registry