Documentation
¶
Index ¶
- func Register(reg *execution.ActionRegistry)
- type Install
- type Provider
- func (p *Provider) CompensateInstall(state map[string]any) error
- func (p *Provider) CompensateRemove(state map[string]any) error
- func (p *Provider) CompensateUpgrade(_ map[string]any) error
- func (p *Provider) Install(packages []string, manager string, cask bool) (map[string]any, error)
- func (p *Provider) Remove(packages []string, manager string, cask bool) (map[string]any, error)
- func (p *Provider) Update(manager string) error
- func (p *Provider) Upgrade(packages []string, manager string, cask bool) (map[string]any, error)
- type Remove
- type Update
- type Upgrade
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(reg *execution.ActionRegistry)
Register registers all package actions with the given registry.
Types ¶
type Install ¶
type Install struct{ Impl *Provider }
Install installs packages using the platform's package manager.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider provides platform-independent package management. The package manager is resolved at runtime via host.PackageManager().
Compensable Forward methods return (map[string]any, error). The map is the compensation receipt — opaque to the executor, meaningful only to the corresponding Compensate* Backward method.
func (*Provider) CompensateInstall ¶
CompensateInstall undoes an Install by removing packages that weren't already installed before the operation.
func (*Provider) CompensateRemove ¶
CompensateRemove undoes a Remove by reinstalling the removed packages.
func (*Provider) CompensateUpgrade ¶
CompensateUpgrade is a diagnostic no-op. Previous versions are captured in state for manual recovery, but automatic downgrade is not reliable across package managers.
func (*Provider) Install ¶
Install installs packages using the platform's package manager. Returns compensation state with pre-install status per package.
func (*Provider) Remove ¶
Remove removes packages using the platform's package manager. Returns compensation state for reinstallation.
type Remove ¶
type Remove struct{ Impl *Provider }
Remove removes packages using the platform's package manager.
type Update ¶
type Update struct{ Impl *Provider }
Update refreshes the package manager index.