v0alpha1

package
v11.1.4-modfix Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GROUP      = "featuretoggle.grafana.app"
	VERSION    = "v0alpha1"
	APIVERSION = GROUP + "/" + VERSION
)

Variables

View Source
var FeatureResourceInfo = common.NewResourceInfo(GROUP, VERSION,
	"features", "feature", "Feature",
	func() runtime.Object { return &Feature{} },
	func() runtime.Object { return &FeatureList{} },
)

FeatureResourceInfo represents each feature that may have a toggle

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: GROUP, Version: VERSION}
)
View Source
var TogglesResourceInfo = common.NewResourceInfo(GROUP, VERSION,
	"featuretoggles", "featuretoggle", "FeatureToggles",
	func() runtime.Object { return &FeatureToggles{} },
	func() runtime.Object { return &FeatureTogglesList{} },
)

TogglesResourceInfo represents the actual configuration

Functions

func RegisterDefaults

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

Types

type Feature

type Feature struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec FeatureSpec `json:"spec,omitempty"`
}

Feature represents a feature in development and information about that feature It does *not* know the status, only defines properties about the feature itself +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*Feature) DeepCopy

func (in *Feature) DeepCopy() *Feature

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Feature.

func (*Feature) DeepCopyInto

func (in *Feature) DeepCopyInto(out *Feature)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Feature) DeepCopyObject

func (in *Feature) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type FeatureList

type FeatureList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []Feature `json:"items,omitempty"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*FeatureList) DeepCopy

func (in *FeatureList) DeepCopy() *FeatureList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureList.

func (*FeatureList) DeepCopyInto

func (in *FeatureList) DeepCopyInto(out *FeatureList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FeatureList) DeepCopyObject

func (in *FeatureList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type FeatureSpec

type FeatureSpec struct {
	// The feature description
	Description string `json:"description"`

	// Indicates the features level of stability
	Stage string `json:"stage"`

	// The team who owns this feature development
	Owner string `json:"codeowner,omitempty"`

	// Enabled by default for version >=
	EnabledVersion string `json:"enabledVersion,omitempty"`

	// Must be run using in development mode (early dev)
	RequiresDevMode bool `json:"requiresDevMode,omitempty"`

	// The flab behavior only effects frontend -- it is not used in the backend
	FrontendOnly bool `json:"frontend,omitempty"`

	// The flag is used at startup, so any change requires a restart
	RequiresRestart bool `json:"requiresRestart,omitempty"`

	// Allow cloud users to set the values in UI
	AllowSelfServe bool `json:"allowSelfServe,omitempty"`

	// Do not show the value in the UI
	HideFromAdminPage bool `json:"hideFromAdminPage,omitempty"`

	// Do not show the value in docs
	HideFromDocs bool `json:"hideFromDocs,omitempty"`
}

func (*FeatureSpec) DeepCopy

func (in *FeatureSpec) DeepCopy() *FeatureSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureSpec.

func (*FeatureSpec) DeepCopyInto

func (in *FeatureSpec) DeepCopyInto(out *FeatureSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FeatureToggles

type FeatureToggles struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// The configured toggles.  Note this may include unknown fields
	Spec map[string]bool `json:"spec"`
}

FeatureToggles define the feature state +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*FeatureToggles) DeepCopy

func (in *FeatureToggles) DeepCopy() *FeatureToggles

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureToggles.

func (*FeatureToggles) DeepCopyInto

func (in *FeatureToggles) DeepCopyInto(out *FeatureToggles)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FeatureToggles) DeepCopyObject

func (in *FeatureToggles) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type FeatureTogglesList

type FeatureTogglesList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []FeatureToggles `json:"items,omitempty"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*FeatureTogglesList) DeepCopy

func (in *FeatureTogglesList) DeepCopy() *FeatureTogglesList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureTogglesList.

func (*FeatureTogglesList) DeepCopyInto

func (in *FeatureTogglesList) DeepCopyInto(out *FeatureTogglesList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FeatureTogglesList) DeepCopyObject

func (in *FeatureTogglesList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ResolvedToggleState

type ResolvedToggleState struct {
	metav1.TypeMeta `json:",inline"`

	// The user is allowed to edit feature toggles on this system
	AllowEditing bool `json:"allowEditing,omitempty"`

	// The system has changes that require still require a restart
	RestartRequired bool `json:"restartRequired,omitempty"`

	// The currently enabled flags
	Enabled map[string]bool `json:"enabled,omitempty"`

	// Details on the current status
	Toggles []ToggleStatus `json:"toggles,omitempty"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*ResolvedToggleState) DeepCopy

func (in *ResolvedToggleState) DeepCopy() *ResolvedToggleState

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResolvedToggleState.

func (*ResolvedToggleState) DeepCopyInto

func (in *ResolvedToggleState) DeepCopyInto(out *ResolvedToggleState)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResolvedToggleState) DeepCopyObject

func (in *ResolvedToggleState) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ToggleStatus

type ToggleStatus struct {
	// The feature toggle name
	Name string `json:"name"`

	// The flag description
	Description string `json:"description,omitempty"`

	// The feature toggle stage
	Stage string `json:"stage"`

	// Is the flag enabled
	Enabled bool `json:"enabled"`

	// Can this flag be updated
	Writeable bool `json:"writeable"`

	// Where was the value configured
	// eg: startup | tenant|org | user | browser
	// missing means default
	Source *common.ObjectReference `json:"source,omitempty"`

	// eg: unknown flag
	Warning string `json:"warning,omitempty"`
}

func (*ToggleStatus) DeepCopy

func (in *ToggleStatus) DeepCopy() *ToggleStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ToggleStatus.

func (*ToggleStatus) DeepCopyInto

func (in *ToggleStatus) DeepCopyInto(out *ToggleStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL