Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KVsToFeatureMap ¶
func KVsToFeatureMap(kvb stores.KVBytes) (*models.FeatureMap, error)
KVsToFeatures helper for unmarshalling consul result sets into Features
Types ¶
type Feature ¶
type Feature struct {
FeatureType FeatureType `json:"feature_type"`
Key string `json:"key"`
Namespace string `json:"namespace"`
Scope string `json:"scope"`
Value interface{} `json:"value"`
Comment string `json:"comment"`
UpdatedBy string `json:"updated_by"`
}
Feature KV model for feature flags
func NewFeature ¶
func NewFeature(name string, value interface{}, comment string, user string, scope string, ns string) (f *Feature)
NewFeature init a Feature
func (*Feature) FloatValue ¶
FloatValue cast Value to float64
func (*Feature) GetNamespace ¶
GetNamespace formats the fully scoped namespace
type FeatureType ¶
type FeatureType string
FeatureType accepted feature types
const ( Percentile FeatureType = "percentile" Boolean FeatureType = "boolean" Invalid FeatureType = "invalid" DefaultScope = "default" FeatureScope = "features" )
func ParseValueAndFeatureType ¶
func ParseValueAndFeatureType(v string) (interface{}, FeatureType)
GetFeatureTypeFromValue interface to type helper
Click to show internal directories.
Click to hide internal directories.