config

package
v0.5.29 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2021 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustRegisterSubSection

func MustRegisterSubSection(subSectionKey string, section config.Config) config.Section

Types

type Config

type Config struct {
	EnabledPlugins []string `json:"enabled-plugins" pflag:"[]string{\"*\"},List of enabled plugins, default value is to enable all plugins."`
}

Top level plugins config.

func GetConfig

func GetConfig() *Config

Retrieves the current config value or default.

func (Config) GetPFlagSet

func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet

GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the flags is json-name.json-sub-name... etc.

func (Config) IsEnabled

func (cfg Config) IsEnabled(pluginToCheck string) bool

Jump to

Keyboard shortcuts

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