Discover Packages
github.com/KubeRocketCI/cli
internal
config
package
Version:
v0.5.0
Opens a new window with list of versions in this module.
Published: Apr 7, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0 modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package config provides configuration loading for the krci CLI.
It uses Viper for layered config: flags > env vars > config file > defaults.
BindFlags registers persistent flags on the root command and binds them to Viper.
func DefaultConfigDir() string
DefaultConfigDir returns ~/.config/krci.
Init sets up Viper defaults and reads the config file.
Call this early — before Cobra parses flags.
Save persists user-provided values to the config file.
Only writes non-empty values so defaults and env vars are not baked in.
type Config struct {
IssuerURL string `mapstructure:"issuer-url"`
ClientID string `mapstructure:"client-id"`
Scopes string `mapstructure:"scopes"`
PortalURL string `mapstructure:"portal-url"`
ClusterName string `mapstructure:"cluster-name"`
Namespace string `mapstructure:"namespace"`
TokenPath string
KeyringService string
ConfigDir string
}
Config holds all resolved configuration values.
Resolve reads the merged config AFTER Cobra has parsed flags.
Call this from PersistentPreRunE so flags are available.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.