cliutils

package
v0.5.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckForUpdate added in v0.1.0

func CheckForUpdate() (*string, error)

CheckForUpdate determines the new version by fetching the latest release info. If no newer version exists, it returns nil.

func CheckPackageOperatorVersion added in v0.1.0

func CheckPackageOperatorVersion(ctx context.Context) error

func DependencyManager added in v0.5.0

func DependencyManager(ctx context.Context) *dependency.DependendcyManager

func ExitFromSignal added in v0.2.0

func ExitFromSignal(sig *os.Signal)

ExitFromSignal ends the process with exit code 1

func ExitSuccess added in v0.2.0

func ExitSuccess()

ExitSuccess shuts down with exit code 0

func ExitWithError added in v0.2.0

func ExitWithError()

ExitWithError ends the process with exit code 1

func GetInputStr added in v0.5.0

func GetInputStr(label string) (input string)

func GetOption added in v0.5.0

func GetOption(label string, options []string) (string, error)

func GetOptionWithDefault added in v0.5.0

func GetOptionWithDefault(label string, options []string, defaultOption *string) (string, error)

func KubernetesClient added in v0.5.0

func KubernetesClient(ctx context.Context) *kubernetes.Clientset

func MarkdownRenderer added in v0.3.0

func MarkdownRenderer() renderer.NodeRenderer

func OpenInBrowser added in v0.0.2

func OpenInBrowser(url string) error

func PackageClient added in v0.5.0

func PackageClient(ctx context.Context) client.PackageV1Alpha1Client

func PrintTable added in v0.5.0

func PrintTable[T any](
	w io.Writer,
	rowItems []T,
	columns []string,
	getColsOfRow func(item T) []string,
) error

func RepositoryClientset added in v0.5.0

func RepositoryClientset(ctx context.Context) repoclient.RepoClientset

func RequireBootstrapped added in v0.0.3

func RequireBootstrapped(ctx context.Context, cfg *rest.Config, rawCfg *api.Config)

func RequireConfig

func RequireConfig(filePath string) (*rest.Config, *api.Config)

func SetupClientContext

func SetupClientContext(requireBootstrapped bool, skipUpdateCheck *bool) func(cmd *cobra.Command, args []string)

func UpdateFetch added in v0.0.3

func UpdateFetch()

func ValueResolver added in v0.5.0

func ValueResolver(ctx context.Context) *manifestvalues.Resolver

func YesNoPrompt

func YesNoPrompt(label string, defaultChoice bool) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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