# Packages
Package testmodel contains schema types for data files used in parameterized tests.
# Functions
AllJSONValueTypes returns every possible value of the ldvalue.ValueType enum, corresponding to the standard JSON types (including null).
AllSDKValueTypes returns every possible value of the servicedef.ValueType enum, corresponding to the logical types used in strongly-typed SDK APIs-- that is, the result types you could request when evaluating a flag.
ClientSideFlagShouldHaveDebuggingEnabledUntil is a convenience function for configuring a client-side flag to have debugging enabled until the specified time.
ClientSideFlagShouldHaveEvalReason is a convenience function for configuring a client-side flag to have an evaluation reason.
ClientSideFlagShouldHaveFullEventTracking is a convenience function for configuring a client-side flag to have full event tracking enabled (by setting TrackEvents to true).
FlagShouldAlwaysHaveDebuggingEnabled is a convenience function for configuring a flag to have debugging enabled (by setting DebugEventsUntilDate to a far future time).
FlagShouldHaveDebuggingEnabledUntil is a convenience function for configuring a flag to have debugging enabled until the specified time.
FlagShouldHaveFullEventTracking is a convenience function for configuring a flag to have full event tracking enabled (by setting TrackEvents to true).
FlagShouldProduceThisEvalReason is a convenience function for configuring a flag to produce a specific evaluation reason for all evaluations.
GroupTestSuitesByName converts a list of test suites to a list of lists, grouped by their name property.
LoadAllDataFiles reads all data files in a directory and performs any necessary constant/parameter substitutions.
LoadAndParseAllTestSuites calls LoadAllDataFiles and then parses each of the resulting SourceInfos as JSON or YAML into the specified type.
LoadDataFile reads a data file and performs any necessary constant/parameter substitutions.
MakeStandardMigrationStages returns a list of all valid migration stages in the order of progression.
MakeStandardTestValues returns a list of values that cover all JSON types, *and* all special values that might conceivably be handled wrong in SDK implementations.
MakeValueFactoriesBySDKValueType creates the specified number of ValueByTypeFactory generators, each producing different values from the others (insofar as possible, given that there are only two possible values for the boolean type).
MakeValueFactoryBySDKValueType creates a ValueByTypeFactory generator providing a different value for each servicedef.ValueType.
NewClientSideFlagFactory creates a ClientSideFlagFactory with the specified configuration.
NewContextFactoriesForExercisingAllAttributes produces a list of ContextFactory instances that use different subsets of the context schema, to verify that context attributes are encoded correctly when they are sent to evaluation endpoints.
NewContextFactoriesForSingleAndMultiKind produces a list of ContextFactory instances for testing SDK functionality that may behave differently for different Context variants.
NewContextFactory creates a ContextFactory that produces single-kind Contexts.
NewFlagFactory creates a FlagFactory with the specified configuration.
No description provided by the author
No description provided by the author
NewMultiContextFactory creates a ContextFactory that produces multi-kind Contexts.
ParseJSONOrYAML is used in the same way as json.Unmarshal, but if the data is YAML and not JSON, it will convert the YAML to JSON and then parse it as JSON.
SingleValueForAllSDKValueTypes creates a ValueByTypeFactory generator that always returns the same value.
# Structs
ClientSideFlagFactory is a test data generator that produces mockld.ClientSDKFlagWithKey instances.
ContextFactory is a test data generator that produces ldcontext.Context instances.
FlagFactory is a test data generator that produces ldmodel.FeatureFlag instances.
No description provided by the author
SourceInfo represents JSON or YAML data that was read from a file, after post-processing to expand constants and parameters.
# Type aliases
ValueFactoryBySDKValueType is a data generator function type that produces a different ldvalue.Value for each of the logical types supported by strongly-typed SDKs.