-
Notifications
You must be signed in to change notification settings - Fork 0
/
cef.go
47 lines (38 loc) · 868 Bytes
/
cef.go
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
package cef
type CEF struct {
headerFields
extensionFields
err error
}
const (
AgentSeverityLow0 AgentSeverity = iota
AgentSeverityLow1
AgentSeverityLow2
AgentSeverityLow3
AgentSeverityMedium4
AgentSeverityMedium5
AgentSeverityMedium6
AgentSeverityHigh7
AgentSeverityHigh8
AgentSeverityVeryHigh9
AgentSeverityVeryHigh10
)
// AgentSeverity is a string or integer and it reflects the importance of the event.
//
// The valid string values are: Unknown, Low, Medium, High, and Very-High.
// The valid integer values are: 0-3=Low, 4-6=Medium, 7- 8=High, and 9- 10=Very-High
type AgentSeverity int
func (s AgentSeverity) String() string {
switch {
case s >= 0 && s <= 3:
return "Low"
case s >= 4 && s <= 6:
return "Medium"
case s >= 7 && s <= 8:
return "High"
case s >= 9 && s <= 10:
return "Very-High"
default:
return "Unknown"
}
}