Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DecisionMaker ¶
DecisionMaker determines whether a feature should be turned on or off under certain conditions.
type DecisionMakerFactory ¶
type DecisionMakerFactory interface {
NewDecision(instrumentation instrumentation.Instrumentation) DecisionMaker
}
DecisionMakerFactory creates feature decision maker.
type DynamicDecisionMaker ¶
type DynamicDecisionMaker struct {
// contains filtered or unexported fields
}
DynamicDecisionMaker determines whether a feature should be turned on or off under certain conditions.
func (DynamicDecisionMaker) IsFeatureEnable ¶
func (d DynamicDecisionMaker) IsFeatureEnable(featureID string, user *entity.User) bool
IsFeatureEnable determines whether a feature is enabled given featureID.
type DynamicDecisionMakerFactory ¶
type DynamicDecisionMakerFactory struct {
// contains filtered or unexported fields
}
DynamicDecisionMakerFactory creates feature decision maker.
func NewDynamicDecisionMakerFactory ¶
func NewDynamicDecisionMakerFactory( featureToggleRepo repository.FeatureToggle, authorizer authorizer.Authorizer, ) DynamicDecisionMakerFactory
NewDynamicDecisionMakerFactory creates DynamicDecisionMakerFactory.
func (DynamicDecisionMakerFactory) NewDecision ¶
func (d DynamicDecisionMakerFactory) NewDecision( instrumentation instrumentation.Instrumentation, ) DecisionMaker
NewDecision creates feature decision maker with instrumentation.
type PermissionChecker ¶
PermissionChecker checks whether the user is allowed to access a feature
type PermissionToggle ¶
type PermissionToggle string
const (
AdminPanel PermissionToggle = "admin-panel"
)
type StaticDecisionMaker ¶
type StaticDecisionMaker struct {
// contains filtered or unexported fields
}
StaticDecisionMaker makes feature decisions based on hardcoded values.
func (StaticDecisionMaker) IsFeatureEnable ¶
func (s StaticDecisionMaker) IsFeatureEnable(featureID string, user *entity.User) bool
IsFeatureEnable determines whether a feature is enabled given featureID.
type StaticDecisionMakerFactory ¶
type StaticDecisionMakerFactory struct {
// contains filtered or unexported fields
}
StaticDecisionMakerFactory creates static feature decision maker.
func NewStaticDecisionMakerFactory ¶
func NewStaticDecisionMakerFactory(authorizer authorizer.Authorizer) StaticDecisionMakerFactory
NewStaticDecisionMakerFactory creates StaticDecisionMakerFactory.
func (StaticDecisionMakerFactory) NewDecision ¶
func (s StaticDecisionMakerFactory) NewDecision( instrumentation instrumentation.Instrumentation, ) DecisionMaker
NewDecision creates static feature decision maker with config map.