Skip to content

Commit 6b7599e

Browse files
authored
Merge pull request #14 from prajyot-workspace/update-ignition
fix lint issues
2 parents faca105 + 113422f commit 6b7599e

File tree

1 file changed

+49
-2
lines changed

1 file changed

+49
-2
lines changed

pkg/ignition/ignition.go

+49-2
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ limitations under the License.
1616

1717
package ignition
1818

19+
// CaReference holds the CaReference specific information.
1920
type CaReference struct {
2021
HTTPHeaders HTTPHeaders `json:"httpHeaders,omitempty"`
2122
Source string `json:"source"`
2223
Verification Verification `json:"verification,omitempty"`
2324
}
2425

26+
// Config holds the Config specific information.
2527
type Config struct {
2628
Ignition Ignition `json:"ignition"`
2729
Networkd Networkd `json:"networkd,omitempty"`
@@ -30,69 +32,84 @@ type Config struct {
3032
Systemd Systemd `json:"systemd,omitempty"`
3133
}
3234

35+
// ConfigReference holds the ConfigReference specific information.
3336
type ConfigReference struct {
3437
HTTPHeaders HTTPHeaders `json:"httpHeaders,omitempty"`
3538
Source string `json:"source"`
3639
Verification Verification `json:"verification,omitempty"`
3740
}
3841

42+
// Create holds the Create specific information.
3943
type Create struct {
4044
Force bool `json:"force,omitempty"`
4145
Options []CreateOption `json:"options,omitempty"`
4246
}
4347

48+
// CreateOption holds the CreateOption specific information.
4449
type CreateOption string
4550

51+
// Device holds the Device specific information.
4652
type Device string
4753

54+
// Directory holds the Directory specific information.
4855
type Directory struct {
4956
Node
5057
DirectoryEmbedded1
5158
}
5259

60+
// DirectoryEmbedded1 holds the DirectoryEmbedded1 specific information.
5361
type DirectoryEmbedded1 struct {
5462
Mode *int `json:"mode,omitempty"`
5563
}
5664

65+
// Disk holds the Disk specific information.
5766
type Disk struct {
5867
Device string `json:"device"`
5968
Partitions []Partition `json:"partitions,omitempty"`
6069
WipeTable bool `json:"wipeTable,omitempty"`
6170
}
6271

72+
// File holds the File specific information.
6373
type File struct {
6474
Node
6575
FileEmbedded1
6676
}
6777

78+
// FileContents holds the FileContents specific information.
6879
type FileContents struct {
6980
Compression string `json:"compression,omitempty"`
7081
HTTPHeaders HTTPHeaders `json:"httpHeaders,omitempty"`
7182
Source string `json:"source,omitempty"`
7283
Verification Verification `json:"verification,omitempty"`
7384
}
7485

86+
// FileEmbedded1 holds the FileEmbedded1 specific information.
7587
type FileEmbedded1 struct {
7688
Append bool `json:"append,omitempty"`
7789
Contents FileContents `json:"contents,omitempty"`
7890
Mode *int `json:"mode,omitempty"`
7991
}
8092

93+
// Filesystem holds the Filesystem specific information.
8194
type Filesystem struct {
8295
Mount *Mount `json:"mount,omitempty"`
8396
Name string `json:"name,omitempty"`
8497
Path *string `json:"path,omitempty"`
8598
}
8699

100+
// Group holds the Group specific information.
87101
type Group string
88102

103+
// HTTPHeader holds the HTTPHeader specific information.
89104
type HTTPHeader struct {
90105
Name string `json:"name"`
91106
Value string `json:"value"`
92107
}
93108

109+
// HTTPHeaders holds the HTTPHeaders specific information.
94110
type HTTPHeaders []HTTPHeader
95111

112+
// Ignition holds the Ignition specific information.
96113
type Ignition struct {
97114
Config IgnitionConfig `json:"config,omitempty"`
98115
Proxy Proxy `json:"proxy,omitempty"`
@@ -101,21 +118,25 @@ type Ignition struct {
101118
Version string `json:"version,omitempty"`
102119
}
103120

104-
type IgnitionConfig struct {
121+
// IgnitionConfig holds the IgnitionConfig specific information.
122+
type IgnitionConfig struct { //nolint:revive
105123
Append []ConfigReference `json:"append,omitempty"`
106124
Replace *ConfigReference `json:"replace,omitempty"`
107125
}
108126

127+
// Link holds the Link specific information.
109128
type Link struct {
110129
Node
111130
LinkEmbedded1
112131
}
113132

133+
// LinkEmbedded1 holds the LinkEmbedded1 specific information.
114134
type LinkEmbedded1 struct {
115135
Hard bool `json:"hard,omitempty"`
116136
Target string `json:"target"`
117137
}
118138

139+
// Mount holds the Mount specific information.
119140
type Mount struct {
120141
Create *Create `json:"create,omitempty"`
121142
Device string `json:"device"`
@@ -126,25 +147,31 @@ type Mount struct {
126147
WipeFilesystem bool `json:"wipeFilesystem,omitempty"`
127148
}
128149

150+
// MountOption holds the MountOption specific information.
129151
type MountOption string
130152

153+
// Networkd holds the Networkd specific information.
131154
type Networkd struct {
132155
Units []Networkdunit `json:"units,omitempty"`
133156
}
134157

158+
// NetworkdDropin holds the NetworkdDropin specific information.
135159
type NetworkdDropin struct {
136160
Contents string `json:"contents,omitempty"`
137161
Name string `json:"name"`
138162
}
139163

164+
// Networkdunit holds the Networkdunit specific information.
140165
type Networkdunit struct {
141166
Contents string `json:"contents,omitempty"`
142167
Dropins []NetworkdDropin `json:"dropins,omitempty"`
143168
Name string `json:"name"`
144169
}
145170

171+
// NoProxyItem holds the NoProxyItem specific information.
146172
type NoProxyItem string
147173

174+
// Node holds the Node specific information.
148175
type Node struct {
149176
Filesystem string `json:"filesystem"`
150177
Group *NodeGroup `json:"group,omitempty"`
@@ -153,16 +180,19 @@ type Node struct {
153180
User *NodeUser `json:"user,omitempty"`
154181
}
155182

183+
// NodeGroup holds the NodeGroup specific information.
156184
type NodeGroup struct {
157185
ID *int `json:"id,omitempty"`
158186
Name string `json:"name,omitempty"`
159187
}
160188

189+
// NodeUser holds the NodeUser specific information.
161190
type NodeUser struct {
162191
ID *int `json:"id,omitempty"`
163192
Name string `json:"name,omitempty"`
164193
}
165194

195+
// Partition holds the Partition specific information.
166196
type Partition struct {
167197
GUID string `json:"guid,omitempty"`
168198
Label *string `json:"label,omitempty"`
@@ -176,18 +206,21 @@ type Partition struct {
176206
WipePartitionEntry bool `json:"wipePartitionEntry,omitempty"`
177207
}
178208

209+
// Passwd holds the Passwd specific information.
179210
type Passwd struct {
180211
Groups []PasswdGroup `json:"groups,omitempty"`
181212
Users []PasswdUser `json:"users,omitempty"`
182213
}
183214

215+
// PasswdGroup holds the PasswdGroup specific information.
184216
type PasswdGroup struct {
185-
Gid *int `json:"gid,omitempty"`
217+
Gid *int `json:"gid,omitempty"` //nolint:stylecheck
186218
Name string `json:"name"`
187219
PasswordHash string `json:"passwordHash,omitempty"`
188220
System bool `json:"system,omitempty"`
189221
}
190222

223+
// PasswdUser holds the PasswdUser specific information.
191224
type PasswdUser struct {
192225
Create *Usercreate `json:"create,omitempty"`
193226
Gecos string `json:"gecos,omitempty"`
@@ -205,12 +238,14 @@ type PasswdUser struct {
205238
UID *int `json:"uid,omitempty"`
206239
}
207240

241+
// Proxy holds the Proxy specific information.
208242
type Proxy struct {
209243
HTTPProxy string `json:"httpProxy,omitempty"`
210244
HTTPSProxy string `json:"httpsProxy,omitempty"`
211245
NoProxy []NoProxyItem `json:"noProxy,omitempty"`
212246
}
213247

248+
// Raid holds the Raid specific information.
214249
type Raid struct {
215250
Devices []Device `json:"devices"`
216251
Level string `json:"level"`
@@ -219,14 +254,18 @@ type Raid struct {
219254
Spares int `json:"spares,omitempty"`
220255
}
221256

257+
// RaidOption holds the RaidOption specific information.
222258
type RaidOption string
223259

260+
// SSHAuthorizedKey holds the SSHAuthorizedKey specific information.
224261
type SSHAuthorizedKey string
225262

263+
// Security holds the Security specific information.
226264
type Security struct {
227265
TLS TLS `json:"tls,omitempty"`
228266
}
229267

268+
// Storage holds the Storage specific information.
230269
type Storage struct {
231270
Directories []Directory `json:"directories,omitempty"`
232271
Disks []Disk `json:"disks,omitempty"`
@@ -236,24 +275,29 @@ type Storage struct {
236275
Raid []Raid `json:"raid,omitempty"`
237276
}
238277

278+
// Systemd holds the Systemd specific information.
239279
type Systemd struct {
240280
Units []Unit `json:"units,omitempty"`
241281
}
242282

283+
// SystemdDropin holds the SystemdDropin specific information.
243284
type SystemdDropin struct {
244285
Contents string `json:"contents,omitempty"`
245286
Name string `json:"name"`
246287
}
247288

289+
// TLS holds the TLS specific information.
248290
type TLS struct {
249291
CertificateAuthorities []CaReference `json:"certificateAuthorities,omitempty"`
250292
}
251293

294+
// Timeouts holds the Timeouts specific information.
252295
type Timeouts struct {
253296
HTTPResponseHeaders *int `json:"httpResponseHeaders,omitempty"`
254297
HTTPTotal *int `json:"httpTotal,omitempty"`
255298
}
256299

300+
// Unit holds the Unit specific information.
257301
type Unit struct {
258302
Contents string `json:"contents,omitempty"`
259303
Dropins []SystemdDropin `json:"dropins,omitempty"`
@@ -263,6 +307,7 @@ type Unit struct {
263307
Name string `json:"name"`
264308
}
265309

310+
// Usercreate holds the Usercreate specific information.
266311
type Usercreate struct {
267312
Gecos string `json:"gecos,omitempty"`
268313
Groups []UsercreateGroup `json:"groups,omitempty"`
@@ -276,8 +321,10 @@ type Usercreate struct {
276321
UID *int `json:"uid,omitempty"`
277322
}
278323

324+
// UsercreateGroup holds the UsercreateGroup specific information.
279325
type UsercreateGroup string
280326

327+
// Verification holds the Verification specific information.
281328
type Verification struct {
282329
Hash *string `json:"hash,omitempty"`
283330
}

0 commit comments

Comments
 (0)