Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetVerifiedPublisherFlag ¶ added in v0.5.0
func SetVerifiedPublisherFlag(svc *Services, r *hub.Repository, mdFile string) error
SetVerifiedPublisherFlag sets the repository verified publisher flag for the repository provided when needed.
Types ¶
type DBErrorsCollector ¶
type DBErrorsCollector struct {
// contains filtered or unexported fields
}
DBErrorsCollector is in charge of collecting errors that happen while repositories are being processed. Once all the processing is done, the collected errors can be flushed, which will store them in the database.
func NewDBErrorsCollector ¶
func NewDBErrorsCollector( ctx context.Context, repoManager hub.RepositoryManager, repos []*hub.Repository, ) *DBErrorsCollector
NewDBErrorsCollector creates a new DBErrorsCollector instance.
func (*DBErrorsCollector) Append ¶
func (c *DBErrorsCollector) Append(repositoryID string, err error)
Append adds the error provided to the repository's list of errors.
func (*DBErrorsCollector) Flush ¶
func (c *DBErrorsCollector) Flush()
Flush aggregates all errors collected per repository as a single text and stores it in the database.
type ErrorsCollector ¶
ErrorsCollector interface defines the methods that an errors collector implementation should provide.
type ErrorsCollectorMock ¶
ErrorsCollectorMock is mock ErrorsCollector implementation.
func (*ErrorsCollectorMock) Append ¶
func (m *ErrorsCollectorMock) Append(repositoryID string, err error)
Append implements the ErrorsCollector interface.
func (*ErrorsCollectorMock) Flush ¶
func (m *ErrorsCollectorMock) Flush()
Flush implements the ErrorsCollector interface.
type HTTPGetter ¶ added in v0.5.0
HTTPGetter defines the methods an HTTPGetter implementation must provide.
type HTTPGetterMock ¶ added in v0.5.0
HTTPGetterMock is a mock HTTPGetter implementation.
type New ¶ added in v0.4.0
type New func(svc *Services, r *hub.Repository, opts ...func(t Tracker)) Tracker
New represents a function that creates new repository trackers. Each tracker is in charge of processing a given repository, and based on the concurrency configured, the tracker cmd may run multiple Tracker instances concurrently.
type Services ¶ added in v0.4.0
type Services struct { Ctx context.Context Cfg *viper.Viper Rc hub.RepositoryCloner Rm hub.RepositoryManager Pm hub.PackageManager Il hub.HelmIndexLoader Is img.Store Ec ErrorsCollector Hg HTTPGetter }
Services represents a set of services that must be provided to a Tracker instance so that it can perform its tasks.