fix: address gateway review findings

This commit is contained in:
Harivansh Rathi 2026-04-09 17:52:14 +00:00
parent 59d3290bb9
commit 500354cd9b
14 changed files with 441 additions and 66 deletions

View file

@ -3,21 +3,23 @@ package host
import "time"
type Machine struct {
ID MachineID `json:"id"`
Artifact ArtifactRef `json:"artifact"`
SystemVolumeID VolumeID `json:"system_volume_id,omitempty"`
UserVolumeIDs []VolumeID `json:"user_volume_ids,omitempty"`
RuntimeHost string `json:"runtime_host,omitempty"`
Ports []MachinePort `json:"ports,omitempty"`
Phase MachinePhase `json:"phase"`
Error string `json:"error,omitempty"`
CreatedAt time.Time `json:"created_at"`
StartedAt *time.Time `json:"started_at,omitempty"`
ID MachineID `json:"id"`
Artifact ArtifactRef `json:"artifact"`
SystemVolumeID VolumeID `json:"system_volume_id,omitempty"`
UserVolumeIDs []VolumeID `json:"user_volume_ids,omitempty"`
RuntimeHost string `json:"runtime_host,omitempty"`
Ports []MachinePort `json:"ports,omitempty"`
GuestSSHPublicKey string `json:"guest_ssh_host_public_key,omitempty"`
Phase MachinePhase `json:"phase"`
Error string `json:"error,omitempty"`
CreatedAt time.Time `json:"created_at"`
StartedAt *time.Time `json:"started_at,omitempty"`
}
type GuestConfig struct {
AuthorizedKeys []string `json:"authorized_keys,omitempty"`
LoginWebhook *GuestLoginWebhook `json:"login_webhook,omitempty"`
AuthorizedKeys []string `json:"authorized_keys,omitempty"`
TrustedUserCAKeys []string `json:"trusted_user_ca_keys,omitempty"`
LoginWebhook *GuestLoginWebhook `json:"login_webhook,omitempty"`
}
type GuestLoginWebhook struct {

View file

@ -16,5 +16,6 @@ const (
type MachinePort struct {
Name MachinePortName `json:"name"`
Port uint16 `json:"port"`
HostPort uint16 `json:"host_port,omitempty"`
Protocol PortProtocol `json:"protocol"`
}