Skip to content

SnapshotController

SnapshotController exposes instance snapshot management to the frontend. It stays limited to DTO conversion and feature invocation.

  • Methods: 4
  • Referenced types: 2

Methods

CreateInstanceSnapshot

CreateInstanceSnapshot captures the current instance data as a restorable backup.

Go

go
CreateInstanceSnapshot(instanceID string) (OperationDTO, error)

TypeScript

ts
CreateInstanceSnapshot(instanceID: string): Promise<OperationDTO>

Parameters

NameType
instanceIDstring

Returns

Go typeTypeScript type
OperationDTOOperationDTO

Example

ts
const createInstanceSnapshot = await CreateInstanceSnapshot("instance-id")

Source

internal/transport/wails/snapshot_controller.go:21

DeleteInstanceSnapshot

DeleteInstanceSnapshot permanently removes a selected instance backup.

Go

go
DeleteInstanceSnapshot(instanceID string, snapshotID string) error

TypeScript

ts
DeleteInstanceSnapshot(instanceID: string, snapshotID: string): Promise<void>

Parameters

NameType
instanceIDstring
snapshotIDstring

Example

ts
await DeleteInstanceSnapshot("instance-id", "snapshot-id")

Source

internal/transport/wails/snapshot_controller.go:66

ListInstanceSnapshots

ListInstanceSnapshots returns restorable backups for an instance in newest-first order.

Go

go
ListInstanceSnapshots(instanceID string) ([]InstanceSnapshotDTO, error)

TypeScript

ts
ListInstanceSnapshots(instanceID: string): Promise<InstanceSnapshotDTO[]>

Parameters

NameType
instanceIDstring

Returns

Go typeTypeScript type
[]InstanceSnapshotDTOInstanceSnapshotDTO[]

Example

ts
const listInstanceSnapshots = await ListInstanceSnapshots("instance-id")

Source

internal/transport/wails/snapshot_controller.go:32

RestoreInstanceSnapshot

RestoreInstanceSnapshot replaces current instance data with the selected backup.

Go

go
RestoreInstanceSnapshot(instanceID string, snapshotID string) error

TypeScript

ts
RestoreInstanceSnapshot(instanceID: string, snapshotID: string): Promise<void>

Parameters

NameType
instanceIDstring
snapshotIDstring

Example

ts
await RestoreInstanceSnapshot("instance-id", "snapshot-id")

Source

internal/transport/wails/snapshot_controller.go:50