Documentation
¶
Index ¶
- func AddCommandIfFeatureFlag(rootCmd *cobra.Command, cmd *cobra.Command, featureFlag FeatureFlag)
- 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 IsFeatureFlagEnabled(featureFlag FeatureFlag) bool
- func IsJwtTokenExpired(tokenStr string) (bool, error)
- func IsJwtTokenExpiredWithTime(tokenStr string, now time.Time) (bool, error)
- func ValidateCIDR(cidr string) (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 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 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 ValidateCIDR ¶ added in v0.0.13
Types ¶
type FeatureFlag ¶
type FeatureFlag string
const ( CDC FeatureFlag = "CDC" CONFIGURE_URL FeatureFlag = "CONFIGURE_URL" NODE_OP FeatureFlag = "NODE_OPS" )
func (FeatureFlag) String ¶
func (f FeatureFlag) String() string
Click to show internal directories.
Click to hide internal directories.