Documentation
¶
Index ¶
- Constants
- type PostHogProperties
- type Provider
- func (p *Provider) BooleanEvaluation(_ context.Context, flag string, defaultValue bool, ...) openfeature.BoolResolutionDetail
- func (p *Provider) FloatEvaluation(_ context.Context, flag string, defaultValue float64, ...) openfeature.FloatResolutionDetail
- func (p *Provider) Hooks() []openfeature.Hook
- func (p *Provider) IntEvaluation(_ context.Context, flag string, defaultValue int64, ...) openfeature.IntResolutionDetail
- func (p *Provider) Metadata() openfeature.Metadata
- func (p *Provider) ObjectEvaluation(_ context.Context, flag string, defaultValue interface{}, ...) openfeature.InterfaceResolutionDetail
- func (p *Provider) StringEvaluation(_ context.Context, flag string, defaultValue string, ...) openfeature.StringResolutionDetail
Constants ¶
View Source
const ( DistinctIDContextKey = openfeature.TargetingKey GroupsContextKey = "groups" PropertiesContextKey = "properties" )
All supported keys in the evaluation context.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostHogProperties ¶
type PostHogProperties struct {
GroupProperties map[string]posthog.Properties
PersonProperties posthog.Properties
}
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func NewProvider ¶
NewProvider creates a new PostHog provider.
func (*Provider) BooleanEvaluation ¶
func (p *Provider) BooleanEvaluation(_ context.Context, flag string, defaultValue bool, evalCtx openfeature.FlattenedContext) openfeature.BoolResolutionDetail
func (*Provider) FloatEvaluation ¶
func (p *Provider) FloatEvaluation(_ context.Context, flag string, defaultValue float64, evalCtx openfeature.FlattenedContext) openfeature.FloatResolutionDetail
func (*Provider) Hooks ¶
func (p *Provider) Hooks() []openfeature.Hook
Hooks returns the list of hooks of the provider. The PostHog provider does not have any hooks, an empty slice is returned.
func (*Provider) IntEvaluation ¶
func (p *Provider) IntEvaluation(_ context.Context, flag string, defaultValue int64, evalCtx openfeature.FlattenedContext) openfeature.IntResolutionDetail
func (*Provider) Metadata ¶
func (p *Provider) Metadata() openfeature.Metadata
Metadata returns the providers metadata.
func (*Provider) ObjectEvaluation ¶
func (p *Provider) ObjectEvaluation(_ context.Context, flag string, defaultValue interface{}, evalCtx openfeature.FlattenedContext) openfeature.InterfaceResolutionDetail
func (*Provider) StringEvaluation ¶
func (p *Provider) StringEvaluation(_ context.Context, flag string, defaultValue string, evalCtx openfeature.FlattenedContext) openfeature.StringResolutionDetail
Click to show internal directories.
Click to hide internal directories.