Documentation ¶
Index ¶
- Variables
- func NewCmdTarget(f util.Factory, ioStreams util.IOStreams) *cobra.Command
- func NewCmdTargetControlPlane(f util.Factory, ioStreams util.IOStreams) *cobra.Command
- func NewCmdTargetGarden(f util.Factory, ioStreams util.IOStreams) *cobra.Command
- func NewCmdTargetProject(f util.Factory, ioStreams util.IOStreams) *cobra.Command
- func NewCmdTargetSeed(f util.Factory, ioStreams util.IOStreams) *cobra.Command
- func NewCmdTargetShoot(f util.Factory, ioStreams util.IOStreams) *cobra.Command
- func NewCmdUnset(f util.Factory, ioStreams util.IOStreams) *cobra.Command
- func NewCmdView(f util.Factory, ioStreams util.IOStreams) *cobra.Command
- func ValidateKind(kind TargetKind) error
- type TargetKind
- type TargetOptions
- type UnsetOptions
- type ViewOptions
Constants ¶
This section is empty.
Variables ¶
var AllTargetKinds = []TargetKind{TargetKindGarden, TargetKindProject, TargetKindSeed, TargetKindShoot, TargetKindPattern, TargetKindControlPlane}
Functions ¶
func NewCmdTarget ¶
NewCmdTarget returns a new target command.
func NewCmdTargetControlPlane ¶
NewCmdTargetControlPlane returns a new target control plane command.
func NewCmdTargetGarden ¶
NewCmdTargetGarden returns a new target garden command.
func NewCmdTargetProject ¶
NewCmdTargetProject returns a new target project command.
func NewCmdTargetSeed ¶
NewCmdTargetSeed returns a new target seed command.
func NewCmdTargetShoot ¶
NewCmdTargetShoot returns a new target shoot command.
func NewCmdUnset ¶
NewCmdUnset returns a new (target) unset command.
func NewCmdView ¶
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) 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) 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 ¶
ViewOptions is a struct to support view command.