Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBootstrapFlags ¶
Add bootstrap flags use in a separate bootstrap proceeds
func BootstrapConfig ¶
func BootstrapConfig() error
bootstrapConfig reads in config file and boostrap options if set.
Types ¶
type Config ¶
type Config interface { // ConfigFile returns the location of the configuration file ConfigFile() string // PluginsDir returns the path to the directory containing plugins PluginsDir() string // LookupPluginsInPath returns true if plugins should be also looked up // in the execution path LookupPluginsInPath() bool // SinkMappings returns additional mappings for sink prefixes to resources SinkMappings() []SinkMapping }
var GlobalConfig Config = &globalConfig
GlobalConfig is the global configuration available for every sub-command
type SinkMapping ¶
type SinkMapping struct { // Prefix is the mapping prefix (like "svc") Prefix string // Resource is the name for the mapped resource (like "services", mind the plural) Resource string // Group is the api group for the mapped resource (like "core") Group string // Version is the api version for the mapped resource (like "v1") Version string }
SinkMappings is the struct of sink prefix config in kn config
type TestConfig ¶
type TestConfig struct { TestPluginsDir string TestConfigFile string TestLookupPluginsInPath bool TestSinkMappings []SinkMapping }
Implementation of Config useful for testing purposes Set an instance of this for config.GlobalConfig to mock your own configuration setup
func (TestConfig) ConfigFile ¶
func (t TestConfig) ConfigFile() string
func (TestConfig) LookupPluginsInPath ¶
func (t TestConfig) LookupPluginsInPath() bool
func (TestConfig) PluginsDir ¶
func (t TestConfig) PluginsDir() string
func (TestConfig) SinkMappings ¶
func (t TestConfig) SinkMappings() []SinkMapping
Click to show internal directories.
Click to hide internal directories.