utils

package
v0.1.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AskForConfirmation

func AskForConfirmation() (bool, error)

AskForConfirmation function that return 1 if you type y/Y/yes or 0 otherwise

func StringInSlice

func StringInSlice(a string, list []string) bool

StringInSlice return true when string is in slice

Types

type Config added in v0.1.1

type Config struct {
	// contains filtered or unexported fields
}

func NewConfig added in v0.1.1

func NewConfig() (config *Config, err error)

func (*Config) AddContext added in v0.1.1

func (c *Config) AddContext(cluster string, namespace string)

func (*Config) ContextName added in v0.1.1

func (c *Config) ContextName(cluster string, namespace string) string

func (*Config) DeleteContexts added in v0.1.1

func (c *Config) DeleteContexts(contexts map[string]*api.Context) error

func (*Config) GetKubernetesClient added in v0.1.1

func (c *Config) GetKubernetesClient() (*kubernetes.Clientset, error)

func (*Config) ListContexts added in v0.1.1

func (c *Config) ListContexts() (map[string]*api.Context, string)

func (*Config) Update added in v0.1.1

func (c *Config) Update() (err error)

Jump to

Keyboard shortcuts

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