ModManagerController
ModManagerController exposes installed-mod management to the frontend. It stays limited to DTO conversion and feature invocation.
- Methods: 10
- Referenced types: 10
Methods
- CheckInstanceModUpdates
- GetModDeletePreview
- InstallModFile
- InstallModFiles
- LinkLocalMods
- ListInstalledMods
- RemoveMod
- SetModEnabled
- SetModUpdatePolicy
- UpdateInstanceMods
CheckInstanceModUpdates
CheckInstanceModUpdates finds compatible catalog updates for managed mods in an instance.
Go
CheckInstanceModUpdates(instanceID string) (InstanceModUpdateReportDTO, error)TypeScript
CheckInstanceModUpdates(instanceID: string): Promise<InstanceModUpdateReportDTO>Parameters
| Name | Type |
|---|---|
instanceID | string |
Returns
| Go type | TypeScript type |
|---|---|
InstanceModUpdateReportDTO | InstanceModUpdateReportDTO |
Example
const checkInstanceModUpdates = await CheckInstanceModUpdates("instance-id")Source
internal/transport/wails/mod_manager_controller.go:69
GetModDeletePreview
GetModDeletePreview reports dependent mods that would be affected by removal.
Go
GetModDeletePreview(id string) (ModDeletePreviewDTO, error)TypeScript
GetModDeletePreview(id: string): Promise<ModDeletePreviewDTO>Parameters
| Name | Type |
|---|---|
id | string |
Returns
| Go type | TypeScript type |
|---|---|
ModDeletePreviewDTO | ModDeletePreviewDTO |
Example
const getModDeletePreview = await GetModDeletePreview("id")Source
internal/transport/wails/mod_manager_controller.go:200
InstallModFile
InstallModFile installs one local mod archive into an instance.
Go
InstallModFile(request InstallModFileRequest) (OperationDTO, error)TypeScript
InstallModFile(request: InstallModFileRequest): Promise<OperationDTO>Parameters
| Name | Type |
|---|---|
request | InstallModFileRequest |
Returns
| Go type | TypeScript type |
|---|---|
OperationDTO | OperationDTO |
Example
const installModFile = await InstallModFile({ instanceId: "instance-id", sourcePath: "/path/to/file", name: "Example", version: "1.0.0" })Source
internal/transport/wails/mod_manager_controller.go:146
InstallModFiles
InstallModFiles installs several local mod archives and reports individual failures.
Go
InstallModFiles(request InstallModFilesRequest) (InstallModFilesResultDTO, error)TypeScript
InstallModFiles(request: InstallModFilesRequest): Promise<InstallModFilesResultDTO>Parameters
| Name | Type |
|---|---|
request | InstallModFilesRequest |
Returns
| Go type | TypeScript type |
|---|---|
InstallModFilesResultDTO | InstallModFilesResultDTO |
Example
const installModFiles = await InstallModFiles({ instanceId: "instance-id", sourcePaths: [] })Source
internal/transport/wails/mod_manager_controller.go:160
LinkLocalMods
LinkLocalMods links compatible cached mod files into an instance.
Go
LinkLocalMods(instanceID string) (LinkLocalModsResultDTO, error)TypeScript
LinkLocalMods(instanceID: string): Promise<LinkLocalModsResultDTO>Parameters
| Name | Type |
|---|---|
instanceID | string |
Returns
| Go type | TypeScript type |
|---|---|
LinkLocalModsResultDTO | LinkLocalModsResultDTO |
Example
const linkLocalMods = await LinkLocalMods("instance-id")Source
internal/transport/wails/mod_manager_controller.go:61
ListInstalledMods
ListInstalledMods returns mods installed in an instance and their enabled state.
Go
ListInstalledMods(instanceID string) ([]InstalledModDTO, error)TypeScript
ListInstalledMods(instanceID: string): Promise<InstalledModDTO[]>Parameters
| Name | Type |
|---|---|
instanceID | string |
Returns
| Go type | TypeScript type |
|---|---|
[]InstalledModDTO | InstalledModDTO[] |
Example
const listInstalledMods = await ListInstalledMods("instance-id")Source
internal/transport/wails/mod_manager_controller.go:49
RemoveMod
RemoveMod removes an installed mod and optionally its dependent mods.
Go
RemoveMod(id string, deleteDependencies bool) errorTypeScript
RemoveMod(id: string, deleteDependencies: boolean): Promise<void>Parameters
| Name | Type |
|---|---|
id | string |
deleteDependencies | bool |
Example
await RemoveMod("id", false)Source
internal/transport/wails/mod_manager_controller.go:195
SetModEnabled
SetModEnabled enables or disables an installed mod for its owning instance.
Go
SetModEnabled(id string, enabled bool) (InstalledModDTO, error)TypeScript
SetModEnabled(id: string, enabled: boolean): Promise<InstalledModDTO>Parameters
| Name | Type |
|---|---|
id | string |
enabled | bool |
Returns
| Go type | TypeScript type |
|---|---|
InstalledModDTO | InstalledModDTO |
Example
const setModEnabled = await SetModEnabled("id", false)Source
internal/transport/wails/mod_manager_controller.go:182
SetModUpdatePolicy
SetModUpdatePolicy changes how a managed mod participates in automatic updates.
Go
SetModUpdatePolicy(id string, policy string) (InstalledModDTO, error)TypeScript
SetModUpdatePolicy(id: string, policy: string): Promise<InstalledModDTO>Parameters
| Name | Type |
|---|---|
id | string |
policy | string |
Returns
| Go type | TypeScript type |
|---|---|
InstalledModDTO | InstalledModDTO |
Example
const setModUpdatePolicy = await SetModUpdatePolicy("id", "")Source
internal/transport/wails/mod_manager_controller.go:140
UpdateInstanceMods
UpdateInstanceMods updates several installed mods of one instance in a single coordinated operation; the backend creates exactly one automatic safety snapshot before the first update is applied.
Go
UpdateInstanceMods(request UpdateInstanceModsRequest) (ModUpdateResultDTO, error)TypeScript
UpdateInstanceMods(request: UpdateInstanceModsRequest): Promise<ModUpdateResultDTO>Parameters
| Name | Type |
|---|---|
request | UpdateInstanceModsRequest |
Returns
| Go type | TypeScript type |
|---|---|
ModUpdateResultDTO | ModUpdateResultDTO |
Errors
instance_not_found: the instance does not existmod_not_found: an installed mod is not known to the catalogmod_version_not_found: a requested release does not existmod_incompatible: a release is incompatible with the instancesnapshot_in_progress: a snapshot is currently being takendata_folder_busy: a data-folder relocation is in progress
Example
const updateInstanceMods = await UpdateInstanceMods({ instanceId: "instance-id", mods: [], allowIncompatible: false })Source
internal/transport/wails/mod_manager_controller.go:116