prerun

package
v3.5.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2018 License: MIT Imports: 12 Imported by: 6

Documentation

Index

Constants

View Source
const (
	// ErrFatalError -- unrecoverable fatal error
	ErrFatalError chkitErrors.Err = "fatal error"
)

Variables

This section is empty.

Functions

func GetNamespaceByUserfriendlyID

func GetNamespaceByUserfriendlyID(ctx *context.Context, flags *pflag.FlagSet) error

func PreRun

func PreRun(ctx *context.Context, optional ...Config) error

func PreRunFunc

func PreRunFunc(ctx *context.Context, optional ...Config) func(cmd *cobra.Command, args []string)

func ResolveLabel

func ResolveLabel(ctx *context.Context, label string) (namespace.Namespace, error)

func WithInit

func WithInit(ctx *context.Context, action func(*context.Context) *cobra.Command) *cobra.Command

Types

type ClientInitMode

type ClientInitMode string
const (
	DoNotAllowSelfSignedTLSCerts ClientInitMode = ""
	AllowSelfSignedTLSCerts      ClientInitMode = "allow self signed certs"
	DoNotInitClient              ClientInitMode = "don't init client"
)

func (ClientInitMode) String

func (mode ClientInitMode) String() string

type Config

type Config struct {
	InitClient             ClientInitMode
	RunLoginOnMissingCreds bool
	NamespaceSelection     LoadNamespaceListMode
	Namespace              string
}

type LoadNamespaceListMode

type LoadNamespaceListMode string
const (
	TemporarySetNamespace           LoadNamespaceListMode = ""
	RunNamespaceSelectionAndPersist LoadNamespaceListMode = "run namespace selection and persist"
)

func (LoadNamespaceListMode) String

func (mode LoadNamespaceListMode) String() string

Jump to

Keyboard shortcuts

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