lineage

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmd added in v0.3.0

func NewCmd(streams genericclioptions.IOStreams, name, parentCmdPath string) *cobra.Command

NewCmd returns an initialized Command for the lineage command.

Types

type CmdOptions

type CmdOptions struct {
	// RequestType represents the type of the requested object.
	RequestType string
	// RequestName represents the name of the requested object.
	RequestName string
	Flags       *Flags

	Namespace   string
	Client      client.Interface
	ClientFlags *client.Flags

	Printer    lineageprinters.Interface
	PrintFlags *lineageprinters.Flags

	genericclioptions.IOStreams
}

CmdOptions contains all the options for running the lineage command.

func (*CmdOptions) Complete

func (o *CmdOptions) Complete(cmd *cobra.Command, args []string) error

Complete completes all the required options for the lineage command.

func (*CmdOptions) Run

func (o *CmdOptions) Run() error

Run implements all the necessary functionality for the lineage command.

func (*CmdOptions) Validate

func (o *CmdOptions) Validate() error

Validate validates all the required options for the lineage command.

type Flags added in v0.3.0

type Flags struct {
	AllNamespaces *bool
	Dependencies  *bool
	Depth         *uint
	ExcludeTypes  *[]string
	IncludeTypes  *[]string
	Scopes        *[]string
}

Flags composes common configuration flag structs used in the command.

func NewFlags added in v0.3.0

func NewFlags() *Flags

NewFlags returns flags associated with command configuration, with default values set.

func (*Flags) AddFlags added in v0.3.0

func (f *Flags) AddFlags(flags *pflag.FlagSet)

AddFlags receives a *pflag.FlagSet reference and binds flags related to configuration to it.

func (*Flags) Copy added in v0.3.0

func (f *Flags) Copy() Flags

Copy returns a copy of Flags for mutation.

func (*Flags) RegisterFlagCompletionFunc added in v0.4.0

func (*Flags) RegisterFlagCompletionFunc(cmd *cobra.Command, f cmdutil.Factory)

RegisterFlagCompletionFunc receives a *cobra.Command & register functions to to provide completion for flags related to configuration.

Jump to

Keyboard shortcuts

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