func (ar *Repository) TemplatingError(err error) {
	reason := addonsv1alpha1.RepositoryURLTemplatingError
	ar.Failed()
	ar.Repository.Reason = reason
	ar.Repository.Message = fmt.Sprintf(reason.Message(), err.Error())
}
TemplatingError sets StatusRepository as failed with URLTemplatingError as a reason
package repository
import (
	"fmt"
	addonsv1alpha1 "github.com/kyma-project/helm-broker/pkg/apis/addons/v1alpha1"
)
type Repository struct {
	Repository addonsv1alpha1.StatusRepository
	Addons     []*Entry
}
func NewAddonsRepository(url string) *Repository {
	return &Repository{
		Repository: addonsv1alpha1.StatusRepository{
			URL:    url,
			Status: addonsv1alpha1.RepositoryStatusReady,
		},
	}
}
func (ar *Repository) Failed() {
	ar.Repository.Status = addonsv1alpha1.RepositoryStatusFailed
}
func (ar *Repository) IsFailed() bool {
	return ar.Repository.Status == addonsv1alpha1.RepositoryStatusFailed
}
func (ar *Repository) HasFailedAddons() bool {
	for _, addon := range ar.Addons {
		if !addon.IsReady() {
			return true
		}
	}
	return false
}
func (ar *Repository) FetchingError(err error) {
	reason := addonsv1alpha1.RepositoryURLFetchingError
	ar.Failed()
	ar.Repository.Reason = reason
	ar.Repository.Message = fmt.Sprintf(reason.Message(), err.Error())
}
func (ar *Repository) IsFetchingError() bool {
	return ar.Repository.Status == addonsv1alpha1.RepositoryStatusFailed &&
		ar.Repository.Reason == addonsv1alpha1.RepositoryURLFetchingError
}