version

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdVersion

func NewCmdVersion(ctx context.Context, ioStreams genericclioptions.IOStreams) *cobra.Command

NewCmdVersion returns a cobra command for fetching versions

Types

type Options

type Options struct {
	// If true, don't try to retrieve the installed version
	ClientOnly bool

	// If true, only prints the version number.
	Short bool

	// Output is the target output format for the version string. This may be of
	// value "", "json" or "yaml".
	Output string

	VersionChecker versionchecker.Interface

	genericclioptions.IOStreams
	*factory.Factory
}

Options is a struct to support version command

func NewOptions

func NewOptions(ioStreams genericclioptions.IOStreams) *Options

NewOptions returns initialized Options

func (*Options) Complete added in v1.5.1

func (o *Options) Complete() error

Complete takes the command arguments and factory and infers any remaining options.

func (*Options) Run

func (o *Options) Run(ctx context.Context) error

Run executes version command

func (*Options) Validate

func (o *Options) Validate() error

Validate validates the provided options

type Version added in v1.5.1

type Version struct {
	ClientVersion *util.Version           `json:"clientVersion,omitempty"`
	ServerVersion *versionchecker.Version `json:"serverVersion,omitempty"`
}

Version is a struct for version information

Jump to

Keyboard shortcuts

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