2024-02-28 08:55:54 +00:00
|
|
|
// Code generated by "enumer -type Key -transform snake -trimprefix Key"; DO NOT EDIT.
|
|
|
|
|
|
|
|
package feature
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"strings"
|
|
|
|
)
|
|
|
|
|
2024-09-04 10:14:50 +00:00
|
|
|
const _KeyName = "unspecifiedlogin_default_orgtrigger_introspection_projectionslegacy_introspectionuser_schematoken_exchangeactionsimproved_performanceweb_keydebug_oidc_parent_errorterminate_single_v1_session"
|
2024-02-28 08:55:54 +00:00
|
|
|
|
2024-09-04 10:14:50 +00:00
|
|
|
var _KeyIndex = [...]uint8{0, 11, 28, 61, 81, 92, 106, 113, 133, 140, 163, 190}
|
2024-02-28 08:55:54 +00:00
|
|
|
|
2024-09-04 10:14:50 +00:00
|
|
|
const _KeyLowerName = "unspecifiedlogin_default_orgtrigger_introspection_projectionslegacy_introspectionuser_schematoken_exchangeactionsimproved_performanceweb_keydebug_oidc_parent_errorterminate_single_v1_session"
|
2024-02-28 08:55:54 +00:00
|
|
|
|
|
|
|
func (i Key) String() string {
|
|
|
|
if i < 0 || i >= Key(len(_KeyIndex)-1) {
|
|
|
|
return fmt.Sprintf("Key(%d)", i)
|
|
|
|
}
|
|
|
|
return _KeyName[_KeyIndex[i]:_KeyIndex[i+1]]
|
|
|
|
}
|
|
|
|
|
|
|
|
// An "invalid array index" compiler error signifies that the constant values have changed.
|
|
|
|
// Re-run the stringer command to generate them again.
|
|
|
|
func _KeyNoOp() {
|
|
|
|
var x [1]struct{}
|
|
|
|
_ = x[KeyUnspecified-(0)]
|
|
|
|
_ = x[KeyLoginDefaultOrg-(1)]
|
|
|
|
_ = x[KeyTriggerIntrospectionProjections-(2)]
|
|
|
|
_ = x[KeyLegacyIntrospection-(3)]
|
2024-03-12 13:50:13 +00:00
|
|
|
_ = x[KeyUserSchema-(4)]
|
2024-03-20 10:18:46 +00:00
|
|
|
_ = x[KeyTokenExchange-(5)]
|
2024-04-09 17:21:21 +00:00
|
|
|
_ = x[KeyActions-(6)]
|
2024-05-24 11:32:57 +00:00
|
|
|
_ = x[KeyImprovedPerformance-(7)]
|
2024-08-14 14:18:14 +00:00
|
|
|
_ = x[KeyWebKey-(8)]
|
2024-08-20 06:45:24 +00:00
|
|
|
_ = x[KeyDebugOIDCParentError-(9)]
|
2024-09-04 10:14:50 +00:00
|
|
|
_ = x[KeyOIDCSingleV1SessionTermination-(10)]
|
2024-02-28 08:55:54 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 10:14:50 +00:00
|
|
|
var _KeyValues = []Key{KeyUnspecified, KeyLoginDefaultOrg, KeyTriggerIntrospectionProjections, KeyLegacyIntrospection, KeyUserSchema, KeyTokenExchange, KeyActions, KeyImprovedPerformance, KeyWebKey, KeyDebugOIDCParentError, KeyOIDCSingleV1SessionTermination}
|
2024-02-28 08:55:54 +00:00
|
|
|
|
|
|
|
var _KeyNameToValueMap = map[string]Key{
|
2024-04-09 17:21:21 +00:00
|
|
|
_KeyName[0:11]: KeyUnspecified,
|
|
|
|
_KeyLowerName[0:11]: KeyUnspecified,
|
|
|
|
_KeyName[11:28]: KeyLoginDefaultOrg,
|
|
|
|
_KeyLowerName[11:28]: KeyLoginDefaultOrg,
|
|
|
|
_KeyName[28:61]: KeyTriggerIntrospectionProjections,
|
|
|
|
_KeyLowerName[28:61]: KeyTriggerIntrospectionProjections,
|
|
|
|
_KeyName[61:81]: KeyLegacyIntrospection,
|
|
|
|
_KeyLowerName[61:81]: KeyLegacyIntrospection,
|
|
|
|
_KeyName[81:92]: KeyUserSchema,
|
|
|
|
_KeyLowerName[81:92]: KeyUserSchema,
|
|
|
|
_KeyName[92:106]: KeyTokenExchange,
|
|
|
|
_KeyLowerName[92:106]: KeyTokenExchange,
|
|
|
|
_KeyName[106:113]: KeyActions,
|
|
|
|
_KeyLowerName[106:113]: KeyActions,
|
2024-05-24 11:32:57 +00:00
|
|
|
_KeyName[113:133]: KeyImprovedPerformance,
|
|
|
|
_KeyLowerName[113:133]: KeyImprovedPerformance,
|
2024-08-14 14:18:14 +00:00
|
|
|
_KeyName[133:140]: KeyWebKey,
|
|
|
|
_KeyLowerName[133:140]: KeyWebKey,
|
2024-08-20 06:45:24 +00:00
|
|
|
_KeyName[140:163]: KeyDebugOIDCParentError,
|
|
|
|
_KeyLowerName[140:163]: KeyDebugOIDCParentError,
|
2024-09-04 10:14:50 +00:00
|
|
|
_KeyName[163:190]: KeyOIDCSingleV1SessionTermination,
|
|
|
|
_KeyLowerName[163:190]: KeyOIDCSingleV1SessionTermination,
|
2024-02-28 08:55:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
var _KeyNames = []string{
|
|
|
|
_KeyName[0:11],
|
|
|
|
_KeyName[11:28],
|
|
|
|
_KeyName[28:61],
|
|
|
|
_KeyName[61:81],
|
2024-03-12 13:50:13 +00:00
|
|
|
_KeyName[81:92],
|
2024-03-20 10:18:46 +00:00
|
|
|
_KeyName[92:106],
|
2024-04-09 17:21:21 +00:00
|
|
|
_KeyName[106:113],
|
2024-05-24 11:32:57 +00:00
|
|
|
_KeyName[113:133],
|
2024-08-14 14:18:14 +00:00
|
|
|
_KeyName[133:140],
|
2024-08-20 06:45:24 +00:00
|
|
|
_KeyName[140:163],
|
2024-09-04 10:14:50 +00:00
|
|
|
_KeyName[163:190],
|
2024-02-28 08:55:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// KeyString retrieves an enum value from the enum constants string name.
|
|
|
|
// Throws an error if the param is not part of the enum.
|
|
|
|
func KeyString(s string) (Key, error) {
|
|
|
|
if val, ok := _KeyNameToValueMap[s]; ok {
|
|
|
|
return val, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
if val, ok := _KeyNameToValueMap[strings.ToLower(s)]; ok {
|
|
|
|
return val, nil
|
|
|
|
}
|
|
|
|
return 0, fmt.Errorf("%s does not belong to Key values", s)
|
|
|
|
}
|
|
|
|
|
|
|
|
// KeyValues returns all values of the enum
|
|
|
|
func KeyValues() []Key {
|
|
|
|
return _KeyValues
|
|
|
|
}
|
|
|
|
|
|
|
|
// KeyStrings returns a slice of all String values of the enum
|
|
|
|
func KeyStrings() []string {
|
|
|
|
strs := make([]string, len(_KeyNames))
|
|
|
|
copy(strs, _KeyNames)
|
|
|
|
return strs
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsAKey returns "true" if the value is listed in the enum definition. "false" otherwise
|
|
|
|
func (i Key) IsAKey() bool {
|
|
|
|
for _, v := range _KeyValues {
|
|
|
|
if i == v {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|