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(id string, identity 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(id string, identity 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 ¶
View Source
var ( NUMERIC string = "NUMERIC" STRING string = "STRING" BOOLEAN string = "BOOLEAN" )
Functions ¶
Types ¶
type Cache ¶
type Cache struct {
FeatureMap map[string]Feature
PropertyMap map[string]Property
SegmentMap map[string]Segment
}
var CacheInstance *Cache
func GetCacheInstance ¶
func GetCacheInstance() *Cache
type Collection ¶
type ConfigResponse ¶
type ConfigResponse struct {
Features []Feature
Properties []Property
Collection Collection
Segments []Segment
}
type Feature ¶
type Feature struct {
Name string `json:"name"`
Feature_id string `json:"feature_id"`
DataType string `json:"type"`
Enabled_value interface{} `json:"enabled_value"`
Disabled_value interface{} `json:"disabled_value"`
Segment_rules []SegmentRule `json:"segment_rules"`
Enabled bool `json:"enabled"`
}
func (*Feature) GetCurrentValue ¶
func (*Feature) GetDisabledValue ¶
func (f *Feature) GetDisabledValue() interface{}
func (*Feature) GetEnabledValue ¶
func (f *Feature) GetEnabledValue() interface{}
func (*Feature) GetFeatureDataType ¶
func (*Feature) GetFeatureId ¶
func (*Feature) GetFeatureName ¶
func (*Feature) GetSegmentRules ¶
func (f *Feature) GetSegmentRules() []SegmentRule
type Property ¶
type Property struct {
Name string `json:"name"`
Property_id string `json:"property_id"`
DataType string `json:"type"`
Value interface{} `json:"value"`
Segment_rules []SegmentRule `json:"segment_rules"`
}
func (*Property) GetCurrentValue ¶
func (*Property) GetPropertyDataType ¶
func (*Property) GetPropertyId ¶
func (*Property) GetPropertyName ¶
func (*Property) GetSegmentRules ¶
func (f *Property) GetSegmentRules() []SegmentRule
type Segment ¶
type Segment struct {
Name string `json:"name"`
Segment_id string `json:"segment_id"`
Rules []Rule `json:"rules"`
}
func (*Segment) EvaluateRule ¶
func (*Segment) GetSegmentId ¶
type SegmentRule ¶
func (*SegmentRule) GetOrder ¶
func (sr *SegmentRule) GetOrder() int
func (*SegmentRule) GetRules ¶
func (sr *SegmentRule) GetRules() []RuleElem
func (*SegmentRule) GetValue ¶
func (sr *SegmentRule) GetValue() interface{}
Click to show internal directories.
Click to hide internal directories.