Documentation
¶
Index ¶
- Variables
- func SetCache(featureMap map[string]Feature, propertyMap map[string]Property, ...)
- type Cache
- type Collection
- type ConfigResponse
- type Feature
- func (f *Feature) GetCurrentValue(entityID string, entityAttributes map[string]interface{}) interface{}
- func (f *Feature) GetDisabledValue() interface{}
- func (f *Feature) GetEnabledValue() interface{}
- func (f *Feature) GetFeatureDataType() string
- func (f *Feature) GetFeatureID() string
- func (f *Feature) GetFeatureName() string
- func (f *Feature) GetSegmentRules() []SegmentRule
- func (f *Feature) IsEnabled() bool
- type Property
- func (f *Property) GetCurrentValue(entityID string, entityAttributes map[string]interface{}) interface{}
- func (f *Property) GetPropertyDataType() string
- func (f *Property) GetPropertyID() string
- func (f *Property) GetPropertyName() string
- func (f *Property) GetSegmentRules() []SegmentRule
- func (f *Property) GetValue() interface{}
- type Rule
- type RuleElem
- type Segment
- type SegmentRule
Constants ¶
This section is empty.
Variables ¶
var ( // NUMERIC : NUMERIC var NUMERIC string = "NUMERIC" // STRING : STRING var STRING string = "STRING" // BOOLEAN : BOOLEAN var BOOLEAN string = "BOOLEAN" )
Functions ¶
Types ¶
type Cache ¶
type Cache struct {
FeatureMap map[string]Feature
PropertyMap map[string]Property
SegmentMap map[string]Segment
}
Cache : Cache struct
var CacheInstance *Cache
CacheInstance : Cache Instance
type Collection ¶
Collection : Collection struct
type ConfigResponse ¶
type ConfigResponse struct {
Features []Feature
Properties []Property
Collection Collection
Segments []Segment
}
ConfigResponse : ConfigResponse struct
type Feature ¶
type Feature struct {
Name string `json:"name"`
FeatureID string `json:"feature_id"`
DataType string `json:"type"`
EnabledValue interface{} `json:"enabled_value"`
DisabledValue interface{} `json:"disabled_value"`
SegmentRules []SegmentRule `json:"segment_rules"`
Enabled bool `json:"enabled"`
}
Feature : Feature struct
func (*Feature) GetCurrentValue ¶
func (f *Feature) GetCurrentValue(entityID string, entityAttributes map[string]interface{}) interface{}
GetCurrentValue : Get Current Value
func (*Feature) GetDisabledValue ¶
func (f *Feature) GetDisabledValue() interface{}
GetDisabledValue : Get Disabled Value
func (*Feature) GetEnabledValue ¶
func (f *Feature) GetEnabledValue() interface{}
GetEnabledValue : Get Enabled Value
func (*Feature) GetFeatureDataType ¶
GetFeatureDataType : Get Feature Data Type
func (*Feature) GetFeatureID ¶ added in v0.1.1
GetFeatureID : Get Feature ID
func (*Feature) GetFeatureName ¶
GetFeatureName : Get Feature Name
func (*Feature) GetSegmentRules ¶
func (f *Feature) GetSegmentRules() []SegmentRule
GetSegmentRules : Get Segment Rules
type Property ¶
type Property struct {
Name string `json:"name"`
PropertyID string `json:"property_id"`
DataType string `json:"type"`
Value interface{} `json:"value"`
SegmentRules []SegmentRule `json:"segment_rules"`
}
Property : Property struct
func (*Property) GetCurrentValue ¶
func (f *Property) GetCurrentValue(entityID string, entityAttributes map[string]interface{}) interface{}
GetCurrentValue : Get Current Value
func (*Property) GetPropertyDataType ¶
GetPropertyDataType : Get Property Data Type
func (*Property) GetPropertyID ¶ added in v0.1.1
GetPropertyID : Get Property Id
func (*Property) GetPropertyName ¶
GetPropertyName : Get Property Name
func (*Property) GetSegmentRules ¶
func (f *Property) GetSegmentRules() []SegmentRule
GetSegmentRules : Get Segment Rules
type Rule ¶
type Rule struct {
Values []interface{} `json:"values"`
Operator string
AttributeName string `json:"Attribute_Name"`
}
Rule : Rule struct
func (*Rule) EvaluateRule ¶
EvaluateRule : Evaluate Rule
func (*Rule) GetAttributeName ¶
GetAttributeName : Get Attribute Name
type Segment ¶
type Segment struct {
Name string `json:"name"`
SegmentID string `json:"segment_id"`
Rules []Rule `json:"rules"`
}
Segment : Segment struct
func (*Segment) EvaluateRule ¶
EvaluateRule : Evaluate Rule
func (*Segment) GetSegmentID ¶ added in v0.1.1
GetSegmentID : Get SegmentID
type SegmentRule ¶
SegmentRule : SegmentRule struct