Documentation
¶
Index ¶
- func ContextWithAnonFeatures(ctx context.Context, f *AnonFeatures) context.Context
- func ContextWithUserFeatures(ctx context.Context, f *UserFeatures) context.Context
- func DeviceType(v example.DeviceType) pbflags.Dimension
- func IsInternal(v bool) pbflags.Dimension
- func Plan(v example.PlanLevel) pbflags.Dimension
- func SessionID(v string) pbflags.Dimension
- func UserID(v string) pbflags.Dimension
- type AnonFeatures
- type HasNotifications
- type UserFeatures
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithAnonFeatures ¶ added in v0.17.0
func ContextWithAnonFeatures(ctx context.Context, f *AnonFeatures) context.Context
ContextWithAnonFeatures stores the features in a context.Context.
func ContextWithUserFeatures ¶ added in v0.17.0
func ContextWithUserFeatures(ctx context.Context, f *UserFeatures) context.Context
ContextWithUserFeatures stores the features in a context.Context.
func DeviceType ¶
func DeviceType(v example.DeviceType) pbflags.Dimension
DeviceType sets the device_type dimension (Client device class).
func IsInternal ¶
IsInternal sets the is_internal dimension (Internal employee).
Types ¶
type AnonFeatures ¶ added in v0.17.0
type AnonFeatures struct {
// contains filtered or unexported fields
}
AnonFeatures provides feature flag access for the anon evaluation scope.
func AnonFeaturesFrom ¶ added in v0.17.0
func AnonFeaturesFrom(ctx context.Context) *AnonFeatures
AnonFeaturesFrom retrieves the features from a context.Context.
func NewAnonFeatures ¶ added in v0.17.0
func NewAnonFeatures(eval pbflags.Evaluator, sessionID string) *AnonFeatures
NewAnonFeatures creates a AnonFeatures with the given evaluator and dimensions.
func (*AnonFeatures) Notifications ¶ added in v0.17.0
func (f *AnonFeatures) Notifications() notificationsflags.NotificationsFlags
Notifications returns a notifications flags client scoped to this evaluation context.
type HasNotifications ¶ added in v0.17.0
type HasNotifications interface {
Notifications() notificationsflags.NotificationsFlags
}
HasNotifications is a duck-typed interface for scopes that provide notifications flags.
type UserFeatures ¶ added in v0.17.0
type UserFeatures struct {
// contains filtered or unexported fields
}
UserFeatures provides feature flag access for the user evaluation scope.
func NewUserFeatures ¶ added in v0.17.0
func NewUserFeatures(eval pbflags.Evaluator, sessionID string, userID string) *UserFeatures
NewUserFeatures creates a UserFeatures with the given evaluator and dimensions.
func UserFeaturesFrom ¶ added in v0.17.0
func UserFeaturesFrom(ctx context.Context) *UserFeatures
UserFeaturesFrom retrieves the features from a context.Context.
func (*UserFeatures) Notifications ¶ added in v0.17.0
func (f *UserFeatures) Notifications() notificationsflags.NotificationsFlags
Notifications returns a notifications flags client scoped to this evaluation context.