package
0.0.0-20240419133027-aeba8327aa53
Repository: https://github.com/openflagr/flagr.git
Documentation: pkg.go.dev

# Functions

CreateFlagEntityType creates the FlagEntityType if not exists.
CreateFlagKey creates the key based on the given key.
GenFixtureFlag is a fixture.
GenFixtureSegment is a fixture.
GetDB gets the db singleton.
NewSQLiteDB creates a new sqlite db useful for backup exports and unit tests.
NewTestDB creates a new test db.
PopulateTestDB seeds the test db.
PreloadConstraintsDistribution preloads constraints and distributions for segment.
Preloads just the tags.
PreloadSegmentsVariantsTags preloads segments, variants and tags for flag.
SaveFlagSnapshot saves the Flag Snapshot.

# Constants

PercentMultiplier implies that the multiplier between percentage (100) and TotalBucketNum.
SegmentDefaultRank is the default rank when we create the segment.
TotalBucketNum represents how many buckets we can use to determine the consistent hashing distribution and rollout.

# Variables

AutoMigrateTables stores the entity tables that we can auto migrate in gorm.
OperatorToExprMap maps from the swagger model operator to condition operator.

# Structs

Constraint is the unit of constraints.
Distribution is the struct represents distribution under segment and links to variant.
DistributionArray is useful for faster evalution.
DistributionDebugLog is useful for making debug logs.
EvalContext represents the context we can evaluate and log.
EvalDebugLog is the debugging log of evaluation.
EvalResult represents the result of the evaluation.
Flag is the unit of flags.
FlagEntityType is the entity_type that will overwrite into evaluation logs.
FlagEvaluation is a struct that holds the necessary info for evaluation.
FlagSnapshot is the snapshot of a flag Any change of the flag will create a new snapshot.
No description provided by the author
Segment is the unit of segmentation.
SegmentDebugLog is the segmebnt level of debugging logs.
SegmentEvaluation is a struct that holds the necessary info for evaluation.
Tag is a descriptive identifier given to ease searchability.
User represents the User struct.
Variant is the struct that represent the experience/variant of the evaluation entity.

# Type aliases

Attachment supports dynamic configuration in variant.
ConstraintArray is an array of Constraint.