@@ -7,24 +7,24 @@ import (
7
7
)
8
8
9
9
type LimaYAML struct {
10
- Arch Arch `yaml:"arch,omitempty"`
11
- Images []File `yaml:"images"` // REQUIRED
12
- CPUs int `yaml:"cpus,omitempty"`
13
- Memory string `yaml:"memory,omitempty"` // go-units.RAMInBytes
14
- Disk string `yaml:"disk,omitempty"` // go-units.RAMInBytes
15
- Mounts []Mount `yaml:"mounts,omitempty"`
16
- SSH SSH `yaml:"ssh,omitempty"` // REQUIRED (FIXME)
17
- Firmware Firmware `yaml:"firmware,omitempty"`
18
- Video Video `yaml:"video,omitempty"`
19
- Provision []Provision `yaml:"provision,omitempty"`
20
- Containerd Containerd `yaml:"containerd,omitempty"`
21
- Probes []Probe `yaml:"probes,omitempty"`
22
- PortForwards []PortForward `yaml:"portForwards,omitempty"`
23
- Networks []Network `yaml:"networks,omitempty"`
24
- Network NetworkDeprecated `yaml:"network,omitempty"` // DEPRECATED, use `networks` instead
25
- Env map [string ]string `yaml:"env,omitempty"`
26
- DNS []net.IP `yaml:"dns,omitempty"`
27
- UseHostResolver * bool `yaml:"useHostResolver,omitempty"`
10
+ Arch Arch `yaml:"arch,omitempty" json:"arch,omitempty" `
11
+ Images []File `yaml:"images" json:"images" ` // REQUIRED
12
+ CPUs int `yaml:"cpus,omitempty" json:"cpus,omitempty" `
13
+ Memory string `yaml:"memory,omitempty" json:"memory,omitempty" ` // go-units.RAMInBytes
14
+ Disk string `yaml:"disk,omitempty" json:"disk,omitempty"` // go-units.RAMInBytes
15
+ Mounts []Mount `yaml:"mounts,omitempty" json:"mounts,omitempty" `
16
+ SSH SSH `yaml:"ssh,omitempty" json:"ssh,omitempty" ` // REQUIRED (FIXME)
17
+ Firmware Firmware `yaml:"firmware,omitempty" json:"firmware,omitempty" `
18
+ Video Video `yaml:"video,omitempty" json:"video,omitempty" `
19
+ Provision []Provision `yaml:"provision,omitempty" json:"provision,omitempty" `
20
+ Containerd Containerd `yaml:"containerd,omitempty" json:"containerd,omitempty" `
21
+ Probes []Probe `yaml:"probes,omitempty" json:"probes,omitempty" `
22
+ PortForwards []PortForward `yaml:"portForwards,omitempty" json:"portForwards,omitempty" `
23
+ Networks []Network `yaml:"networks,omitempty" json:"networks,omitempty" `
24
+ Network NetworkDeprecated `yaml:"network,omitempty" json:"network,omitempty" ` // DEPRECATED, use `networks` instead
25
+ Env map [string ]string `yaml:"env,omitempty" json:"env,omitempty" `
26
+ DNS []net.IP `yaml:"dns,omitempty" json:"dns,omitempty" `
27
+ UseHostResolver * bool `yaml:"useHostResolver,omitempty" json:"useHostResolver,omitempty" `
28
28
}
29
29
30
30
type Arch = string
@@ -35,33 +35,33 @@ const (
35
35
)
36
36
37
37
type File struct {
38
- Location string `yaml:"location"` // REQUIRED
39
- Arch Arch `yaml:"arch,omitempty"`
40
- Digest digest.Digest `yaml:"digest,omitempty"`
38
+ Location string `yaml:"location" json:"location" ` // REQUIRED
39
+ Arch Arch `yaml:"arch,omitempty" json:"arch,omitempty" `
40
+ Digest digest.Digest `yaml:"digest,omitempty" json:"digest,omitempty" `
41
41
}
42
42
43
43
type Mount struct {
44
- Location string `yaml:"location"` // REQUIRED
45
- Writable bool `yaml:"writable,omitempty"`
44
+ Location string `yaml:"location" json:"location" ` // REQUIRED
45
+ Writable bool `yaml:"writable,omitempty" json:"writable,omitempty" `
46
46
}
47
47
48
48
type SSH struct {
49
- LocalPort int `yaml:"localPort,omitempty"` // REQUIRED (FIXME: auto assign)
49
+ LocalPort int `yaml:"localPort,omitempty" json:"localPort,omitempty" ` // REQUIRED (FIXME: auto assign)
50
50
51
51
// LoadDotSSHPubKeys loads ~/.ssh/*.pub in addition to $LIMA_HOME/_config/user.pub .
52
52
// Default: true
53
- LoadDotSSHPubKeys * bool `yaml:"loadDotSSHPubKeys,omitempty"`
53
+ LoadDotSSHPubKeys * bool `yaml:"loadDotSSHPubKeys,omitempty" json:"loadDotSSHPubKeys,omitempty" `
54
54
}
55
55
56
56
type Firmware struct {
57
57
// LegacyBIOS disables UEFI if set.
58
58
// LegacyBIOS is ignored for aarch64.
59
- LegacyBIOS bool `yaml:"legacyBIOS,omitempty"`
59
+ LegacyBIOS bool `yaml:"legacyBIOS,omitempty" json:"legacyBIOS,omitempty" `
60
60
}
61
61
62
62
type Video struct {
63
63
// Display is a QEMU display string
64
- Display string `yaml:"display,omitempty"`
64
+ Display string `yaml:"display,omitempty" json:"display,omitempty" `
65
65
}
66
66
67
67
type ProvisionMode = string
@@ -72,13 +72,14 @@ const (
72
72
)
73
73
74
74
type Provision struct {
75
- Mode ProvisionMode `yaml:"mode"` // default: "system"
76
- Script string `yaml:"script"`
75
+ Mode ProvisionMode `yaml:"mode" json:"mode" ` // default: "system"
76
+ Script string `yaml:"script" json:"script" `
77
77
}
78
78
79
79
type Containerd struct {
80
- System * bool `yaml:"system,omitempty"` // default: false
81
- User * bool `yaml:"user,omitempty"` // default: true
80
+ System * bool `yaml:"system,omitempty" json:"system,omitempty"` // default: false
81
+ User * bool `yaml:"user,omitempty" json:"user,omitempty"` // default: true
82
+ Archives []File `yaml:"archives,omitempty" json:"archives,omitempty"` // default: see defaultContainerdArchives
82
83
}
83
84
84
85
type ProbeMode = string
@@ -101,25 +102,25 @@ const (
101
102
)
102
103
103
104
type PortForward struct {
104
- GuestIP net.IP `yaml:"guestIP,omitempty"`
105
- GuestPort int `yaml:"guestPort,omitempty"`
106
- GuestPortRange [2 ]int `yaml:"guestPortRange,omitempty"`
107
- HostIP net.IP `yaml:"hostIP,omitempty"`
108
- HostPort int `yaml:"hostPort,omitempty"`
109
- HostPortRange [2 ]int `yaml:"hostPortRange,omitempty"`
110
- Proto Proto `yaml:"proto,omitempty"`
111
- Ignore bool `yaml:"ignore,omitempty"`
105
+ GuestIP net.IP `yaml:"guestIP,omitempty" json:"guestIP,omitempty" `
106
+ GuestPort int `yaml:"guestPort,omitempty" json:"guestPort,omitempty" `
107
+ GuestPortRange [2 ]int `yaml:"guestPortRange,omitempty" json:"guestPortRange,omitempty" `
108
+ HostIP net.IP `yaml:"hostIP,omitempty" json:"hostIP,omitempty" `
109
+ HostPort int `yaml:"hostPort,omitempty" json:"hostPort,omitempty" `
110
+ HostPortRange [2 ]int `yaml:"hostPortRange,omitempty" json:"hostPortRange,omitempty" `
111
+ Proto Proto `yaml:"proto,omitempty" json:"proto,omitempty" `
112
+ Ignore bool `yaml:"ignore,omitempty" json:"ignore,omitempty" `
112
113
}
113
114
114
115
type Network struct {
115
116
// `Lima` and `VNL` are mutually exclusive; exactly one is required
116
- Lima string `yaml:"lima,omitempty"`
117
+ Lima string `yaml:"lima,omitempty" json:"lima,omitempty" `
117
118
// VNL is a Virtual Network Locator (https://github.com/rd235/vdeplug4/commit/089984200f447abb0e825eb45548b781ba1ebccd).
118
119
// On macOS, only VDE2-compatible form (optionally with vde:// prefix) is supported.
119
- VNL string `yaml:"vnl,omitempty"`
120
- SwitchPort uint16 `yaml:"switchPort,omitempty"` // VDE Switch port, not TCP/UDP port (only used by VDE networking)
121
- MACAddress string `yaml:"macAddress,omitempty"`
122
- Interface string `yaml:"interface,omitempty"`
120
+ VNL string `yaml:"vnl,omitempty" json:"vnl,omitempty" `
121
+ SwitchPort uint16 `yaml:"switchPort,omitempty" json:"switchPort,omitempty" ` // VDE Switch port, not TCP/UDP port (only used by VDE networking)
122
+ MACAddress string `yaml:"macAddress,omitempty" json:"macAddress,omitempty" `
123
+ Interface string `yaml:"interface,omitempty" json:"interface,omitempty" `
123
124
}
124
125
125
126
// DEPRECATED types below
@@ -128,14 +129,14 @@ type Network struct {
128
129
// and to avoid accidental usage in new code.
129
130
130
131
type NetworkDeprecated struct {
131
- VDEDeprecated []VDEDeprecated `yaml:"vde,omitempty"`
132
+ VDEDeprecated []VDEDeprecated `yaml:"vde,omitempty" json:"vde,omitempty" `
132
133
// migrate will be true when `network.VDE` has been copied to `networks` by FillDefaults()
133
134
migrated bool
134
135
}
135
136
136
137
type VDEDeprecated struct {
137
- VNL string `yaml:"vnl,omitempty"`
138
- SwitchPort uint16 `yaml:"switchPort,omitempty"` // VDE Switch port, not TCP/UDP port
139
- MACAddress string `yaml:"macAddress,omitempty"`
140
- Name string `yaml:"name,omitempty"`
138
+ VNL string `yaml:"vnl,omitempty" json:"vnl,omitempty" `
139
+ SwitchPort uint16 `yaml:"switchPort,omitempty" json:"switchPort,omitempty" ` // VDE Switch port, not TCP/UDP port
140
+ MACAddress string `yaml:"macAddress,omitempty" json:"macAddress,omitempty" `
141
+ Name string `yaml:"name,omitempty" json:"name,omitempty" `
141
142
}
0 commit comments