Documentation
¶
Index ¶
Constants ¶
View Source
const NeedsDownloadProfileName = "requiem-overhaul"
NeedsDownloadProfileName names the one canned profile (see Load) whose Mods list references an ID absent from InstalledMods, so prototypeProvider.PlanProfileSwitch (actions_provider.go) can produce a NeedsDownloads plan and --prototype mode can demo the refusal state without any core.Service.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conflict ¶ added in v1.14.0
Conflict is one canned file-conflict row (Task 3) - see Data.Conflicts.
type Data ¶
type Data struct {
Game Game
Profile Profile
Stats Stats
InstalledMods []Mod
SearchResults []Mod
Profiles []Profile
// AltGame/AltMods are Task 8's second canned game, letting --prototype
// mode demo the in-TUI game switcher ('g') end to end: AltMods is
// deliberately tiny (1-2 entries) - the demo only needs the switch to
// visibly work, not a second full dataset. See
// prototypeProvider.ListGames/SetGame (service.go/actions_provider.go)
// for how these back the switcher.
AltGame Game
AltMods []Mod
// Conflicts is the PRIMARY game's canned file-conflict set (Task 3),
// feeding prototypeProvider.Conflicts (service.go) for the Conflicts
// screen's --prototype demo: one stale entry and one in-sync entry, so
// the demo shows both the stale marker and both detail-pane hint copy
// variants. The alt game has none - see prototypeProvider.Conflicts' own
// doc comment.
Conflicts []Conflict
}
Data is the fake, side-effect-free data set used for visual TUI iteration.
type Mod ¶
type Mod struct {
ID string // stable, invented demo identifier - addresses the mod alongside Source for action calls
Name string
Source string
Author string
Version string
Status string
Summary string
Downloads int64
Endorsements int64
HasEndorsements bool
// Description/SourceURL/PictureURL feed the mod details view (#86). Only
// a few entries set them; the view's omit-when-empty rules are exactly
// what the sparse entries exercise.
Description string
SourceURL string
PictureURL string
// Dependencies/Conflicts/SizeBytes feed prototypeProvider.PlanInstall's
// fake plan (actions_provider.go) for a SearchResults entry: canned
// dependency/conflict display lines and a declared download size. Every
// InstalledMods entry (and most SearchResults entries) leaves these
// unset, matching the "never invent a phantom X" convention Profile.Mods
// already follows; SizeBytes <= 0 means "size unknown" (InstallPlanView.
// SizeLabel's documented contract).
Dependencies []string
Conflicts []string
SizeBytes int64
// UpdatePolicy/AvailableVersion feed prototypeProvider.CheckUpdates' fake
// canned set: an InstalledMods entry with a non-empty AvailableVersion
// reports an available update from Version to AvailableVersion.
// UpdatePolicy ("auto" or "notify") is canned alongside it for a future
// keybinding layer to consult - CheckUpdates itself (an ActionProvider
// method) doesn't project policy into UpdateItem, see that type's doc
// comment. Every other InstalledMods entry leaves both unset.
UpdatePolicy string
AvailableVersion string
// Changelog feeds prototypeProvider.CheckUpdates' UpdateItem.Changelog
// (Phase 6b Task 7): skyui carries a canned multi-line changelog and
// ussep deliberately leaves it empty, so --prototype mode can demo both
// the changelog overlay's normal case ('v' on the apply-updates modal)
// and its "no changelog available" one. Every other InstalledMods entry
// leaves this unset, matching AvailableVersion's own "never invent a
// phantom update" convention.
Changelog string
// PreviousVersion feeds prototypeProvider.Rollback's fake swap (Task 6):
// a non-empty value marks the InstalledMods entry as rollback-eligible,
// mirroring domain.InstalledMod.PreviousVersion's own "version before
// last update" contract - ModItem.PreviousVersion (service.go) is
// populated straight from this field. Every other canned mod leaves it
// unset, so --prototype mode can also demo the "no previous version to
// roll back to" refusal (mutations.go's rollbackSelectedMod) on those.
PreviousVersion string
// Locked/LockedVersion feed prototypeProvider.SetLock/Unlock's in-memory
// lock flags (#97) and ModItem.Locked/LockedVersion's projection
// (service.go's modItems) - mirroring UpdatePolicy's own "canned field
// mutated in place, visible in a repeated Overview" convention above.
// LockedVersion is only meaningful (and only ever set) while Locked is
// true - Unlock clears both, matching ModItem.LockedVersion's own
// "empty whenever Locked is false" contract. Every InstalledMods entry
// leaves both unset, so --prototype mode can also demo the unlocked
// case on every canned mod.
Locked bool
LockedVersion string
}
type Profile ¶
type Profile struct {
Name string
Active bool
ModCount int
// Mods is optional: installed-mod IDs this profile references, used
// only to seed PlanProfileSwitch's NeedsDownloads demo scenario (see
// NeedsDownloadProfileName below and actions_provider.go's
// prototypeProvider.PlanProfileSwitch). Every other canned profile
// leaves this nil - the alternating Enable/Disable plan logic never
// consults it.
Mods []string
}
type Stats ¶
type Stats struct {
Installed int
Enabled int
Updates int
Conflicts int
// LastDeploy feeds prototypeProvider.Overview's Summary.LastDeploy
// (#106a's dashboard "Last deploy" row) for the PRIMARY game only - see
// that method's doc comment for why the alt game leaves it at the zero
// value (treated as "never deployed", same as its Updates/Conflicts
// sentinels). Computed relative to Load()'s own call time rather than a
// fixed wall-clock constant, so the canned "N ago" demo value stays
// sensible no matter when --prototype mode is actually run.
LastDeploy time.Time
}
Click to show internal directories.
Click to hide internal directories.