Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DriftDifference ¶
type DriftDifference struct {
Property string
CurrentValue interface{}
DesiredValue interface{}
DriftType DriftType
}
DriftDifference represents a difference between current and desired state
type DriftResult ¶
type DriftResult struct {
HasDrift bool
Changes []string // Human-readable list of changes
Differences map[string]DriftDifference
CurrentState map[string]interface{}
DesiredState map[string]interface{}
}
DriftResult represents the result of drift detection
type Provider ¶
type Provider interface {
// Initialize sets up the provider with configuration
Initialize(ctx context.Context, config map[string]interface{}) error
// Create creates a new resource
Create(ctx context.Context, instance config.ResourceInstance) error
// Update updates an existing resource
Update(ctx context.Context, instance config.ResourceInstance, currentState map[string]interface{}) error
// Delete deletes a resource
Delete(ctx context.Context, instance config.ResourceInstance) error
// GetCurrentState retrieves the current state of a resource
GetCurrentState(ctx context.Context, instance config.ResourceInstance) (map[string]interface{}, error)
// ValidateResource validates a resource configuration
ValidateResource(instance config.ResourceInstance) error
// GetSupportedResourceTypes returns the resource types supported by this provider
GetSupportedResourceTypes() []string
}
Provider defines the interface for cloud providers
type ProviderRegistry ¶
type ProviderRegistry struct {
// contains filtered or unexported fields
}
ProviderRegistry manages available providers
func NewProviderRegistry ¶
func NewProviderRegistry() *ProviderRegistry
NewProviderRegistry creates a new provider registry
func NewRegistry ¶
func NewRegistry() *ProviderRegistry
NewRegistry creates a new provider registry (alias for NewProviderRegistry)
func (*ProviderRegistry) Get ¶
func (r *ProviderRegistry) Get(name string) (Provider, bool)
Get retrieves a provider by name
func (*ProviderRegistry) GetAll ¶
func (r *ProviderRegistry) GetAll() map[string]Provider
GetAll returns all registered providers
func (*ProviderRegistry) Register ¶
func (r *ProviderRegistry) Register(name string, provider Provider)
Register registers a provider
Click to show internal directories.
Click to hide internal directories.