prototype

package
v1.12.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 0 Imported by: 0

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 Data

type Data struct {
	Game          Game
	Profile       Profile
	Stats         Stats
	InstalledMods []Mod
	SearchResults []Mod
	Profiles      []Profile
}

Data is the fake, side-effect-free data set used for visual TUI iteration.

func Load

func Load() Data

Load returns static demo data. It must never touch disk, network, DB, or APIs.

type Game

type Game struct {
	ID   string
	Name string
}

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

	// 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
}

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL