grain/server/utils/determineEventCategory.go

19 lines
449 B
Go

package utils
func DetermineEventCategory(kind int) string {
switch {
case kind == 0, kind == 3, kind >= 10000 && kind < 20000:
return "replaceable"
case kind == 1, kind >= 4 && kind < 45, kind >= 1000 && kind < 10000:
return "regular"
case kind == 2:
return "deprecated"
case kind >= 20000 && kind < 30000:
return "ephemeral"
case kind >= 30000 && kind < 40000:
return "parameterized_replaceable"
default:
return "unknown"
}
}