Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { SelectCluster bool AllNamespaces bool Random bool Namespace string Like string KubeConfigPaths []string }
Config describe the interactive configuration command
type Context ¶
type Context struct { Data *clientcmdapi.Context Name string }
Context describe the .kube config context (see kubectl config get-contexts)
type ContextsManager ¶
type ContextsManager struct {
// contains filtered or unexported fields
}
ContextsManager describe the context instance
func NewContexts ¶
func NewContexts(paths []string) (*ContextsManager, error)
NewContexts manage the cluster contexts
func (*ContextsManager) GetContexts ¶
func (cn *ContextsManager) GetContexts() []Context
GetContexts returns all the available contexts
func (*ContextsManager) GetCurrentContext ¶
func (cn *ContextsManager) GetCurrentContext() Context
GetCurrentContext returns the current context
func (*ContextsManager) PrintClusters ¶
func (cn *ContextsManager) PrintClusters(buf *bytes.Buffer) error
PrintClusters will add all the available contexts to the given buffer
func (*ContextsManager) SetContext ¶
func (cn *ContextsManager) SetContext(context Context)
SetContext will set new context to work with
func (*ContextsManager) SwitchLocalContext ¶
func (cn *ContextsManager) SwitchLocalContext() error
SwitchLocalContext will switch current local context
type Interactive ¶
type Interactive struct {
// contains filtered or unexported fields
}
Interactive describe the interactive instance
func NewInteractive ¶
func NewInteractive(config *Config) (*Interactive, error)
NewInteractive creates new instance of interactive actions
func (*Interactive) SelectResource ¶
func (i *Interactive) SelectResource(resourceType string) (*resource.Info, error)
SelectResource return selected resource information
type QueryOptions ¶
type QueryOptions struct {
// contains filtered or unexported fields
}
QueryOptions describe the restAPI query builder
func NewQueryOptions ¶
func NewQueryOptions(context string) *QueryOptions
NewQueryOptions create a new restAPI resource query