ipick

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterResources

func FilterResources(resourceInfo []*resource.Info, like string) []*resource.Info

FilterResources returns resources given like string

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) GetContextNames

func (cn *ContextsManager) GetContextNames() []string

GetContextNames returns list of context names

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) 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 Ipick

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

Ipick describe the interactive instance

func NewIpick

func NewIpick(config *Config) (*Ipick, error)

NewIpick creates new instance of interactive actions

func (*Ipick) SelectResource

func (i *Ipick) 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

Jump to

Keyboard shortcuts

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