-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
33,054 additions
and
33,011 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,8 @@ func main() { | |
Message: "This is a sample message", | ||
} | ||
|
||
|
||
|
||
} | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
package main | ||
|
||
import enumValueMap "github.com/valllabh/ocsf-schema-golang/ocsf/v1_0_0/enum-value-map" | ||
|
||
// Nothing to see here, move along | ||
|
||
func main() { | ||
|
||
} | ||
|
||
func testEnumValue() { | ||
ev, _ := enumValueMap.GetEnumValue("ACCOUNT_CHANGE_CATEGORY_UID_IDENTITY_ACCESS_MANAGEMENT") | ||
println(ev.Name, ev.Value) | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package enumValueMap | ||
|
||
import ( | ||
"embed" | ||
"encoding/json" | ||
) | ||
|
||
//go:embed enum-value-map.json | ||
var embedFs embed.FS | ||
|
||
// struct to hold the enum value | ||
type EnumValue struct { | ||
Name string `json:"name"` | ||
Value int64 `json:"value"` | ||
} | ||
|
||
type EnumValueMap = map[string]EnumValue | ||
|
||
var enumValueMap EnumValueMap | ||
|
||
func init() { | ||
data, _ := embedFs.ReadFile("enum-value-map.json") | ||
json.Unmarshal(data, &enumValueMap) | ||
} | ||
|
||
func GetEnumValue(name string) (EnumValue, bool) { | ||
enumValue, enumValueExits := enumValueMap[name] | ||
return enumValue, enumValueExits | ||
} |
2,644 changes: 1,322 additions & 1,322 deletions
2,644
ocsf/v1_0_0/events/application/application.pb.go
Large diffs are not rendered by default.
Oops, something went wrong.
2,354 changes: 1,177 additions & 1,177 deletions
2,354
ocsf/v1_0_0/events/application/enums/enums.pb.go
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.