Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEnableCommand ¶
GetEnableCommand provides a message for how to enable the alpha feature.
func SetDefaultEnablement ¶
SetDefaultEnablement sets the default enablement value for the given feature id.
Types ¶
type FeatureId ¶
type FeatureId string
constant keys are used within source code to pull the AlphaFeature
const ( // the key for overriding all alpha features value. AllId FeatureId = "all" )
func IsFeatureKey ¶
IsFeatureKey inspect if `key` is an alpha feature. Returns the AlphaFeatureId and true in case it is. otherwise returns empty AlphaFeatureId and false.
func MustFeatureKey ¶
MustFeatureKey converts the given key to a FeatureId as IsFeatureKey would and panics if the conversion fails.
type FeatureManager ¶
type FeatureManager struct {
// contains filtered or unexported fields
}
FeatureManager provides operations for handling features within the application which are in alpha mode.
func NewFeaturesManager ¶
func NewFeaturesManager(configManager config.UserConfigManager) *FeatureManager
NewFeaturesManager creates the alpha features manager from the user configuration
func NewFeaturesManagerWithConfig ¶
func NewFeaturesManagerWithConfig(config config.Config) *FeatureManager
func (*FeatureManager) IsEnabled ¶
func (m *FeatureManager) IsEnabled(featureId FeatureId) bool
IsEnabled search and find out if the AlphaFeatureId is currently enabled
func (*FeatureManager) ListFeatures ¶
func (m *FeatureManager) ListFeatures() (map[string]Feature, error)
ListFeatures pulls the list of features in alpha mode available within the application and displays its current state which is `on` or `off`.