config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetContext

func GetContext() string

GetContext returns the Kubernetes context

func GetKubeconfig

func GetKubeconfig() string

GetKubeconfig returns the kubeconfig path

func GetNamespace

func GetNamespace() string

GetNamespace returns the default namespace

func GetOutput

func GetOutput() string

GetOutput returns the output format

func SetDefaults

func SetDefaults()

SetDefaults sets default configuration values

Types

type Config

type Config struct {
	Kubeconfig string `mapstructure:"kubeconfig"`
	Context    string `mapstructure:"context"`
	Namespace  string `mapstructure:"namespace"`
	Output     string `mapstructure:"output"`
}

Config represents the cdctl configuration

func Load

func Load() (*Config, error)

Load loads the configuration from viper

Jump to

Keyboard shortcuts

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