Documentation
¶
Index ¶
- Constants
- Variables
- func DefExists(resourcePath, setterName string) bool
- func PerformAutoSetters(path string) error
- func SetEnvAutoSetters(root string) error
- func SetGcloudAutoSetters(path string) error
- func SetV1AutoSetter(name, value, path string) error
- func SetV2AutoSetter(name, value, root string) error
Constants ¶
View Source
const ( GcloudProject = "gcloud.core.project" GcloudProjectNumber = "gcloud.project.projectNumber" )
Variables ¶
View Source
var GetProjectNumberFromProjectID = func(projectID string) (string, error) { gcloudCmd := exec.Command("gcloud", "projects", "describe", projectID, "--format", "value(projectNumber)") b, err := gcloudCmd.Output() if err != nil { return "", errors.Wrapf(err, "failed to get project number for %s, please verify gcloud "+ "credentials are valid and try again", projectID) } return strings.TrimSpace(string(b)), nil }
Functions ¶
func DefExists ¶ added in v0.26.0
DefExists returns true if the setterName exists in Kptfile definitions
func PerformAutoSetters ¶ added in v0.35.0
func SetEnvAutoSetters ¶ added in v0.35.0
SetEnvAutoSetters auto-fills setters from the environment
func SetGcloudAutoSetters ¶ added in v0.35.0
SetGcloudAutoSetters auto-fills setters from gcloud config
func SetV1AutoSetter ¶ added in v0.34.0
SetV1AutoSetter sets the input auto setter recursively in all the sub-packages of root Sets GcloudProjectNumber as well, if input setter is GcloudProject
func SetV2AutoSetter ¶ added in v0.34.0
SetV2AutoSetter sets the input auto setter recursively in all the sub-packages of root Sets GcloudProjectNumber as well, if input setter is GcloudProject
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.