aboutsummaryrefslogtreecommitdiff
path: root/cvss/v3metric_string.go
blob: 6435c57513759a8eca24fcaea84d0b6b45cefad6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
// Code generated by "stringer -linecomment -type=v3Metric"; DO NOT EDIT.

package cvss

import "strconv"

func _() {
	// An "invalid array index" compiler error signifies that the constant values have changed.
	// Re-run the stringer command to generate them again.
	var x [1]struct{}
	_ = x[v3AVNetwork-0]
	_ = x[v3AVAdjacentNetwork-1]
	_ = x[v3AVLocal-2]
	_ = x[v3AVPhysical-3]
	_ = x[v3ACLow-4]
	_ = x[v3ACHigh-5]
	_ = x[v3PRNone-6]
	_ = x[v3PRLow-7]
	_ = x[v3PRHigh-8]
	_ = x[v3UINone-9]
	_ = x[v3UIRequired-10]
	_ = x[v3SUnchanged-11]
	_ = x[v3SChanged-12]
	_ = x[v3CHigh-13]
	_ = x[v3CLow-14]
	_ = x[v3CNone-15]
	_ = x[v3IHigh-16]
	_ = x[v3ILow-17]
	_ = x[v3INone-18]
	_ = x[v3AHigh-19]
	_ = x[v3ALow-20]
	_ = x[v3ANone-21]
	_ = x[v3ENotDefined-22]
	_ = x[v3EHigh-23]
	_ = x[v3EFunctional-24]
	_ = x[v3EProofOfConcept-25]
	_ = x[v3EUnproven-26]
	_ = x[v3RLNotDefined-27]
	_ = x[v3RLUnavailable-28]
	_ = x[v3RLWorkaround-29]
	_ = x[v3RLTemporaryFix-30]
	_ = x[v3RLOfficialFix-31]
	_ = x[v3RCNotDefined-32]
	_ = x[v3RCConfirmed-33]
	_ = x[v3RCReasonable-34]
	_ = x[v3RCUnknown-35]
	_ = x[v3CRNotDefined-36]
	_ = x[v3CRHigh-37]
	_ = x[v3CRMedium-38]
	_ = x[v3CRLow-39]
	_ = x[v3IRNotDefined-40]
	_ = x[v3IRHigh-41]
	_ = x[v3IRMedium-42]
	_ = x[v3IRLow-43]
	_ = x[v3ARNotDefined-44]
	_ = x[v3ARHigh-45]
	_ = x[v3ARMedium-46]
	_ = x[v3ARLow-47]
	_ = x[v3MAVNotDefined-48]
	_ = x[v3MAVNetwork-49]
	_ = x[v3MAVAdjacentNetwork-50]
	_ = x[v3MAVLocal-51]
	_ = x[v3MAVPhysical-52]
	_ = x[v3MACNotDefined-53]
	_ = x[v3MACLow-54]
	_ = x[v3MACHigh-55]
	_ = x[v3MPRNotDefined-56]
	_ = x[v3MPRNone-57]
	_ = x[v3MPRLow-58]
	_ = x[v3MPRHigh-59]
	_ = x[v3MUINotDefined-60]
	_ = x[v3MUINone-61]
	_ = x[v3MUIRequired-62]
	_ = x[v3MSNotDefined-63]
	_ = x[v3MSUnchanged-64]
	_ = x[v3MSChanged-65]
	_ = x[v3MCNotDefined-66]
	_ = x[v3MCHigh-67]
	_ = x[v3MCLow-68]
	_ = x[v3MCNone-69]
	_ = x[v3MINotDefined-70]
	_ = x[v3MIHigh-71]
	_ = x[v3MILow-72]
	_ = x[v3MINone-73]
	_ = x[v3MANotDefined-74]
	_ = x[v3MAHigh-75]
	_ = x[v3MALow-76]
	_ = x[v3MANone-77]
	_ = x[v3InvalidMetric-78]
}

const _v3Metric_name = "AV:NAV:AAV:LAV:PAC:LAC:HPR:NPR:LPR:HUI:NUI:RS:US:CC:HC:LC:NI:HI:LI:NA:HA:LA:NE:XE:HE:FE:PE:URL:XRL:URL:WRL:TRL:ORC:XRC:CRC:RRC:UCR:XCR:HCR:MCR:LIR:XIR:HIR:MIR:LAR:XAR:HAR:MAR:LMAV:XMAV:NMAV:AMAV:LMAV:PMAC:XMAC:LMAC:HMPR:XMPR:NMPR:LMPR:HMUI:XMUI:NMUI:RMS:XMS:UMS:CMC:XMC:HMC:LMC:NMI:XMI:HMI:LMI:NMA:XMA:HMA:LMA:Ninvalid"

var _v3Metric_index = [...]uint16{0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 47, 50, 53, 56, 59, 62, 65, 68, 71, 74, 77, 80, 83, 86, 89, 92, 96, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144, 148, 152, 156, 160, 164, 168, 172, 176, 181, 186, 191, 196, 201, 206, 211, 216, 221, 226, 231, 236, 241, 246, 251, 255, 259, 263, 267, 271, 275, 279, 283, 287, 291, 295, 299, 303, 307, 311, 318}

func (i v3Metric) String() string {
	if i >= v3Metric(len(_v3Metric_index)-1) {
		return "v3Metric(" + strconv.FormatInt(int64(i), 10) + ")"
	}
	return _v3Metric_name[_v3Metric_index[i]:_v3Metric_index[i+1]]
}