Documentation ¶
Index ¶
- func CheckCampaignType(campaign schema.Campaign, campaignType string) bool
- func CreateImpressionForPush(vwoInstance schema.VwoInstance, tagKey, tagValue, userID string) schema.Impression
- func CreateImpressionTrackingGoal(vwoInstance schema.VwoInstance, variationID int, userID, goalType string, ...) schema.Impression
- func CreateImpressionTrackingUser(vwoInstance schema.VwoInstance, campaignID int, variationID int, userID string) schema.Impression
- func GetCampaign(API string, settingsFile schema.SettingsFile, campaignKey string) (schema.Campaign, error)
- func GetCampaignGoal(API string, campaign schema.Campaign, goalIdentifier string) (schema.Goal, error)
- func GetCampaignVariation(API string, campaign schema.Campaign, variationName string) (schema.Variation, error)
- func GetControlVariation(campaign schema.Campaign) schema.Variation
- func GetKeyValue(obj map[string]interface{}) (string, interface{})
- func GetRequest(url string) (string, error)
- func GetVariableForFeature(variables []schema.Variable, variableKey string) schema.Variable
- func GetVariableValueForVariation(vwoInstance schema.VwoInstance, campaign schema.Campaign, ...) schema.Variable
- func GetVariationAllocationRanges(vwoInstance schema.VwoInstance, variations []schema.Variation) []schema.Variation
- func GetVariationBucketingRange(weight float64) int
- func LogMessage(logs interface{}, level, file, message string)
- func ParseOptions(option interface{}) (options schema.Options)
- func ScaleVariations(variations []schema.Variation) []schema.Variation
- func ValidateActivate(campaignKey, userID string) bool
- func ValidateGetFeatureVariableValue(campaignKey, variableKey, userID string) bool
- func ValidateGetVariationName(campaignKey, userID string) bool
- func ValidateIsFeatureEnabled(campaignKey, userID string) bool
- func ValidateLogger(logs interface{}) bool
- func ValidatePush(tagKey, tagValue, userID string) bool
- func ValidateStorage(storage interface{}) bool
- func ValidateTrack(campaignKey, userID, goalIdentifier string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckCampaignType ¶
CheckCampaignType matches campaign type
func CreateImpressionForPush ¶
func CreateImpressionForPush(vwoInstance schema.VwoInstance, tagKey, tagValue, userID string) schema.Impression
CreateImpressionForPush creates the impression from the arguments passed to push
func CreateImpressionTrackingGoal ¶
func CreateImpressionTrackingGoal(vwoInstance schema.VwoInstance, variationID int, userID, goalType string, campaignID, goalID int, revenueValue interface{}) schema.Impression
CreateImpressionTrackingGoal creates the impression from the arguments passed to track goal
func CreateImpressionTrackingUser ¶
func CreateImpressionTrackingUser(vwoInstance schema.VwoInstance, campaignID int, variationID int, userID string) schema.Impression
CreateImpressionTrackingUser creates the impression from the arguments passed to track user
func GetCampaign ¶
func GetCampaign(API string, settingsFile schema.SettingsFile, campaignKey string) (schema.Campaign, error)
GetCampaign function finds and returns campaign from given campaign_key.
func GetCampaignGoal ¶
func GetCampaignGoal(API string, campaign schema.Campaign, goalIdentifier string) (schema.Goal, error)
GetCampaignGoal returns goal from given campaign and goal identifier.
func GetCampaignVariation ¶
func GetCampaignVariation(API string, campaign schema.Campaign, variationName string) (schema.Variation, error)
GetCampaignVariation returns variation from given campaign and variationName.
func GetControlVariation ¶
GetControlVariation returns control variation from a given campaign
func GetKeyValue ¶
GetKeyValue returns first key value pair of the given map
func GetVariableForFeature ¶
GetVariableForFeature gets the variable from the list of variables in the campaign that matches the variableKey
func GetVariableValueForVariation ¶
func GetVariableValueForVariation(vwoInstance schema.VwoInstance, campaign schema.Campaign, variation schema.Variation, variableKey, userID string) schema.Variable
GetVariableValueForVariation gets the variable from the list of variables in the variation that matches the variableKey
func GetVariationAllocationRanges ¶
func GetVariationAllocationRanges(vwoInstance schema.VwoInstance, variations []schema.Variation) []schema.Variation
GetVariationAllocationRanges returns list of variation with set allocation ranges.
func GetVariationBucketingRange ¶
GetVariationBucketingRange returns the bucket size of variation.
func LogMessage ¶
func LogMessage(logs interface{}, level, file, message string)
LogMessage function generates Log messages and logs them into the logger, logger can be defined by the user itself too
func ParseOptions ¶
ParseOptions - parses custom options
func ScaleVariations ¶
ScaleVariations function It extracts the weights from all the variations inside the campaign and scales them so that the total sum of eligible variations weights become 100%
func ValidateActivate ¶
ValidateActivate - validates Activate API parameters
func ValidateGetFeatureVariableValue ¶
ValidateGetFeatureVariableValue - validates GetFeatureVariableValue API parameters
func ValidateGetVariationName ¶
ValidateGetVariationName - validates GetVariationName API parameters
func ValidateIsFeatureEnabled ¶
ValidateIsFeatureEnabled - validates IsFeatureEnabled API parameters
func ValidateLogger ¶
func ValidateLogger(logs interface{}) bool
ValidateLogger - validates Custom logger
func ValidatePush ¶
ValidatePush - validates Push API parameters
func ValidateStorage ¶
func ValidateStorage(storage interface{}) bool
ValidateStorage - validates Custom Storage
func ValidateTrack ¶
ValidateTrack - validates Track API parameters
Types ¶
This section is empty.