ffcontext

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ReservedKey       = coreCtx.ReservedKey
	LegacyReservedKey = coreCtx.LegacyReservedKey
)

ReservedKey is the evaluation context attribute holding the Semaphore specific fields. LegacyReservedKey is the name used by GO Feature Flag, still accepted.

Variables

This section is empty.

Functions

func HasReservedKey

func HasReservedKey(attributes map[string]any) bool

HasReservedKey tells if the attributes carry the reserved attribute, under any of its names.

Types

type Context

type Context = coreCtx.Context

type EvaluationContext

type EvaluationContext = coreCtx.EvaluationContext

func NewAnonymousEvaluationContext deprecated

func NewAnonymousEvaluationContext(key string) EvaluationContext

Deprecated: NewAnonymousEvaluationContext is here for compatibility reason. Please use NewEvaluationContext instead and add a attributes attribute to know that it is an anonymous user.

ctx := NewEvaluationContext("my-targetingKey") ctx.AddCustomAttribute("anonymous", true).

func NewEvaluationContext

func NewEvaluationContext(key string) EvaluationContext

NewEvaluationContext creates a new evaluation context identified by the given targetingKey.

type EvaluationContextBuilder

type EvaluationContextBuilder = coreCtx.EvaluationContextBuilder

func NewEvaluationContextBuilder

func NewEvaluationContextBuilder(key string) EvaluationContextBuilder

NewEvaluationContextBuilder constructs a new EvaluationContextBuilder, specifying the user targetingKey.

For authenticated users, the targetingKey may be a username or e-mail address. For anonymous users, this could be an IP address or session ID.

type GoffContextSpecifics

type GoffContextSpecifics = coreCtx.GoffContextSpecifics

Jump to

Keyboard shortcuts

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