Documentation ¶
Index ¶
- Variables
- func CompleteControlPlaneApplicationBundle(f cmdutil.Factory) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
- func CompleteKubernetesClusterApplicationBundle(f cmdutil.Factory) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
- func CompleteProject(f cmdutil.Factory) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
- func RequiredStringVar(cmd *cobra.Command, p *string, name, value, usage string)
- func RequiredStringVarWithCompletion(cmd *cobra.Command, p *string, name, value, usage string, ...)
- func RequiredVar(cmd *cobra.Command, p pflag.Value, name, usage string)
- func StringVarWithCompletion(cmd *cobra.Command, p *string, name, value, usage string, ...)
- type ClusterFlags
- type ControlPlaneFlags
- func (o *ControlPlaneFlags) AddFlags(f cmdutil.Factory, cmd *cobra.Command)
- func (o *ControlPlaneFlags) CompleteCluster(f cmdutil.Factory) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
- func (o *ControlPlaneFlags) GetControlPlaneNamespace(ctx context.Context, client unikorn.Interface) (string, error)
- type DeleteFlags
- type IPNetSliceFlag
- type ProjectFlags
- func (o *ProjectFlags) AddFlags(f cmdutil.Factory, cmd *cobra.Command)
- func (o *ProjectFlags) CompleteControlPlane(f cmdutil.Factory) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
- func (o *ProjectFlags) GetProjectNamespace(ctx context.Context, client unikorn.Interface) (string, error)
- type QuantityFlag
- type SemverFlag
Constants ¶
This section is empty.
Variables ¶
var ( errors.New("resource unavailable") // ErrNamespace is for when the resource status doesn't contain a namespace. ErrNamespace = errors.New("namespace error") )ErrUnavailable =
Functions ¶
func CompleteControlPlaneApplicationBundle ¶
func CompleteControlPlaneApplicationBundle(f cmdutil.Factory) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
CompleteControlPlaneApplicationBundle provides tab completion for application bundles.
func CompleteKubernetesClusterApplicationBundle ¶
func CompleteKubernetesClusterApplicationBundle(f cmdutil.Factory) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
CompleteKubernetesClusterApplicationBundle provides tab completion for application bundles.
func CompleteProject ¶
func CompleteProject(f cmdutil.Factory) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
CompleteProject provides tab completion for the specified resource type.
func RequiredStringVar ¶
RequireStringdVar registers a string flag marked as required.
func RequiredStringVarWithCompletion ¶
func RequiredStringVarWithCompletion(cmd *cobra.Command, p *string, name, value, usage string, f func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective))
RequiredStringVarWithCompletion registers a string flag marked as required and with a completion function.
func RequiredVar ¶
String returns the current value. RequiredVar registers a generic flag marked as required.
Types ¶
type ClusterFlags ¶
type ClusterFlags struct { // ControlPlaneFlags define the project and control plane for a cluster. ControlPlaneFlags // Cluster defines the cluster a resource belongs to. Cluster string // Indicates whether the cluster parameter is required by the CLI. ClusterRequired bool }
ClusterFlags are flags for a cluster scoped resource. Unlike projects and control planes there is a 1:* cardinality so they aren't required.
type ControlPlaneFlags ¶
type ControlPlaneFlags struct { // ProjectFlags define the project for a control plane. ProjectFlags // ControlPlane defines the control plane a resource is under. ControlPlane string }
ControlPlaneFlags are required flags for a project scoped resource.
func (*ControlPlaneFlags) AddFlags ¶
func (o *ControlPlaneFlags) AddFlags(f cmdutil.Factory, cmd *cobra.Command)
AddFlags adds the flags to a cobra command.
func (*ControlPlaneFlags) CompleteCluster ¶
func (o *ControlPlaneFlags) CompleteCluster(f cmdutil.Factory) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
CompleteCluster provides tab completion for the specified resource type.
func (*ControlPlaneFlags) GetControlPlaneNamespace ¶
func (o *ControlPlaneFlags) GetControlPlaneNamespace(ctx context.Context, client unikorn.Interface) (string, error)
GetControlPlaneNamespace figures out the namespace associated with a project's control plane.
type DeleteFlags ¶
type DeleteFlags struct { // All defines whether to delete all resources. All bool }
DeleteFlags define common deletion options.
type IPNetSliceFlag ¶
IPNetSliceFlag provides a way to accumulate IP networks.
func (*IPNetSliceFlag) Set ¶
func (s *IPNetSliceFlag) Set(in string) error
Set sets the value and does any error checking.
func (IPNetSliceFlag) String ¶
func (s IPNetSliceFlag) String() string
String returns the current value.
func (IPNetSliceFlag) Type ¶
func (s IPNetSliceFlag) Type() string
Type returns the human readable type information.
type ProjectFlags ¶
type ProjectFlags struct { // project defines the project a resource is under. Project string }
ProjectFlags are required flags for a project scoped resource.
func (*ProjectFlags) AddFlags ¶
func (o *ProjectFlags) AddFlags(f cmdutil.Factory, cmd *cobra.Command)
AddFlags adds the flags to a cobra command.
func (*ProjectFlags) CompleteControlPlane ¶
func (o *ProjectFlags) CompleteControlPlane(f cmdutil.Factory) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
CompleteControlPlane provides tab completion for the specified resource type.
func (*ProjectFlags) GetProjectNamespace ¶
func (o *ProjectFlags) GetProjectNamespace(ctx context.Context, client unikorn.Interface) (string, error)
GetProjectNamespace figures out the namespace associated with a project.
type QuantityFlag ¶
QuantityFlag provides parsing and type checking of quanities.
func (*QuantityFlag) Set ¶
func (s *QuantityFlag) Set(in string) error
Set sets the value and does any error checking.
func (QuantityFlag) String ¶
func (s QuantityFlag) String() string
String returns the current value.
func (QuantityFlag) Type ¶
func (s QuantityFlag) Type() string
Type returns the human readable type information.
type SemverFlag ¶
type SemverFlag struct { // Semver specifies a default if set, and can be overridden by // a call to Set(). Semver string }
SemverFlag provides parsing and type checking of semantic versions.
func (*SemverFlag) Set ¶
func (s *SemverFlag) Set(in string) error
Set sets the value and does any error checking.
func (SemverFlag) Type ¶
func (s SemverFlag) Type() string
Type returns the human readable type information.