service

package
v1.9.9 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateOrCreateFeature

func UpdateOrCreateFeature(req *FeatureReq) error

Types

type Feature

type Feature string
const (
	ModernWorkflow             Feature = "ModernWorkflow"
	CommunityProjectRepository Feature = "CommunityProjectRepository"
	UserRegistration           Feature = "UserRegistration"
)

type FeatureGates

type FeatureGates map[Feature]bool

func DBToFeatureGates

func DBToFeatureGates() (FeatureGates, error)

func FlagToFeatureGates

func FlagToFeatureGates(s string) (FeatureGates, error)

func (FeatureGates) EnabledFeatures

func (fg FeatureGates) EnabledFeatures() []Feature

func (FeatureGates) FeatureEnabled

func (fg FeatureGates) FeatureEnabled(f Feature) bool

func (FeatureGates) MergeFeatureGates

func (fg FeatureGates) MergeFeatureGates(fs ...FeatureGates)

MergeFeatureGates merge feature config from different source latter feature configs will be overridden by former ones

type FeatureReq

type FeatureReq struct {
	Name    string `json:"name"`
	Enabled bool   `json:"enabled"`
}

Jump to

Keyboard shortcuts

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