prow/apis/prowjobs/v1/types.go
func (g *GCSConfiguration) Validate() error {
	if g.PathStrategy != PathStrategyLegacy && g.PathStrategy != PathStrategyExplicit && g.PathStrategy != PathStrategySingle {
		return fmt.Errorf("gcs_path_strategy must be one of %q, %q, or %q", PathStrategyLegacy, PathStrategyExplicit, PathStrategySingle)
	}
	if g.PathStrategy != PathStrategyExplicit && (g.DefaultOrg == "" || g.DefaultRepo == "") {
		return fmt.Errorf("default org and repo must be provided for GCS strategy %q", g.PathStrategy)
	}
	return nil
}
func (g *GCSConfiguration) Validate() error {
	if g.PathStrategy != PathStrategyLegacy && g.PathStrategy != PathStrategyExplicit && g.PathStrategy != PathStrategySingle {
		return fmt.Errorf("gcs_path_strategy must be one of %q, %q, or %q", PathStrategyLegacy, PathStrategyExplicit, PathStrategySingle)
	}
	if g.PathStrategy != PathStrategyExplicit && (g.DefaultOrg == "" || g.DefaultRepo == "") {
		return fmt.Errorf("default org and repo must be provided for GCS strategy %q", g.PathStrategy)
	}
	return nil
}
func ( g * GCSConfiguration ) Validate ( ) error { if g . PathStrategy != PathStrategyLegacy && g . PathStrategy != PathStrategyExplicit && g . PathStrategy != PathStrategySingle { return fmt . Errorf ( " " , PathStrategyLegacy , PathStrategyExplicit , PathStrategySingle ) } if g . PathStrategy != PathStrategyExplicit && ( g . DefaultOrg == " " || g . DefaultRepo == " " ) { return fmt . Errorf ( " " , g . PathStrategy ) } return nil }
// Validate ensures all the values set in the GCSConfiguration are valid.
Validate ensures all the values set in the GCSConfiguration are valid .