cmdutil

package
v1.0.0-beta.60.1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StackTraceOnErrors = "COBRA_STACK_TRACE_ON_ERRORS"

	Stdout = "stdout"
	Unwrap = "unwrap"
)

Variables

View Source
var StackOnError bool

StackOnError if true, will print a stack trace on failure.

Functions

func CheckDirectoryNotPresent

func CheckDirectoryNotPresent(outDir string) error

CheckDirectoryNotPresent returns error if the directory already exists

func FixDocs

func FixDocs(oldVal, newVal string, c *cobra.Command)

FixDocs replaces instances of old with new in the docs for c

func GetKeywordsFromFlag

func GetKeywordsFromFlag(cmd *cobra.Command) []string

func InstallResourceGroupCRD

func InstallResourceGroupCRD(ctx context.Context, f util.Factory) error

InstallResourceGroupCRD will install the ResourceGroup CRD into the cluster. The function will block until the CRD is either installed and established, or an error was encountered. If the CRD could not be installed, an error of the type ResourceGroupCRDInstallError will be returned.

func PrintErrorStacktrace

func PrintErrorStacktrace() bool

func VerifyResourceGroupCRD

func VerifyResourceGroupCRD(f util.Factory) error

VerifyResourceGroupCRD verifies that the ResourceGroupCRD exists in the cluster. If it doesn't an error of type NoResourceGroupCRDError was returned.

func WriteFnOutput

func WriteFnOutput(dest, content string, fromStdin bool, w io.Writer) error

WriteFnOutput writes the output resources of function commands to provided destination

func WriteToOutput

func WriteToOutput(r io.Reader, w io.Writer, outDir string) error

WriteToOutput reads the input from r and writes the output to either w or outDir

Types

type NoResourceGroupCRDError

type NoResourceGroupCRDError struct{}

NoResourceGroupCRDError is an error type that will be used when a cluster doesn't have the ResourceGroup CRD installed.

func (*NoResourceGroupCRDError) Error

type Options

type Options struct {
	*genericclioptions.ConfigFlags
	AllNamespaces bool
}

Get holds options for a list/get operation

func (*Options) AddFlags

func (o *Options) AddFlags(cmd *cobra.Command)

func (*Options) ResourceBuilder

func (o *Options) ResourceBuilder() (*resource.Builder, error)

type ResourceGroupCRDInstallError

type ResourceGroupCRDInstallError struct {
	Err error
}

ResourceGroupCRDInstallError is an error that will be returned if the ResourceGroup CRD can't be applied to the cluster.

func (*ResourceGroupCRDInstallError) Error

func (*ResourceGroupCRDInstallError) Unwrap

func (i *ResourceGroupCRDInstallError) Unwrap() error

type ResourceGroupCRDNotLatestError

type ResourceGroupCRDNotLatestError struct {
	Err error
}

ResourceGroupCRDNotLatestError is an error type that will be used when a cluster has a ResourceGroup CRD that doesn't match the latest declaration.

func (*ResourceGroupCRDNotLatestError) Error

Jump to

Keyboard shortcuts

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