Files
Redflag/aggregator-agent/internal/installer/installer.go
Fimeg a7fad61de2 Update installer system for update approval functionality
Major milestone: Update installation system now works
- Implemented unified installer interface with factory pattern
- Created APT, DNF, and Docker installers
- Integrated installer into agent command processing loop
- Update approval button now actually installs packages

Documentation updates:
- Updated claude.md with Session 7 implementation log
- Created clean, professional README.md for GitHub
- Added screenshots section with 4 dashboard views
- Preserved detailed development history in backup files

Repository ready for GitHub alpha release with working installer functionality.
2025-10-16 09:06:12 -04:00

24 lines
680 B
Go

package installer
// Installer interface for different package types
type Installer interface {
IsAvailable() bool
Install(packageName string) (*InstallResult, error)
InstallMultiple(packageNames []string) (*InstallResult, error)
Upgrade() (*InstallResult, error)
GetPackageType() string
}
// InstallerFactory creates appropriate installer based on package type
func InstallerFactory(packageType string) (Installer, error) {
switch packageType {
case "apt":
return NewAPTInstaller(), nil
case "dnf":
return NewDNFInstaller(), nil
case "docker_image":
return NewDockerInstaller()
default:
return nil, fmt.Errorf("unsupported package type: %s", packageType)
}
}