Documentation
¶
Index ¶
- func FormatUpdateReport(results []*UpdateResult) string
- type Manager
- func (m *Manager) CheckAll() (map[string]string, []string)
- func (m *Manager) CheckForUpdates(name string) (string, bool, error)
- func (m *Manager) Get(name string) *Module
- func (m *Manager) List() []*Module
- func (m *Manager) Update(name string) (*UpdateResult, error)
- func (m *Manager) UpdateAll() ([]*UpdateResult, error)
- type Manifest
- type Module
- type ModuleType
- type Source
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatUpdateReport ¶
func FormatUpdateReport(results []*UpdateResult) string
FormatUpdateReport produces a human-readable update summary.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles module discovery, checking, and updating.
func NewManager ¶
NewManager loads or creates the modules manifest.
func (*Manager) CheckAll ¶
CheckAll checks all modules for available updates. GitHub-sourced modules that return [NOT IMPLEMENTED] are noted in the result map with a "(not yet implemented)" suffix so the CLI can surface them without treating the check as a fatal error.
func (*Manager) CheckForUpdates ¶
CheckForUpdates checks a single module for available updates. Returns (latestVersion, needsUpdate, error).
func (*Manager) Update ¶
func (m *Manager) Update(name string) (*UpdateResult, error)
Update updates a single module to its latest version.
func (*Manager) UpdateAll ¶
func (m *Manager) UpdateAll() ([]*UpdateResult, error)
UpdateAll updates all modules with AutoUpdate enabled.
type Module ¶
type Module struct {
Name string `toml:"-"` // key in the map
Source Source `toml:"source"` // github, go-module, git
Repo string `toml:"repo"` // GitHub: "owner/repo"
Path string `toml:"path"` // filesystem path under ~/.overkill/
Version string `toml:"version"` // current installed version
Type ModuleType `toml:"type"` // skill, dependency, plugin
Description string `toml:"description"` // human-readable
AutoUpdate bool `toml:"auto_update"` // update with --all
LastCheck time.Time `toml:"last_check"` // when we last checked for updates
}
Module represents one tracked module in the manifest.
type ModuleType ¶
type ModuleType string
ModuleType classifies what kind of module this is.
const ( TypeSkill ModuleType = "skill" TypeDependency ModuleType = "dependency" TypePlugin ModuleType = "plugin" )
type UpdateResult ¶
type UpdateResult struct {
Module string `json:"module"`
FromVersion string `json:"from_version"`
ToVersion string `json:"to_version"`
Updated bool `json:"updated"`
Error string `json:"error,omitempty"`
Skipped bool `json:"skipped"`
Reason string `json:"reason,omitempty"`
}
UpdateResult describes what happened during an update.