dims

package
v0.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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

func IsInternal(v bool) pbflags.Dimension

IsInternal sets the is_internal dimension (Internal employee).

func Plan

Plan sets the plan dimension (Subscription tier).

func SessionID

func SessionID(v string) pbflags.Dimension

SessionID sets the session_id dimension (Stable session identifier).

func UserID

func UserID(v string) pbflags.Dimension

UserID sets the user_id dimension (Authenticated user identifier).

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

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

Notifications returns a notifications flags client scoped to this evaluation context.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL