Documentation
      ¶
    
    
  
    
  
    Index ¶
- func IsFilePathLoadableByKubectl(path string, verbose bool) (isLoadable bool, err error)
 - func ListContextNamesUsingKubectl(path string, verbose bool) (contextNames []string, err error)
 - func MustIsFilePathLoadableByKubectl(path string, verbose bool) (isLoadable bool)
 - func MustListContextNamesUsingKubectl(path string, verbose bool) (contextNames []string)
 - type KubeConfig
 - func LoadFromFile(file files.File, verbose bool) (config *KubeConfig, err error)
 - func LoadFromFilePath(path string, verbose bool) (config *KubeConfig, err error)
 - func MergeConfig(configs ...*KubeConfig) (merged *KubeConfig, err error)
 - func MustLoadFromFilePath(path string, verbose bool) (config *KubeConfig)
 - func MustMergeConfig(configs ...*KubeConfig) (merged *KubeConfig)
 
- func (k *KubeConfig) AddClusterAndContextAndUserEntry(cluster *KubeConfigCluster, context *KubeConfigContext, user *KubeConfigUser) (err error)
 - func (k *KubeConfig) AddClusterEntry(cluster *KubeConfigCluster) (err error)
 - func (k *KubeConfig) AddConfig(toAdd *KubeConfig) (err error)
 - func (k *KubeConfig) AddContextEntry(context *KubeConfigContext) (err error)
 - func (k *KubeConfig) AddUserEntry(user *KubeConfigUser) (err error)
 - func (k *KubeConfig) GetAsYamlString() (yamlSring string, err error)
 - func (k *KubeConfig) GetClusterAndContextAndUserEntryByName(name string) (cluster *KubeConfigCluster, context *KubeConfigContext, user *KubeConfigUser, ...)
 - func (k *KubeConfig) GetClusterEntryByName(name string) (cluster *KubeConfigCluster, err error)
 - func (k *KubeConfig) GetClusterNames() (clusterNames []string, err error)
 - func (k *KubeConfig) GetContextEntryByName(name string) (context *KubeConfigContext, err error)
 - func (k *KubeConfig) GetDeepCopy() (copy *KubeConfig)
 - func (k *KubeConfig) GetServerNames() (serverNames []string, err error)
 - func (k *KubeConfig) GetUserEntryByName(name string) (context *KubeConfigUser, err error)
 - func (k *KubeConfig) MustGetClusterNames() (clusterNames []string)
 - func (k *KubeConfig) MustGetServerNames() (serverNames []string)
 - func (k *KubeConfig) MustWriteToTemporaryFileAndGetPath(verbose bool) (tempFilePath string)
 - func (k *KubeConfig) WriteToFile(outFile files.File, verbose bool) (err error)
 - func (k *KubeConfig) WriteToFileByPath(path string, verbose bool) (err error)
 - func (k *KubeConfig) WriteToTemporaryFileAndGetPath(verbose bool) (tempFilePath string, err error)
 
- type KubeConfigCluster
 - type KubeConfigClusterCluster
 - type KubeConfigContext
 - type KubeConfigUser
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsFilePathLoadableByKubectl ¶
This function does an exex to "kubectl" using the given config file "path". Useful to validate if a written config "path" is understood by "kubectl".
func ListContextNamesUsingKubectl ¶
Use exec to invoke a "kubectl config get-context" with the given config "path". Useful to validate if the config is understood correctly by kubectl.
Types ¶
type KubeConfig ¶
type KubeConfig struct {
	APIVersion string              `yaml:"apiVersion"`
	Kind       string              `yaml:"kind"`
	Clusters   []KubeConfigCluster `yaml:"clusters"`
	Contexts   []KubeConfigContext `yaml:"contexts"`
	Users      []KubeConfigUser    `yaml:"users"`
}
    func LoadFromFile ¶
func LoadFromFile(file files.File, verbose bool) (config *KubeConfig, err error)
func LoadFromFilePath ¶
func LoadFromFilePath(path string, verbose bool) (config *KubeConfig, err error)
func MergeConfig ¶
func MergeConfig(configs ...*KubeConfig) (merged *KubeConfig, err error)
func MustLoadFromFilePath ¶
func MustLoadFromFilePath(path string, verbose bool) (config *KubeConfig)
func MustMergeConfig ¶
func MustMergeConfig(configs ...*KubeConfig) (merged *KubeConfig)
func (*KubeConfig) AddClusterAndContextAndUserEntry ¶
func (k *KubeConfig) AddClusterAndContextAndUserEntry(cluster *KubeConfigCluster, context *KubeConfigContext, user *KubeConfigUser) (err error)
func (*KubeConfig) AddClusterEntry ¶
func (k *KubeConfig) AddClusterEntry(cluster *KubeConfigCluster) (err error)
func (*KubeConfig) AddConfig ¶
func (k *KubeConfig) AddConfig(toAdd *KubeConfig) (err error)
func (*KubeConfig) AddContextEntry ¶
func (k *KubeConfig) AddContextEntry(context *KubeConfigContext) (err error)
func (*KubeConfig) AddUserEntry ¶
func (k *KubeConfig) AddUserEntry(user *KubeConfigUser) (err error)
func (*KubeConfig) GetAsYamlString ¶
func (k *KubeConfig) GetAsYamlString() (yamlSring string, err error)
func (*KubeConfig) GetClusterAndContextAndUserEntryByName ¶
func (k *KubeConfig) GetClusterAndContextAndUserEntryByName(name string) (cluster *KubeConfigCluster, context *KubeConfigContext, user *KubeConfigUser, err error)
func (*KubeConfig) GetClusterEntryByName ¶
func (k *KubeConfig) GetClusterEntryByName(name string) (cluster *KubeConfigCluster, err error)
func (*KubeConfig) GetClusterNames ¶
func (k *KubeConfig) GetClusterNames() (clusterNames []string, err error)
func (*KubeConfig) GetContextEntryByName ¶
func (k *KubeConfig) GetContextEntryByName(name string) (context *KubeConfigContext, err error)
func (*KubeConfig) GetDeepCopy ¶
func (k *KubeConfig) GetDeepCopy() (copy *KubeConfig)
func (*KubeConfig) GetServerNames ¶
func (k *KubeConfig) GetServerNames() (serverNames []string, err error)
func (*KubeConfig) GetUserEntryByName ¶
func (k *KubeConfig) GetUserEntryByName(name string) (context *KubeConfigUser, err error)
func (*KubeConfig) MustGetClusterNames ¶
func (k *KubeConfig) MustGetClusterNames() (clusterNames []string)
func (*KubeConfig) MustGetServerNames ¶
func (k *KubeConfig) MustGetServerNames() (serverNames []string)
func (*KubeConfig) MustWriteToTemporaryFileAndGetPath ¶
func (k *KubeConfig) MustWriteToTemporaryFileAndGetPath(verbose bool) (tempFilePath string)
func (*KubeConfig) WriteToFile ¶
func (k *KubeConfig) WriteToFile(outFile files.File, verbose bool) (err error)
func (*KubeConfig) WriteToFileByPath ¶
func (k *KubeConfig) WriteToFileByPath(path string, verbose bool) (err error)
func (*KubeConfig) WriteToTemporaryFileAndGetPath ¶
func (k *KubeConfig) WriteToTemporaryFileAndGetPath(verbose bool) (tempFilePath string, err error)
type KubeConfigCluster ¶
type KubeConfigCluster struct {
	Name    string                   `yaml:"name"`
	Cluster KubeConfigClusterCluster `yaml:"cluster"`
}
    type KubeConfigContext ¶
 Click to show internal directories. 
   Click to hide internal directories.