Documentation
¶
Index ¶
- type Engine
- func (e *Engine) ApplyGame(ctx context.Context, opts ProcessOptions) (*ProcessResult, error)
- func (e *Engine) BatchInspect(ctx context.Context, parentDir string) ([]*GameStatus, error)
- func (e *Engine) BatchProcess(ctx context.Context, parentDir string, opts ProcessOptions) ([]*ProcessResult, error)
- func (e *Engine) CheckLibraryUpdates(ctx context.Context, parentDir string) ([]LibraryUpdateStatus, error)
- func (e *Engine) GetPatchNote(ctx context.Context, targetPath string, itemIndex int) (*steam.NewsItem, string, error)
- func (e *Engine) InspectStatus(ctx context.Context, targetPath string) (*GameStatus, error)
- func (e *Engine) InspectStatusEx(ctx context.Context, targetPath string, newsCount int) (*GameStatus, error)
- func (e *Engine) NotifyLaunch(ctx context.Context, gameDir string) error
- func (e *Engine) ProcessGame(ctx context.Context, opts ProcessOptions) (*ProcessResult, error)
- func (e *Engine) Rollback(ctx context.Context, targetPath string, dryRun bool) error
- func (e *Engine) VerifyIntegrity(ctx context.Context, targetPath string) (*manifest.IntegrityReport, error)
- type GameStatus
- type LibraryUpdateStatus
- type ProcessOptions
- type ProcessResult
- type StepProgress
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
Config *config.Config
Notifier func(ctx context.Context, title, message string) error
StepReporter func(ctx context.Context, prog StepProgress)
}
Engine is the core domain service orchestrating game scanning, patching, and launcher integrations.
func (*Engine) ApplyGame ¶ added in v1.0.112
func (e *Engine) ApplyGame(ctx context.Context, opts ProcessOptions) (*ProcessResult, error)
ApplyGame performs the end-to-end One-Shot lifecycle: Inspect -> Normalize -> Synthesize ACF -> GBE Setup -> Lutris Register.
func (*Engine) BatchInspect ¶ added in v1.0.108
BatchInspect scans all candidate game subdirectories in parentDir and returns their GameStatus.
func (*Engine) BatchProcess ¶
func (e *Engine) BatchProcess(ctx context.Context, parentDir string, opts ProcessOptions) ([]*ProcessResult, error)
BatchProcess scans a parent directory containing multiple game folders and processes each discovered game.
func (*Engine) CheckLibraryUpdates ¶ added in v1.0.107
func (e *Engine) CheckLibraryUpdates(ctx context.Context, parentDir string) ([]LibraryUpdateStatus, error)
CheckLibraryUpdates scans a directory containing game folders and checks for available Steam updates.
func (*Engine) GetPatchNote ¶ added in v1.0.107
func (e *Engine) GetPatchNote(ctx context.Context, targetPath string, itemIndex int) (*steam.NewsItem, string, error)
GetPatchNote fetches and retrieves a single patch note at itemIndex (1-indexed) for a game path or AppID.
func (*Engine) InspectStatus ¶
InspectStatus inspects a game directory to determine its patch and configuration state.
func (*Engine) InspectStatusEx ¶ added in v1.0.107
func (e *Engine) InspectStatusEx(ctx context.Context, targetPath string, newsCount int) (*GameStatus, error)
InspectStatusEx extends InspectStatus with customizable news history depth.
func (*Engine) NotifyLaunch ¶ added in v1.0.109
NotifyLaunch inspects a game directory for updates or configuration issues, and triggers a console/desktop notification if found.
func (*Engine) ProcessGame ¶
func (e *Engine) ProcessGame(ctx context.Context, opts ProcessOptions) (*ProcessResult, error)
ProcessGame processes a game directory according to the supplied options.
func (*Engine) Rollback ¶
Rollback restores original backup files and cleans up generated configuration files in a game directory.
func (*Engine) VerifyIntegrity ¶ added in v1.0.112
func (e *Engine) VerifyIntegrity(ctx context.Context, targetPath string) (*manifest.IntegrityReport, error)
VerifyIntegrity runs an on-demand full depot integrity comparison for a game directory.
type GameStatus ¶
type GameStatus struct {
Name string `json:"name"`
AppID string `json:"app_id"`
Store string `json:"store"` // "Steam", "GOG", "Epic", "Itch", "Custom"
GameDir string `json:"game_dir"`
Platform string `json:"platform"`
ExePath string `json:"exe_path"`
ExeArgs string `json:"exe_args,omitempty"`
LaunchCandidates []detector.LaunchCandidate `json:"launch_candidates,omitempty"`
State string `json:"state"` // "Original", "Loader-Configured", "Portable-Patched"
OriginalBackups []string `json:"original_backups"`
SettingsDirExists bool `json:"settings_dir_exists"`
SteamAppIDTxtFound bool `json:"steam_appid_txt_found"`
ManifestID string `json:"manifest_id"`
BuildID string `json:"build_id"`
DiskSizeBytes int64 `json:"disk_size_bytes"`
FileCount int `json:"file_count"`
OfficialFileCount int `json:"official_file_count"`
ModifiedFiles []string `json:"modified_files"`
MissingFiles []string `json:"missing_files"`
UntrackedFiles []string `json:"untracked_files"`
RedistModified []string `json:"redist_modified"`
RedistMissing []string `json:"redist_missing"`
HasUpdate bool `json:"has_update"`
RemoteManifestID string `json:"remote_manifest_id"`
DLCCount int `json:"dlc_count"`
AchievementCount int `json:"achievement_count"`
LutrisRegistered bool `json:"lutris_registered"`
RecentPatchNote string `json:"recent_patch_note"`
NewsItems []steam.NewsItem `json:"news_items"`
}
GameStatus describes the current patch & integration state of a game.
type LibraryUpdateStatus ¶ added in v1.0.107
type LibraryUpdateStatus struct {
GameTitle string
AppID string
GameDir string
LocalManifestID string
HasUpdate bool
}
LibraryUpdateStatus represents update availability status for a game in the library.
type ProcessOptions ¶
type ProcessOptions struct {
Path string
ApplyGBE bool
AddLutris bool
Portable bool
NormalizeDir bool
DryRun bool
AutoYes bool
NoSteamless bool
FetchAchievements bool
WinePrefix string
Runner string
ExePath string `json:"exe_path,omitempty"`
ExeArgs string `json:"exe_args,omitempty"`
}
ProcessOptions holds configuration flags for processing a game directory.
type ProcessResult ¶
type ProcessResult struct {
Info *detector.GameInfo
LutrisAdded bool
Patched bool
SteamlessUnpacked bool
ManifestsMoved bool
DirectoryNormalized bool
ACFSynthesized bool
Errors []string
}
ProcessResult summarizes the outcome of processing a game.
func ProcessGame ¶
func ProcessGame(ctx context.Context, cfg *config.Config, opts ProcessOptions) (*ProcessResult, error)
ProcessGame executes the end-to-end post-download setup for a single game directory.