config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyContextDefaults

func ApplyContextDefaults(cmd *cobra.Command) error

ApplyContextDefaults loads the stored config and sets default flag values from the current context, if not already provided.

func EnsureContext

func EnsureContext() error

EnsureContext creates and sets a default context if none exists.

func GetStoredKubeConfigValues

func GetStoredKubeConfigValues() (string, string, error)

GetStoredKubeConfigValues is a stub function to maintain compatibility TODO: Remove this once all direct Kubernetes access is removed from CLI

func IsConfigFileExists

func IsConfigFileExists() bool

IsConfigFileExists checks if the configuration file exists

func LoadStoredConfig

func LoadStoredConfig() (*configContext.StoredConfig, error)

LoadStoredConfig loads the configuration from disk

func SaveStoredConfig

func SaveStoredConfig(cfg *configContext.StoredConfig) error

SaveStoredConfig persists the configuration to disk

Types

type ConfigContextImpl

type ConfigContextImpl struct{}

ConfigContextImpl implements context-related commands.

func NewConfigContextImpl

func NewConfigContextImpl() *ConfigContextImpl

NewConfigContextImpl creates a new instance of ConfigContextImpl.

func (*ConfigContextImpl) GetContexts

func (c *ConfigContextImpl) GetContexts() error

GetContexts prints all available contexts with their details.

func (*ConfigContextImpl) GetCurrentContext

func (c *ConfigContextImpl) GetCurrentContext() error

GetCurrentContext prints the current context details.

func (*ConfigContextImpl) SetContext

func (c *ConfigContextImpl) SetContext(params api.SetContextParams) error

SetContext creates or updates a configuration context with the given parameters.

func (*ConfigContextImpl) SetControlPlane added in v0.3.0

func (c *ConfigContextImpl) SetControlPlane(params api.SetControlPlaneParams) error

SetControlPlane sets the control plane configuration

func (*ConfigContextImpl) UseContext

func (c *ConfigContextImpl) UseContext(params api.UseContextParams) error

UseContext sets the current context to the context with the given name.

type DefaultContextValues

type DefaultContextValues struct {
	ContextName  string
	Organization string
	Project      string
	DataPlane    string
	Environment  string
}

DefaultContextValues defines default values for context initialization

Jump to

Keyboard shortcuts

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