diff --git a/pkg/types/console.go b/pkg/types/console.go new file mode 100644 index 000000000..82a472fce --- /dev/null +++ b/pkg/types/console.go @@ -0,0 +1,14 @@ +package types + +const ( + SEND_CUSTOM_SCENARIOS = "custom" + SEND_TAINTED_SCENARIOS = "tainted" + SEND_MANUAL_SCENARIOS = "manual" + SEND_LIVE_DECISIONS = "live_decisions" +) + +var CONSOLE_CONFIGS = []string{SEND_CUSTOM_SCENARIOS, SEND_LIVE_DECISIONS, SEND_MANUAL_SCENARIOS, SEND_TAINTED_SCENARIOS} + +type ConsoleConfig struct { + ActivatedSharing []string +} diff --git a/pkg/types/utils.go b/pkg/types/utils.go index 9c5b1d1e0..e4f985726 100644 --- a/pkg/types/utils.go +++ b/pkg/types/utils.go @@ -199,3 +199,12 @@ func Int32Ptr(i int32) *int32 { func BoolPtr(b bool) *bool { return &b } + +func InSlice(str string, slice []string) bool { + for _, item := range slice { + if str == item { + return true + } + } + return false +}