Update pkg/setting/setting_feature_toggles.go
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
This commit is contained in:
committed by
grambbledook
parent
78c20c0cb9
commit
795ffb8126
@@ -261,7 +261,7 @@ func makeFlags(tt struct {
|
||||
config := map[string]setting.FeatureToggle{
|
||||
tt.name: {
|
||||
Name: tt.name,
|
||||
Type: setting.FeatureToggleType(tt.typ.String()),
|
||||
Type: setting.FeatureFlagType(tt.typ.String()),
|
||||
Value: tt.configValue,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -10,18 +10,20 @@ import (
|
||||
"github.com/grafana/grafana/pkg/util"
|
||||
)
|
||||
|
||||
type FeatureToggleType string
|
||||
type FeatureFlagType string
|
||||
|
||||
const Structure FeatureToggleType = "structure"
|
||||
const Integer FeatureToggleType = "integer"
|
||||
const Float FeatureToggleType = "float"
|
||||
const Boolean FeatureToggleType = "boolean"
|
||||
const String FeatureToggleType = "string"
|
||||
const (
|
||||
Structure FeatureFlagType = "structure"
|
||||
Integer FeatureFlagType = "integer"
|
||||
Float FeatureFlagType = "float"
|
||||
Boolean FeatureFlagType = "boolean"
|
||||
String FeatureFlagType = "string"
|
||||
)
|
||||
|
||||
type FeatureToggle struct {
|
||||
Type FeatureToggleType `json:"type"`
|
||||
Name string `json:"name"`
|
||||
Value any `json:"value"`
|
||||
Type FeatureFlagType `json:"type"`
|
||||
Name string `json:"name"`
|
||||
Value any `json:"value"`
|
||||
}
|
||||
|
||||
// Deprecated: should use `featuremgmt.FeatureToggles`
|
||||
|
||||
Reference in New Issue
Block a user