Documentation ¶
Index ¶
- Constants
- func CheckErr(err error)
- func GetAPIVersionKindFromTrait(td corev1alpha2.TraitDefinition) (string, string)
- func GetAPIVersionKindFromWorkload(td corev1alpha2.WorkloadDefinition) (string, string)
- func GetComponent(ctx context.Context, c client.Client, componentName string, namespace string) (corev1alpha2.Component, error)
- func GetKubeClient() error
- func GetKubeConfig() string
- func GetTraitAPIVersionKind(ctx context.Context, c client.Client, namespace string, name string) (string, string, error)
- func GetTraitDefinitionByAlias(ctx context.Context, c client.Client, traitAlias string) (corev1alpha2.TraitDefinition, error)
- func GetTraitDefinitionByName(ctx context.Context, c client.Client, namespace string, traitName string) (corev1alpha2.TraitDefinition, error)
- func GetWorkloadDefinitionByAlias(ctx context.Context, c client.Client, traitAlias string) (corev1alpha2.WorkloadDefinition, error)
- func GetWorkloadDefinitionByName(ctx context.Context, c client.Client, namespace string, name string) (corev1alpha2.WorkloadDefinition, error)
- func GetWorkloadNameAliasKind(ctx context.Context, c client.Client, namespace string, workloadName string) (string, string, string)
- func HomeDir() string
- func IsCoreCRDExist(cxt context.Context, c client.Client, object runtime.Object) error
- func IsNamespaceExist(c client.Client, namespace string) bool
- func ListTraitDefinitionsByApplicationConfiguration(app corev1alpha2.ApplicationConfiguration) []corev1alpha2.TraitDefinition
- func NewNamespace(c client.Client, namespace string) error
- func Print(msg string)
- func PrintErrorMessage(errorMessage string, exitCode int)
- func PrintFlags(cmd *cobra.Command, subcmds []*cobra.Command)
- type Factory
- type IOStreams
Constants ¶
View Source
const (
DefaultErrorExitCode = 1
)
Variables ¶
This section is empty.
Functions ¶
func GetAPIVersionKindFromTrait ¶
func GetAPIVersionKindFromTrait(td corev1alpha2.TraitDefinition) (string, string)
func GetAPIVersionKindFromWorkload ¶
func GetAPIVersionKindFromWorkload(td corev1alpha2.WorkloadDefinition) (string, string)
func GetComponent ¶
func GetKubeClient ¶
func GetKubeClient() error
GetKubeClient creates a Kubernetes config and client for a given kubeconfig context.
func GetKubeConfig ¶
func GetKubeConfig() string
func GetTraitAPIVersionKind ¶
func GetTraitAPIVersionKind(ctx context.Context, c client.Client, namespace string, name string) (string, string, error)
GetTraitNameAndAlias return the name and alias of a TraitDefinition by a string which might be the trait name, the trait alias, or invalid name
func GetTraitDefinitionByAlias ¶
func GetTraitDefinitionByAlias(ctx context.Context, c client.Client, traitAlias string) (corev1alpha2.TraitDefinition, error)
func GetTraitDefinitionByName ¶
func GetTraitDefinitionByName(ctx context.Context, c client.Client, namespace string, traitName string) (corev1alpha2.TraitDefinition, error)
func GetWorkloadDefinitionByAlias ¶
func GetWorkloadDefinitionByAlias(ctx context.Context, c client.Client, traitAlias string) (corev1alpha2.WorkloadDefinition, error)
func GetWorkloadDefinitionByName ¶
func GetWorkloadDefinitionByName(ctx context.Context, c client.Client, namespace string, name string) (corev1alpha2.WorkloadDefinition, error)
func IsCoreCRDExist ¶
func ListTraitDefinitionsByApplicationConfiguration ¶
func ListTraitDefinitionsByApplicationConfiguration(app corev1alpha2.ApplicationConfiguration) []corev1alpha2.TraitDefinition
func PrintErrorMessage ¶
Types ¶
type Factory ¶
type Factory interface { genericclioptions.RESTClientGetter }
func NewFactory ¶
func NewFactory(clientGetter genericclioptions.RESTClientGetter) Factory
type IOStreams ¶
type IOStreams struct { // In think, os.Stdin In io.Reader // Out think, os.Stdout Out io.Writer // ErrOut think, os.Stderr ErrOut io.Writer }
IOStreams provides the standard names for iostreams. This is useful for embedding and for unit testing. Inconsistent and different names make it hard to read and review code
func NewTestIOStreams ¶
NewTestIOStreams returns a valid IOStreams and in, out, errout buffers for unit tests
Click to show internal directories.
Click to hide internal directories.