Skip to content

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

CheckInstanceModUpdates finds compatible catalog updates for managed mods in an instance.

Go

go
CheckInstanceModUpdates(instanceID string) (InstanceModUpdateReportDTO, error)

TypeScript

ts
CheckInstanceModUpdates(instanceID: string): Promise<InstanceModUpdateReportDTO>

Parameters

NameType
instanceIDstring

Returns

Go typeTypeScript type
InstanceModUpdateReportDTOInstanceModUpdateReportDTO

Example

ts
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

go
GetModDeletePreview(id string) (ModDeletePreviewDTO, error)

TypeScript

ts
GetModDeletePreview(id: string): Promise<ModDeletePreviewDTO>

Parameters

NameType
idstring

Returns

Go typeTypeScript type
ModDeletePreviewDTOModDeletePreviewDTO

Example

ts
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

go
InstallModFile(request InstallModFileRequest) (OperationDTO, error)

TypeScript

ts
InstallModFile(request: InstallModFileRequest): Promise<OperationDTO>

Parameters

NameType
requestInstallModFileRequest

Returns

Go typeTypeScript type
OperationDTOOperationDTO

Example

ts
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

go
InstallModFiles(request InstallModFilesRequest) (InstallModFilesResultDTO, error)

TypeScript

ts
InstallModFiles(request: InstallModFilesRequest): Promise<InstallModFilesResultDTO>

Parameters

NameType
requestInstallModFilesRequest

Returns

Go typeTypeScript type
InstallModFilesResultDTOInstallModFilesResultDTO

Example

ts
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

go
LinkLocalMods(instanceID string) (LinkLocalModsResultDTO, error)

TypeScript

ts
LinkLocalMods(instanceID: string): Promise<LinkLocalModsResultDTO>

Parameters

NameType
instanceIDstring

Returns

Go typeTypeScript type
LinkLocalModsResultDTOLinkLocalModsResultDTO

Example

ts
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

go
ListInstalledMods(instanceID string) ([]InstalledModDTO, error)

TypeScript

ts
ListInstalledMods(instanceID: string): Promise<InstalledModDTO[]>

Parameters

NameType
instanceIDstring

Returns

Go typeTypeScript type
[]InstalledModDTOInstalledModDTO[]

Example

ts
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

go
RemoveMod(id string, deleteDependencies bool) error

TypeScript

ts
RemoveMod(id: string, deleteDependencies: boolean): Promise<void>

Parameters

NameType
idstring
deleteDependenciesbool

Example

ts
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

go
SetModEnabled(id string, enabled bool) (InstalledModDTO, error)

TypeScript

ts
SetModEnabled(id: string, enabled: boolean): Promise<InstalledModDTO>

Parameters

NameType
idstring
enabledbool

Returns

Go typeTypeScript type
InstalledModDTOInstalledModDTO

Example

ts
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

go
SetModUpdatePolicy(id string, policy string) (InstalledModDTO, error)

TypeScript

ts
SetModUpdatePolicy(id: string, policy: string): Promise<InstalledModDTO>

Parameters

NameType
idstring
policystring

Returns

Go typeTypeScript type
InstalledModDTOInstalledModDTO

Example

ts
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

go
UpdateInstanceMods(request UpdateInstanceModsRequest) (ModUpdateResultDTO, error)

TypeScript

ts
UpdateInstanceMods(request: UpdateInstanceModsRequest): Promise<ModUpdateResultDTO>

Parameters

NameType
requestUpdateInstanceModsRequest

Returns

Go typeTypeScript type
ModUpdateResultDTOModUpdateResultDTO

Errors

  • instance_not_found: the instance does not exist
  • mod_not_found: an installed mod is not known to the catalog
  • mod_version_not_found: a requested release does not exist
  • mod_incompatible: a release is incompatible with the instance
  • snapshot_in_progress: a snapshot is currently being taken
  • data_folder_busy: a data-folder relocation is in progress

Example

ts
const updateInstanceMods = await UpdateInstanceMods({ instanceId: "instance-id", mods: [], allowIncompatible: false })

Source

internal/transport/wails/mod_manager_controller.go:116