1
// Code generated by "enumer -type OutputKind,OutFormat,DiskFormat,SDBootEnrollKeys -linecomment -text"; DO NOT EDIT.
10
const _OutputKindName = "unknownisoimageinstallerkernelinitramfsukicmdline"
12
var _OutputKindIndex = [...]uint8{0, 7, 10, 15, 24, 30, 39, 42, 49}
14
const _OutputKindLowerName = "unknownisoimageinstallerkernelinitramfsukicmdline"
16
func (i OutputKind) String() string {
17
if i < 0 || i >= OutputKind(len(_OutputKindIndex)-1) {
18
return fmt.Sprintf("OutputKind(%d)", i)
20
return _OutputKindName[_OutputKindIndex[i]:_OutputKindIndex[i+1]]
23
// An "invalid array index" compiler error signifies that the constant values have changed.
24
// Re-run the stringer command to generate them again.
25
func _OutputKindNoOp() {
27
_ = x[OutKindUnknown-(0)]
29
_ = x[OutKindImage-(2)]
30
_ = x[OutKindInstaller-(3)]
31
_ = x[OutKindKernel-(4)]
32
_ = x[OutKindInitramfs-(5)]
34
_ = x[OutKindCmdline-(7)]
37
var _OutputKindValues = []OutputKind{OutKindUnknown, OutKindISO, OutKindImage, OutKindInstaller, OutKindKernel, OutKindInitramfs, OutKindUKI, OutKindCmdline}
39
var _OutputKindNameToValueMap = map[string]OutputKind{
40
_OutputKindName[0:7]: OutKindUnknown,
41
_OutputKindLowerName[0:7]: OutKindUnknown,
42
_OutputKindName[7:10]: OutKindISO,
43
_OutputKindLowerName[7:10]: OutKindISO,
44
_OutputKindName[10:15]: OutKindImage,
45
_OutputKindLowerName[10:15]: OutKindImage,
46
_OutputKindName[15:24]: OutKindInstaller,
47
_OutputKindLowerName[15:24]: OutKindInstaller,
48
_OutputKindName[24:30]: OutKindKernel,
49
_OutputKindLowerName[24:30]: OutKindKernel,
50
_OutputKindName[30:39]: OutKindInitramfs,
51
_OutputKindLowerName[30:39]: OutKindInitramfs,
52
_OutputKindName[39:42]: OutKindUKI,
53
_OutputKindLowerName[39:42]: OutKindUKI,
54
_OutputKindName[42:49]: OutKindCmdline,
55
_OutputKindLowerName[42:49]: OutKindCmdline,
58
var _OutputKindNames = []string{
60
_OutputKindName[7:10],
61
_OutputKindName[10:15],
62
_OutputKindName[15:24],
63
_OutputKindName[24:30],
64
_OutputKindName[30:39],
65
_OutputKindName[39:42],
66
_OutputKindName[42:49],
69
// OutputKindString retrieves an enum value from the enum constants string name.
70
// Throws an error if the param is not part of the enum.
71
func OutputKindString(s string) (OutputKind, error) {
72
if val, ok := _OutputKindNameToValueMap[s]; ok {
76
if val, ok := _OutputKindNameToValueMap[strings.ToLower(s)]; ok {
79
return 0, fmt.Errorf("%s does not belong to OutputKind values", s)
82
// OutputKindValues returns all values of the enum
83
func OutputKindValues() []OutputKind {
84
return _OutputKindValues
87
// OutputKindStrings returns a slice of all String values of the enum
88
func OutputKindStrings() []string {
89
strs := make([]string, len(_OutputKindNames))
90
copy(strs, _OutputKindNames)
94
// IsAOutputKind returns "true" if the value is listed in the enum definition. "false" otherwise
95
func (i OutputKind) IsAOutputKind() bool {
96
for _, v := range _OutputKindValues {
104
// MarshalText implements the encoding.TextMarshaler interface for OutputKind
105
func (i OutputKind) MarshalText() ([]byte, error) {
106
return []byte(i.String()), nil
109
// UnmarshalText implements the encoding.TextUnmarshaler interface for OutputKind
110
func (i *OutputKind) UnmarshalText(text []byte) error {
112
*i, err = OutputKindString(string(text))
116
const _OutFormatName = "unknownraw.tar.gz.xz.gz.zst"
118
var _OutFormatIndex = [...]uint8{0, 7, 10, 17, 20, 23, 27}
120
const _OutFormatLowerName = "unknownraw.tar.gz.xz.gz.zst"
122
func (i OutFormat) String() string {
123
if i < 0 || i >= OutFormat(len(_OutFormatIndex)-1) {
124
return fmt.Sprintf("OutFormat(%d)", i)
126
return _OutFormatName[_OutFormatIndex[i]:_OutFormatIndex[i+1]]
129
// An "invalid array index" compiler error signifies that the constant values have changed.
130
// Re-run the stringer command to generate them again.
131
func _OutFormatNoOp() {
133
_ = x[OutFormatUnknown-(0)]
134
_ = x[OutFormatRaw-(1)]
135
_ = x[OutFormatTar-(2)]
136
_ = x[OutFormatXZ-(3)]
137
_ = x[OutFormatGZ-(4)]
138
_ = x[OutFormatZSTD-(5)]
141
var _OutFormatValues = []OutFormat{OutFormatUnknown, OutFormatRaw, OutFormatTar, OutFormatXZ, OutFormatGZ, OutFormatZSTD}
143
var _OutFormatNameToValueMap = map[string]OutFormat{
144
_OutFormatName[0:7]: OutFormatUnknown,
145
_OutFormatLowerName[0:7]: OutFormatUnknown,
146
_OutFormatName[7:10]: OutFormatRaw,
147
_OutFormatLowerName[7:10]: OutFormatRaw,
148
_OutFormatName[10:17]: OutFormatTar,
149
_OutFormatLowerName[10:17]: OutFormatTar,
150
_OutFormatName[17:20]: OutFormatXZ,
151
_OutFormatLowerName[17:20]: OutFormatXZ,
152
_OutFormatName[20:23]: OutFormatGZ,
153
_OutFormatLowerName[20:23]: OutFormatGZ,
154
_OutFormatName[23:27]: OutFormatZSTD,
155
_OutFormatLowerName[23:27]: OutFormatZSTD,
158
var _OutFormatNames = []string{
160
_OutFormatName[7:10],
161
_OutFormatName[10:17],
162
_OutFormatName[17:20],
163
_OutFormatName[20:23],
164
_OutFormatName[23:27],
167
// OutFormatString retrieves an enum value from the enum constants string name.
168
// Throws an error if the param is not part of the enum.
169
func OutFormatString(s string) (OutFormat, error) {
170
if val, ok := _OutFormatNameToValueMap[s]; ok {
174
if val, ok := _OutFormatNameToValueMap[strings.ToLower(s)]; ok {
177
return 0, fmt.Errorf("%s does not belong to OutFormat values", s)
180
// OutFormatValues returns all values of the enum
181
func OutFormatValues() []OutFormat {
182
return _OutFormatValues
185
// OutFormatStrings returns a slice of all String values of the enum
186
func OutFormatStrings() []string {
187
strs := make([]string, len(_OutFormatNames))
188
copy(strs, _OutFormatNames)
192
// IsAOutFormat returns "true" if the value is listed in the enum definition. "false" otherwise
193
func (i OutFormat) IsAOutFormat() bool {
194
for _, v := range _OutFormatValues {
202
// MarshalText implements the encoding.TextMarshaler interface for OutFormat
203
func (i OutFormat) MarshalText() ([]byte, error) {
204
return []byte(i.String()), nil
207
// UnmarshalText implements the encoding.TextUnmarshaler interface for OutFormat
208
func (i *OutFormat) UnmarshalText(text []byte) error {
210
*i, err = OutFormatString(string(text))
214
const _DiskFormatName = "unknownrawqcow2vhdova"
216
var _DiskFormatIndex = [...]uint8{0, 7, 10, 15, 18, 21}
218
const _DiskFormatLowerName = "unknownrawqcow2vhdova"
220
func (i DiskFormat) String() string {
221
if i < 0 || i >= DiskFormat(len(_DiskFormatIndex)-1) {
222
return fmt.Sprintf("DiskFormat(%d)", i)
224
return _DiskFormatName[_DiskFormatIndex[i]:_DiskFormatIndex[i+1]]
227
// An "invalid array index" compiler error signifies that the constant values have changed.
228
// Re-run the stringer command to generate them again.
229
func _DiskFormatNoOp() {
231
_ = x[DiskFormatUnknown-(0)]
232
_ = x[DiskFormatRaw-(1)]
233
_ = x[DiskFormatQCOW2-(2)]
234
_ = x[DiskFormatVPC-(3)]
235
_ = x[DiskFormatOVA-(4)]
238
var _DiskFormatValues = []DiskFormat{DiskFormatUnknown, DiskFormatRaw, DiskFormatQCOW2, DiskFormatVPC, DiskFormatOVA}
240
var _DiskFormatNameToValueMap = map[string]DiskFormat{
241
_DiskFormatName[0:7]: DiskFormatUnknown,
242
_DiskFormatLowerName[0:7]: DiskFormatUnknown,
243
_DiskFormatName[7:10]: DiskFormatRaw,
244
_DiskFormatLowerName[7:10]: DiskFormatRaw,
245
_DiskFormatName[10:15]: DiskFormatQCOW2,
246
_DiskFormatLowerName[10:15]: DiskFormatQCOW2,
247
_DiskFormatName[15:18]: DiskFormatVPC,
248
_DiskFormatLowerName[15:18]: DiskFormatVPC,
249
_DiskFormatName[18:21]: DiskFormatOVA,
250
_DiskFormatLowerName[18:21]: DiskFormatOVA,
253
var _DiskFormatNames = []string{
254
_DiskFormatName[0:7],
255
_DiskFormatName[7:10],
256
_DiskFormatName[10:15],
257
_DiskFormatName[15:18],
258
_DiskFormatName[18:21],
261
// DiskFormatString retrieves an enum value from the enum constants string name.
262
// Throws an error if the param is not part of the enum.
263
func DiskFormatString(s string) (DiskFormat, error) {
264
if val, ok := _DiskFormatNameToValueMap[s]; ok {
268
if val, ok := _DiskFormatNameToValueMap[strings.ToLower(s)]; ok {
271
return 0, fmt.Errorf("%s does not belong to DiskFormat values", s)
274
// DiskFormatValues returns all values of the enum
275
func DiskFormatValues() []DiskFormat {
276
return _DiskFormatValues
279
// DiskFormatStrings returns a slice of all String values of the enum
280
func DiskFormatStrings() []string {
281
strs := make([]string, len(_DiskFormatNames))
282
copy(strs, _DiskFormatNames)
286
// IsADiskFormat returns "true" if the value is listed in the enum definition. "false" otherwise
287
func (i DiskFormat) IsADiskFormat() bool {
288
for _, v := range _DiskFormatValues {
296
// MarshalText implements the encoding.TextMarshaler interface for DiskFormat
297
func (i DiskFormat) MarshalText() ([]byte, error) {
298
return []byte(i.String()), nil
301
// UnmarshalText implements the encoding.TextUnmarshaler interface for DiskFormat
302
func (i *DiskFormat) UnmarshalText(text []byte) error {
304
*i, err = DiskFormatString(string(text))
308
const _SDBootEnrollKeysName = "if-safemanualforceoff"
310
var _SDBootEnrollKeysIndex = [...]uint8{0, 7, 13, 18, 21}
312
const _SDBootEnrollKeysLowerName = "if-safemanualforceoff"
314
func (i SDBootEnrollKeys) String() string {
315
if i < 0 || i >= SDBootEnrollKeys(len(_SDBootEnrollKeysIndex)-1) {
316
return fmt.Sprintf("SDBootEnrollKeys(%d)", i)
318
return _SDBootEnrollKeysName[_SDBootEnrollKeysIndex[i]:_SDBootEnrollKeysIndex[i+1]]
321
// An "invalid array index" compiler error signifies that the constant values have changed.
322
// Re-run the stringer command to generate them again.
323
func _SDBootEnrollKeysNoOp() {
325
_ = x[SDBootEnrollKeysIfSafe-(0)]
326
_ = x[SDBootEnrollKeysManual-(1)]
327
_ = x[SDBootEnrollKeysForce-(2)]
328
_ = x[SDBootEnrollKeysOff-(3)]
331
var _SDBootEnrollKeysValues = []SDBootEnrollKeys{SDBootEnrollKeysIfSafe, SDBootEnrollKeysManual, SDBootEnrollKeysForce, SDBootEnrollKeysOff}
333
var _SDBootEnrollKeysNameToValueMap = map[string]SDBootEnrollKeys{
334
_SDBootEnrollKeysName[0:7]: SDBootEnrollKeysIfSafe,
335
_SDBootEnrollKeysLowerName[0:7]: SDBootEnrollKeysIfSafe,
336
_SDBootEnrollKeysName[7:13]: SDBootEnrollKeysManual,
337
_SDBootEnrollKeysLowerName[7:13]: SDBootEnrollKeysManual,
338
_SDBootEnrollKeysName[13:18]: SDBootEnrollKeysForce,
339
_SDBootEnrollKeysLowerName[13:18]: SDBootEnrollKeysForce,
340
_SDBootEnrollKeysName[18:21]: SDBootEnrollKeysOff,
341
_SDBootEnrollKeysLowerName[18:21]: SDBootEnrollKeysOff,
344
var _SDBootEnrollKeysNames = []string{
345
_SDBootEnrollKeysName[0:7],
346
_SDBootEnrollKeysName[7:13],
347
_SDBootEnrollKeysName[13:18],
348
_SDBootEnrollKeysName[18:21],
351
// SDBootEnrollKeysString retrieves an enum value from the enum constants string name.
352
// Throws an error if the param is not part of the enum.
353
func SDBootEnrollKeysString(s string) (SDBootEnrollKeys, error) {
354
if val, ok := _SDBootEnrollKeysNameToValueMap[s]; ok {
358
if val, ok := _SDBootEnrollKeysNameToValueMap[strings.ToLower(s)]; ok {
361
return 0, fmt.Errorf("%s does not belong to SDBootEnrollKeys values", s)
364
// SDBootEnrollKeysValues returns all values of the enum
365
func SDBootEnrollKeysValues() []SDBootEnrollKeys {
366
return _SDBootEnrollKeysValues
369
// SDBootEnrollKeysStrings returns a slice of all String values of the enum
370
func SDBootEnrollKeysStrings() []string {
371
strs := make([]string, len(_SDBootEnrollKeysNames))
372
copy(strs, _SDBootEnrollKeysNames)
376
// IsASDBootEnrollKeys returns "true" if the value is listed in the enum definition. "false" otherwise
377
func (i SDBootEnrollKeys) IsASDBootEnrollKeys() bool {
378
for _, v := range _SDBootEnrollKeysValues {
386
// MarshalText implements the encoding.TextMarshaler interface for SDBootEnrollKeys
387
func (i SDBootEnrollKeys) MarshalText() ([]byte, error) {
388
return []byte(i.String()), nil
391
// UnmarshalText implements the encoding.TextUnmarshaler interface for SDBootEnrollKeys
392
func (i *SDBootEnrollKeys) UnmarshalText(text []byte) error {
394
*i, err = SDBootEnrollKeysString(string(text))