InstancePackageController
InstancePackageController exposes instance package export, inspection, and import to the frontend. It stays limited to DTO conversion and feature invocation.
- Methods: 5
- Referenced types: 5
Methods
ExportInstance
ExportInstance writes a portable package containing sanitized instance data and metadata.
Go
ExportInstance(request ExportInstanceRequest) (PackageManifestDTO, error)TypeScript
ExportInstance(request: ExportInstanceRequest): Promise<PackageManifestDTO>Parameters
| Name | Type |
|---|---|
request | ExportInstanceRequest |
Returns
| Go type | TypeScript type |
|---|---|
PackageManifestDTO | PackageManifestDTO |
Example
const exportInstance = await ExportInstance({ instanceId: "instance-id", targetPath: "/path/to/file", name: "Example", description: "" })Source
internal/transport/wails/instance_package_controller.go:31
ImportPackage
ImportPackage creates a managed instance from a validated package.
Go
ImportPackage(request ImportInstanceRequest) (OperationDTO, error)TypeScript
ImportPackage(request: ImportInstanceRequest): Promise<OperationDTO>Parameters
| Name | Type |
|---|---|
request | ImportInstanceRequest |
Returns
| Go type | TypeScript type |
|---|---|
OperationDTO | OperationDTO |
Example
const importPackage = await ImportPackage({ packagePath: "/path/to/file", name: "Example", description: "", directory: "/path/to/directory", gameVersionId: "gameversion-id", installVersion: false, allowIncompatible: false, skipUnavailable: false })Source
internal/transport/wails/instance_package_controller.go:67
InspectPackage
InspectPackage validates a package and reports its contents before import.
Go
InspectPackage(packagePath string) (PackageInspectionDTO, error)TypeScript
InspectPackage(packagePath: string): Promise<PackageInspectionDTO>Parameters
| Name | Type |
|---|---|
packagePath | string |
Returns
| Go type | TypeScript type |
|---|---|
PackageInspectionDTO | PackageInspectionDTO |
Example
const inspectPackage = await InspectPackage("/path/to/file")Source
internal/transport/wails/instance_package_controller.go:47
SelectExportPath
SelectExportPath prompts for the destination of an exported instance package.
Go
SelectExportPath(suggestedName string) (string, error)TypeScript
SelectExportPath(suggestedName: string): Promise<string>Parameters
| Name | Type |
|---|---|
suggestedName | string |
Returns
| Go type | TypeScript type |
|---|---|
string | string |
Example
const selectExportPath = await SelectExportPath("Example")Source
internal/transport/wails/instance_package_controller.go:87
SelectPackageFile
SelectPackageFile prompts for an instance package to inspect or import.
Go
SelectPackageFile() (string, error)TypeScript
SelectPackageFile(): Promise<string>Returns
| Go type | TypeScript type |
|---|---|
string | string |
Example
const selectPackageFile = await SelectPackageFile()Source
internal/transport/wails/instance_package_controller.go:112