target

package
v0.0.0-...-15895d8 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewCmdTarget

func NewCmdTarget(f util.Factory, ioStreams util.IOStreams) *cobra.Command

NewCmdTarget returns a new target command.

func NewCmdTargetControlPlane

func NewCmdTargetControlPlane(f util.Factory, ioStreams util.IOStreams) *cobra.Command

NewCmdTargetControlPlane returns a new target control plane command.

func NewCmdTargetGarden

func NewCmdTargetGarden(f util.Factory, ioStreams util.IOStreams) *cobra.Command

NewCmdTargetGarden returns a new target garden command.

func NewCmdTargetProject

func NewCmdTargetProject(f util.Factory, ioStreams util.IOStreams) *cobra.Command

NewCmdTargetProject returns a new target project command.

func NewCmdTargetSeed

func NewCmdTargetSeed(f util.Factory, ioStreams util.IOStreams) *cobra.Command

NewCmdTargetSeed returns a new target seed command.

func NewCmdTargetShoot

func NewCmdTargetShoot(f util.Factory, ioStreams util.IOStreams) *cobra.Command

NewCmdTargetShoot returns a new target shoot command.

func NewCmdUnset

func NewCmdUnset(f util.Factory, ioStreams util.IOStreams) *cobra.Command

NewCmdUnset returns a new (target) unset command.

func NewCmdView

func NewCmdView(f util.Factory, ioStreams util.IOStreams) *cobra.Command

NewCmdView returns a new target view command.

func ValidateKind

func ValidateKind(kind TargetKind) error

Types

type TargetKind

type TargetKind string

TargetKind is representing the type of things that can be targeted by this cobra command. While this may sound stuttery, the alternative of just calling it "Kind" is even worse, hence the nolint.

const (
	TargetKindGarden       TargetKind = "garden"
	TargetKindProject      TargetKind = "project"
	TargetKindSeed         TargetKind = "seed"
	TargetKindShoot        TargetKind = "shoot"
	TargetKindPattern      TargetKind = "pattern"
	TargetKindControlPlane TargetKind = "control-plane"
)

type TargetOptions

type TargetOptions struct {
	base.Options

	// Kind is the target kind, for example "garden" or "seed"
	Kind TargetKind
	// TargetName is the object name of the targeted kind
	TargetName string
}

TargetOptions is a struct to support target command.

func NewTargetOptions

func NewTargetOptions(ioStreams util.IOStreams) *TargetOptions

NewTargetOptions returns initialized TargetOptions.

func (*TargetOptions) Complete

func (o *TargetOptions) Complete(f util.Factory, _ *cobra.Command, args []string) error

Complete adapts from the command line args to the data required.

func (*TargetOptions) Run

func (o *TargetOptions) Run(f util.Factory) error

Run executes the command.

func (*TargetOptions) Validate

func (o *TargetOptions) Validate() error

Validate validates the provided options.

type UnsetOptions

type UnsetOptions struct {
	base.Options

	// Kind is the target kind, for example "garden" or "seed"
	Kind TargetKind
}

UnsetOptions is a struct to support unset command.

func (*UnsetOptions) Complete

func (o *UnsetOptions) Complete(_ util.Factory, _ *cobra.Command, args []string) error

Complete adapts from the command line args to the data required.

func (*UnsetOptions) Run

func (o *UnsetOptions) Run(f util.Factory) error

Run executes the command.

func (*UnsetOptions) Validate

func (o *UnsetOptions) Validate() error

Validate validates the provided options.

type ViewOptions

type ViewOptions struct {
	base.Options
}

ViewOptions is a struct to support view command.

Jump to

Keyboard shortcuts

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