mirror of
https://github.com/getcompanion-ai/computer-host.git
synced 2026-04-15 05:02:05 +00:00
feat(contracts): add published ports, snapshot request, and storage report types
This commit is contained in:
parent
501ae2abd5
commit
26b5d2966d
20 changed files with 893 additions and 81 deletions
|
|
@ -9,10 +9,12 @@ import (
|
|||
type StoragePool string
|
||||
|
||||
const (
|
||||
StoragePoolArtifacts StoragePool = "artifacts"
|
||||
StoragePoolMachineDisks StoragePool = "machine-disks"
|
||||
StoragePoolState StoragePool = "state"
|
||||
StoragePoolUserVolumes StoragePool = "user-volumes"
|
||||
StoragePoolArtifacts StoragePool = "artifacts"
|
||||
StoragePoolMachineDisks StoragePool = "machine-disks"
|
||||
StoragePoolPublishedPorts StoragePool = "published-ports"
|
||||
StoragePoolSnapshots StoragePool = "snapshots"
|
||||
StoragePoolState StoragePool = "state"
|
||||
StoragePoolUserVolumes StoragePool = "user-volumes"
|
||||
)
|
||||
|
||||
type ArtifactRecord struct {
|
||||
|
|
@ -54,6 +56,7 @@ type MachineOperation string
|
|||
|
||||
const (
|
||||
MachineOperationCreate MachineOperation = "create"
|
||||
MachineOperationStart MachineOperation = "start"
|
||||
MachineOperationStop MachineOperation = "stop"
|
||||
MachineOperationDelete MachineOperation = "delete"
|
||||
MachineOperationSnapshot MachineOperation = "snapshot"
|
||||
|
|
@ -72,6 +75,16 @@ type SnapshotRecord struct {
|
|||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
type PublishedPortRecord struct {
|
||||
ID contracthost.PublishedPortID
|
||||
MachineID contracthost.MachineID
|
||||
Name string
|
||||
Port uint16
|
||||
HostPort uint16
|
||||
Protocol contracthost.PortProtocol
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
type OperationRecord struct {
|
||||
MachineID contracthost.MachineID
|
||||
Type MachineOperation
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue