cmd

package
v2.1.66 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: Apache-2.0 Imports: 90 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MetricsLong = templates.LongDesc(`
		Gets the metrics of the newest pod for a Deployment.

`)

	MetricsExample = templates.Examples(`
		# displays metrics of the latest pod in deployment myapp
		jx metrics myapp

		# Tails the metrics of the container foo in the latest pod in deployment myapp
		jx metrics myapp -c foo
`)
)
View Source
var (
	StatusLong = templates.LongDesc(`
		Gets the current status of the Kubernetes cluster

`)

	StatusExample = templates.Examples(`
		# displays the current status of the Kubernetes cluster
		jx status
`)
)

Functions

func NewCmdCompletion

func NewCmdCompletion(commonOpts *opts.CommonOptions) *cobra.Command

func NewCmdContext

func NewCmdContext(commonOpts *opts.CommonOptions) *cobra.Command

func NewCmdDiagnose

func NewCmdDiagnose(commonOpts *opts.CommonOptions) *cobra.Command

func NewCmdDocs

func NewCmdDocs(commonOpts *opts.CommonOptions) *cobra.Command

open the docs - Jenkins X docs by default

func NewCmdEnvironment

func NewCmdEnvironment(commonOpts *opts.CommonOptions) *cobra.Command

func NewCmdLogs

func NewCmdLogs(commonOpts *opts.CommonOptions) *cobra.Command

func NewCmdMetrics

func NewCmdMetrics(commonOpts *opts.CommonOptions) *cobra.Command

func NewCmdOpen

func NewCmdOpen(commonOpts *opts.CommonOptions) *cobra.Command

func NewCmdOptions

func NewCmdOptions(out io.Writer) *cobra.Command

NewCmdOptions implements the options command

func NewCmdPrompt

