add console type
This commit is contained in:
parent
0d46890d6b
commit
52edfba2b3
2 changed files with 23 additions and 0 deletions
14
pkg/types/console.go
Normal file
14
pkg/types/console.go
Normal file
|
@ -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
|
||||
}
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue