resource

package
v0.45.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatMessage

func FormatMessage() string

FormatMessage formats the available resources that the user can use

func GetKind

func GetKind(res string) (modelV1.Kind, error)

GetKind tries to find the kind from the given string. It returns an error if the kind is not managed, or no alias exists. This method is designed to be called in the cmds improving the readability of the kind arguments parsing.

func GetProject

func GetProject(metadata modelAPI.Metadata, defaultProject string) string

GetProject determinate the project we should use to perform an action on the current resource with the following logic: if the value is defined in the metadata, then we use this one. If it's not the case we consider the one given through the flag --project. If the flag is not used, then we use the one defined in the global configuration. These two last cases are usually already handled by the command itself during the `Complete` step.

func HandleSuccessMessage

func HandleSuccessMessage(writer io.Writer, kind modelV1.Kind, project string, globalResourceMessage string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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