func NewCmdPrompt(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdPrompt creates the new command for: jx get prompt

func NewCmdRepo

func NewCmdRepo(commonOpts *opts.CommonOptions) *cobra.Command

func NewCmdScan

func NewCmdScan(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdScan creates a command object for the "scan" command

func NewCmdScanCluster

func NewCmdScanCluster(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdScanCluster creates a command object for "scan cluster" command

func NewCmdShell

func NewCmdShell(commonOpts *opts.CommonOptions) *cobra.Command

func NewCmdStatus

func NewCmdStatus(commonOpts *opts.CommonOptions) *cobra.Command

func NewCmdStep

func NewCmdStep(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdStep Steps a command object for the "step" command

func NewCmdTeam

func NewCmdTeam(commonOpts *opts.CommonOptions) *cobra.Command

func NewCmdVersion

func NewCmdVersion(commonOpts *opts.CommonOptions) *cobra.Command

func NewJXCommand

func NewJXCommand(f clients.Factory, in terminal.FileReader, out terminal.FileWriter,
	err io.Writer, args []string) *cobra.Command

NewJXCommand creates the `jx` command and its nested children. args used to determine binary plugin to run can be overridden (does not affect compiled in commands).

Types

type CompletionOptions

type CompletionOptions struct {
	*opts.CommonOptions
}

CompletionOptions options for completion command

func (*CompletionOptions) Run

func (o *CompletionOptions) Run() error

Run executes the completion command

type ConsoleOptions

type ConsoleOptions struct {
	get.GetURLOptions

	OnlyViewURL     bool
	ClassicMode     bool
	JenkinsSelector opts.JenkinsSelectorOptions
}

type ContextOptions

type ContextOptions struct {
	*opts.CommonOptions

	Filter string
}

func (*ContextOptions) PickContext

func (o *ContextOptions) PickContext(names []string, defaultValue string) (string, error)

func (*ContextOptions) Run

func (o *ContextOptions) Run() error

type DiagnoseOptions

type DiagnoseOptions struct {
	*opts.CommonOptions
	Namespace string
	Show      []string
}

func (*DiagnoseOptions) Run

func (o *DiagnoseOptions) Run() error

type EnvironmentOptions

type EnvironmentOptions struct {
	*opts.CommonOptions
}

func (*EnvironmentOptions) PickNamespace

func (o *EnvironmentOptions) PickNamespace(client kubernetes.Interface, defaultNamespace string) (string, error)

func (*EnvironmentOptions) Run

func (o *EnvironmentOptions) Run() error

type LogsOptions

type LogsOptions struct {
	*opts.CommonOptions

	Container       string
	Namespace       string
	Environment     string
	Filter          string
	Label           string
	EditEnvironment bool
}

func (*LogsOptions) Run

func (o *LogsOptions) Run() error

type MetricsOptions

type MetricsOptions struct {
	*opts.CommonOptions

	Namespace string
	Filter    string
	Duration  string
	Selector  string
	Metric    string
}

func (*MetricsOptions) Run

func (o *MetricsOptions) Run() error

type OpenOptions

type OpenOptions struct {
	ConsoleOptions
}

func (*OpenOptions) Run

func (o *OpenOptions) Run() error

type PluginHandler

type PluginHandler interface {
	// Lookup receives a potential filename and returns
	// a full or relative path to an executable, if one
	// exists at the given filename, or an error.
	Lookup(filename string) (string, error)
	// Execute receives an executable's filepath, a slice
	// of arguments, and a slice of environment variables
	// to relay to the executable.
	Execute(executablePath string, cmdArgs, environment []string) error
}

PluginHandler is capable of parsing command line arguments and performing executable filename lookups to search for valid plugin files, and execute found plugins.

type PromptOptions

type PromptOptions struct {
	*opts.CommonOptions

	NoLabel  bool
	ShowIcon bool

	Prefix    string
	Label     string
	Separator string
	Divider   string
	Suffix    string

	LabelColor     []string
	NamespaceColor []string
	ContextColor   []string
}

PromptOptions containers the CLI options

func (*PromptOptions) Run

func (o *PromptOptions) Run() error

Run implements this command

type RepoOptions

type RepoOptions struct {
	*opts.CommonOptions

	Dir         string
	OnlyViewURL bool
	Quiet       bool
}

func (*RepoOptions) Run

func (o *RepoOptions) Run() error

type ScanClusterOptions

type ScanClusterOptions struct {
	ScanOptions

	Output string
}

ScanClusterOptions the options for 'scan cluster' command

func (*ScanClusterOptions) Run

func (o *ScanClusterOptions) Run() error

Run executes the "scan cluster" command

type ScanOptions

type ScanOptions struct {
	*opts.CommonOptions
}

Scan Options contains the command line options for scan commands

func (*ScanOptions) Run

func (o *ScanOptions) Run() error

Run executes the scan commands

type ShellOptions

type ShellOptions struct {
	*opts.CommonOptions

	Filter string
}

func (*ShellOptions) PickContext

func (o *ShellOptions) PickContext(names []string, defaultValue string) (string, error)

func (*ShellOptions) Run

func (o *ShellOptions) Run() error

type StatusOptions

type StatusOptions struct {
	*opts.CommonOptions
	// contains filtered or unexported fields
}

func (*StatusOptions) Run

func (o *StatusOptions) Run() error

type TeamOptions

type TeamOptions struct {
	*opts.CommonOptions
}

func (*TeamOptions) Run

func (o *TeamOptions) Run() error

type VersionOptions

type VersionOptions struct {
	*opts.CommonOptions

	Container      string
	Namespace      string
	HelmTLS        bool
	NoVersionCheck bool
	NoVerify       bool
}

func (*VersionOptions) GetOsVersion

func (o *VersionOptions) GetOsVersion() (string, error)

GetOsVersion returns a human friendly string of the current OS in the case of an error this still returns a valid string for the details that can be found.

func (*VersionOptions) Run

func (o *VersionOptions) Run() error

Jump to

Keyboard shortcuts

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