Documentation
¶
Index ¶
- func AddCommandIfFeatureFlag(rootCmd *cobra.Command, cmd *cobra.Command, featureFlag FeatureFlag)
- func ConfirmCommand(message string, bypass bool) error
- func ExtractJwtClaims(tokenStr string) (jwt.MapClaims, error)
- func Filter[T any](ss []T, test func(T) bool) (ret []T)
- func FindNetworkAllowList(nals []ybmclient.NetworkAllowListData, name string) (ybmclient.NetworkAllowListData, error)
- func GetClusterTier(tierCli string) (string, error)
- func GetCustomRoleFeatureFlagDisabledError() string
- func GetSensitivePermissionsConfirmationMessage() string
- func IsFeatureFlagEnabled(featureFlag FeatureFlag) bool
- func IsJwtTokenExpired(tokenStr string) (bool, error)
- func IsJwtTokenExpiredWithTime(tokenStr string, now time.Time) (bool, error)
- func SplitAndIgnoreEmpty(str string, sep string) []string
- func ValidateCIDR(cidr string) (bool, error)
- func ValidateNumFaultsToTolerate(numFaultsToTolerate int32, faultTolerance ybmclient.ClusterFaultTolerance) (bool, error)
- type FeatureFlag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCommandIfFeatureFlag ¶
func AddCommandIfFeatureFlag(rootCmd *cobra.Command, cmd *cobra.Command, featureFlag FeatureFlag)
func ConfirmCommand ¶ added in v0.1.5
this function will add an interactive comfirmation with the message provided
func ExtractJwtClaims ¶ added in v0.0.14
func Filter ¶ added in v0.0.14
Inspired from here: https://stackoverflow.com/questions/37562873/most-idiomatic-way-to-select-elements-from-an-array-in-golang This allows us to filter a slice of any type using a function that returns a bool
func FindNetworkAllowList ¶
func FindNetworkAllowList(nals []ybmclient.NetworkAllowListData, name string) (ybmclient.NetworkAllowListData, error)
func GetClusterTier ¶
func GetCustomRoleFeatureFlagDisabledError ¶ added in v0.1.7
func GetCustomRoleFeatureFlagDisabledError() string
func GetSensitivePermissionsConfirmationMessage ¶ added in v0.1.12
func GetSensitivePermissionsConfirmationMessage() string
func IsFeatureFlagEnabled ¶ added in v0.0.14
func IsFeatureFlagEnabled(featureFlag FeatureFlag) bool
func IsJwtTokenExpired ¶ added in v0.0.14
func IsJwtTokenExpiredWithTime ¶ added in v0.0.14
func SplitAndIgnoreEmpty ¶ added in v0.0.17
func ValidateCIDR ¶ added in v0.0.13
func ValidateNumFaultsToTolerate ¶ added in v0.1.16
func ValidateNumFaultsToTolerate(numFaultsToTolerate int32, faultTolerance ybmclient.ClusterFaultTolerance) (bool, error)
Types ¶
type FeatureFlag ¶
type FeatureFlag string
const ( CDC FeatureFlag = "CDC" CONFIGURE_URL FeatureFlag = "CONFIGURE_URL" NODE_OP FeatureFlag = "NODE_OPS" TOOLS FeatureFlag = "TOOLS" AZURE_CIDR_ALLOWED FeatureFlag = "AZURE_CIDR_ALLOWED" ENTERPRISE_SECURITY FeatureFlag = "ENTERPRISE_SECURITY" CLUSTER_RF FeatureFlag = "CLUSTER_RF" )
func (FeatureFlag) String ¶
func (f FeatureFlag) String() string
Click to show internal directories.
Click to hide internal directories.