Documentation
¶
Index ¶
- type Image
- type ListImagesRepository
- type ListOptions
- type MockService
- func (ms MockService) AddImage(_ context.Context, i Image) error
- func (ms MockService) DeleteImage(_ context.Context, i Image) error
- func (ms MockService) ListImages(_ context.Context, lo ListOptions) ([]Image, error)
- func (ms MockService) Notify(event chan<- NotificationEvent)
- func (ms MockService) UpdateImage(_ context.Context, i Image) error
- type NotificationEvent
- type OCIRegistryService
- func (O *OCIRegistryService) AddImage(ctx context.Context, image Image) error
- func (O *OCIRegistryService) DeleteImage(ctx context.Context, image Image) error
- func (O *OCIRegistryService) ListImages(ctx context.Context, opts ListOptions) ([]Image, error)
- func (O *OCIRegistryService) Notify(event chan<- NotificationEvent)
- func (O *OCIRegistryService) UpdateImage(ctx context.Context, image Image) error
- type OciRegistryAPIClient
- type PullSecret
- type Repository
- type Service
- type Worker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Image ¶
type Image struct { ID string Registry string Name string Tag string Auth []*PullSecret }
func (Image) GetNameWithRegistry ¶
func (Image) GetNameWithoutRegistry ¶
func (Image) GetRegistryURL ¶
type ListImagesRepository ¶
type ListImagesRepository interface {
ListImages(ctx context.Context, opts ListOptions) ([]Image, error)
}
type ListOptions ¶
type MockService ¶
type MockService struct {
Add, Delete, Update, ListErr func(i Image) error
List func(lo ListOptions) ([]Image, error)
ListResp []Image
}
MockService implements the Service interface and should only be used for mocking
func (MockService) AddImage ¶
func (ms MockService) AddImage(_ context.Context, i Image) error
AddImage implements the Service interface
func (MockService) DeleteImage ¶
func (ms MockService) DeleteImage(_ context.Context, i Image) error
DeleteImage implements the Service interface
func (MockService) ListImages ¶
func (ms MockService) ListImages(_ context.Context, lo ListOptions) ([]Image, error)
ListImages implements the Service interface
func (MockService) Notify ¶
func (ms MockService) Notify(event chan<- NotificationEvent)
Notify implements the Service interface
func (MockService) UpdateImage ¶
func (ms MockService) UpdateImage(_ context.Context, i Image) error
UpdateImage implements the Service interface
type NotificationEvent ¶
type OCIRegistryService ¶
type OCIRegistryService struct {
// contains filtered or unexported fields
}
func (*OCIRegistryService) AddImage ¶
func (O *OCIRegistryService) AddImage(ctx context.Context, image Image) error
func (*OCIRegistryService) DeleteImage ¶
func (O *OCIRegistryService) DeleteImage(ctx context.Context, image Image) error
func (*OCIRegistryService) ListImages ¶
func (O *OCIRegistryService) ListImages(ctx context.Context, opts ListOptions) ([]Image, error)
func (*OCIRegistryService) Notify ¶
func (O *OCIRegistryService) Notify(event chan<- NotificationEvent)
func (*OCIRegistryService) UpdateImage ¶
func (O *OCIRegistryService) UpdateImage(ctx context.Context, image Image) error
type OciRegistryAPIClient ¶
type PullSecret ¶
func (*PullSecret) GetPassword ¶
func (p *PullSecret) GetPassword() string
func (*PullSecret) GetUsername ¶
func (p *PullSecret) GetUsername() string
type Repository ¶
type Service ¶
type Service interface { AddImage(ctx context.Context, image Image) error DeleteImage(ctx context.Context, image Image) error UpdateImage(ctx context.Context, image Image) error ListImages(ctx context.Context, opts ListOptions) ([]Image, error) Notify(event chan<- NotificationEvent) }
func NewOCIRegistryService ¶
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
func StartNewImageWorker ¶
func StartNewImageWorker(ctx context.Context, client OciRegistryAPIClient, registry, imageName string, rateLimiter ratelimit.Limiter, info chan<- NotificationEvent, repository ListImagesRepository, workerAPIRequestSleepDuration time.Duration) *Worker
Click to show internal directories.
Click to hide internal directories.