- Cross-platform support (Windows/Linux) with Windows Updates and Winget - Added dependency confirmation workflow and refresh token authentication - New screenshots: History, Live Operations, Windows Agent Details - Local CLI features with terminal output and cache system - Updated known limitations - Proxmox integration is broken - Organized docs to docs/ folder and updated .gitignore - Probably introduced a dozen bugs with Windows agents - stay tuned
31 lines
910 B
Go
31 lines
910 B
Go
package installer
|
|
|
|
import "fmt"
|
|
|
|
// 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
|
|
DryRun(packageName string) (*InstallResult, error) // New: Perform dry run to check dependencies
|
|
}
|
|
|
|
// 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()
|
|
case "windows_update":
|
|
return NewWindowsUpdateInstaller(), nil
|
|
case "winget":
|
|
return NewWingetInstaller(), nil
|
|
default:
|
|
return nil, fmt.Errorf("unsupported package type: %s", packageType)
|
|
}
|
|
} |