func (rid *ImageRepoDetails) Validate() error {
	if rid.Repository == "" {
		return errors.NotValidf("empty repository")
	}
	_, err := reference.ParseNormalizedNamed(rid.Repository)
	if err != nil {
		return errors.NewNotValid(err, fmt.Sprintf("docker image path %q", rid.Repository))
	}
	if err := rid.BasicAuthConfig.Validate(); err != nil {
		return errors.Annotatef(err, "validating basic auth config for repository %q", rid.Repository)
	}
	if err := rid.TokenAuthConfig.Validate(); err != nil {
		return errors.Annotatef(err, "validating token auth config for repository %q", rid.Repository)
	}
	return nil
}
// Validate validates the spec.
Validate validates the spec.
// Validate validates the spec .
func (rid *ImageRepoDetails) Validate() error {
	if rid.Repository == "" {
		return errors.NotValidf("empty repository")
	}
	_, err := reference.ParseNormalizedNamed(rid.Repository)
	if err != nil {
		return errors.NewNotValid(err, fmt.Sprintf("docker image path %q", rid.Repository))
	}
	if err := rid.BasicAuthConfig.Validate(); err != nil {
		return errors.Annotatef(err, "validating basic auth config for repository %q", rid.Repository)
	}
	if err := rid.TokenAuthConfig.Validate(); err != nil {
		return errors.Annotatef(err, "validating token auth config for repository %q", rid.Repository)
	}
	return nil
}
func ( rid * ImageRepoDetails ) Validate ( ) error { if rid . Repository == " " { return errors . NotValidf ( " " ) } _ , err := reference . ParseNormalizedNamed ( rid . Repository ) if err != nil { return errors . NewNotValid ( err , fmt . Sprintf ( " " , rid . Repository ) ) } if err := rid . BasicAuthConfig . Validate ( ) ; err != nil { return errors . Annotatef ( err , " " , rid . Repository ) } if err := rid . TokenAuthConfig . Validate ( ) ; err != nil { return errors . Annotatef ( err , " " , rid . Repository ) } return nil }
Validate validates the spec.
Validate validates the spec .