Documentation ¶
Index ¶
- type Collection
- type Entry
- func (a *Entry) ConflictInSpecifiedRepositories(err error)
- func (a *Entry) ConflictWithAlreadyRegisteredAddons(err error)
- func (a *Entry) FetchingError(err error)
- func (a *Entry) IsComplete() bool
- func (a *Entry) IsReady() bool
- func (a *Entry) LoadingError(err error)
- func (a *Entry) RegisteringError(err error)
- type Repository
- type Template
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct {
Repositories []*Repository
}
Collection keeps and process collection of Repository
func NewRepositoryCollection ¶
func NewRepositoryCollection() *Collection
NewRepositoryCollection returns pointer to RepositoryCollection
func (*Collection) AddRepository ¶
func (rc *Collection) AddRepository(repo *Repository)
AddRepository adds new Repository to RepositoryCollection
func (*Collection) IsRepositoriesFailed ¶
func (rc *Collection) IsRepositoriesFailed() bool
IsRepositoriesFailed informs if any of repositories in collection is in failed status
func (*Collection) ReadyAddons ¶
func (rc *Collection) ReadyAddons() []*Entry
ReadyAddons returns all addons from all repositories which ready status
func (*Collection) ReviseAddonDuplicationInRepository ¶
func (rc *Collection) ReviseAddonDuplicationInRepository()
ReviseAddonDuplicationInRepository checks all completed addons (addons without fetch/load error) they have no ID conflict with other addons in other or the same repository
func (*Collection) ReviseAddonDuplicationInStorage ¶
func (rc *Collection) ReviseAddonDuplicationInStorage(addonsList []internal.CommonAddon)
ReviseAddonDuplicationInStorage checks all completed addons (addons without fetch/load error) they have no name:version conflict with other AddonConfiguration
type Entry ¶
type Entry struct { ID string URL string AddonWithCharts *internal.AddonWithCharts }
Entry is a wraper for AddonWithCharts element with extra fields like URL or ID
func NewRepositoryEntry ¶
NewRepositoryEntry returns pointer to new Entry based on name, version and url
func (*Entry) ConflictInSpecifiedRepositories ¶
ConflictInSpecifiedRepositories sets addons as failed, sets addon reason as ConflictInSpecifiedRepositories
func (*Entry) ConflictWithAlreadyRegisteredAddons ¶
ConflictWithAlreadyRegisteredAddons sets addons as failed, sets addon reason as ConflictWithAlreadyRegisteredAddons
func (*Entry) FetchingError ¶
FetchingError sets addons as failed, sets addon reason as FetchingError
func (*Entry) IsComplete ¶
IsComplete informs RepositoryEntry has no fetching/loading error, what means own ID (from addon)
func (*Entry) LoadingError ¶
LoadingError sets addons as failed, sets addon reason as LoadingError
func (*Entry) RegisteringError ¶
RegisteringError sets addons as failed, sets addon reason as RegisteringError
type Repository ¶
type Repository struct { Repository addonsv1alpha1.StatusRepository Addons []*Entry }
Repository is a wraper for StatusRepository
func NewAddonsRepository ¶
func NewAddonsRepository(url string) *Repository
NewAddonsRepository returns pointer to new Repository with url and ready status
func (*Repository) FetchingError ¶
func (ar *Repository) FetchingError(err error)
FetchingError sets StatusRepository as failed with URLFetchingError as a reason
func (*Repository) HasFailedAddons ¶
func (ar *Repository) HasFailedAddons() bool
HasFailedAddons returns true if any addon in the repository has status Failed
func (*Repository) IsFailed ¶
func (ar *Repository) IsFailed() bool
IsFailed checks is StatusRepository is in failed state
func (*Repository) TemplatingError ¶
func (ar *Repository) TemplatingError(err error)
TemplatingError sets StatusRepository as failed with URLTemplatingError as a reason
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
Template contains URL templating from secret logic
func NewTemplate ¶
NewTemplate returns a new Template service
func (*Template) SetNamespace ¶
SetNamespace sets service's working namespace
func (*Template) TemplateURL ¶
func (t *Template) TemplateURL(repository v1alpha1.SpecRepository) (string, error)
TemplateURL returns an URL to the repository with filled template fields