Documentation
¶
Index ¶
- func BuildHash(flagName string, bucketingKey string, maxPercentage uint32) uint32
- func Contains(s []string, str string) bool
- func ContextToMap(ctx ffcontext.Context) map[string]any
- func ConvertEvaluationCtxFromRequest(targetingKey string, custom map[string]any) ffcontext.Context
- func GetNestedFieldValue(ctx map[string]any, bucketingKey string) (any, error)
- func Hash(s string) uint32
- func IsIntegral(val float64) bool
- func IsJSONObject(s string) bool
- func JSONTypeExtractor(variation any) (string, error)
- func StrTrim(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildHash ¶
BuildHash is building the hash based on the different properties of the evaluation.
func ContextToMap ¶
ContextToMap convert the context to a MAP to use the query on it.
func ConvertEvaluationCtxFromRequest ¶
func ConvertEvaluationCtxFromRequest( targetingKey string, custom map[string]any, ) ffcontext.Context
ConvertEvaluationCtxFromRequest convert the result of an unmarshal request from the API to a ffcontext.Context @param targetingKey the targeting key to use for the context @param custom the custom attributes to add to the context @return ffcontext.Context
func GetNestedFieldValue ¶ added in v0.2.0
GetNestedFieldValue returns the value from a nested path in the given map. If the path does not exist or an error occurs, it returns an error.
func IsIntegral ¶
IsIntegral returns true if the float is an integer.
func IsJSONObject ¶
IsJSONObject checks if a string is a valid JSON
func JSONTypeExtractor ¶
Types ¶
This section is empty.