Documentation ¶
Index ¶
- type Downloader
- type DownloaderMock
- func (mmDownload *DownloaderMock) Download(module coordinates.SerialModule) (err error)
- func (mmDownload *DownloaderMock) DownloadAfterCounter() uint64
- func (mmDownload *DownloaderMock) DownloadBeforeCounter() uint64
- func (m *DownloaderMock) MinimockDownloadDone() bool
- func (m *DownloaderMock) MinimockDownloadInspect()
- func (m *DownloaderMock) MinimockFinish()
- func (m *DownloaderMock) MinimockWait(timeout mm_time.Duration)
- type DownloaderMockDownloadExpectation
- type DownloaderMockDownloadParams
- type DownloaderMockDownloadResults
- type Ranges
- type RegistryAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Downloader ¶
type Downloader interface {
Download(module coordinates.SerialModule) error
}
func New ¶
func New( proxyClient zips.ProxyClient, upstreamClient zips.UpstreamClient, resolver upstream.Resolver, store store.ZipStore, index store.Index, emitter stats.Sender, ) Downloader
type DownloaderMock ¶
type DownloaderMock struct { DownloadMock mDownloaderMockDownload // contains filtered or unexported fields }
DownloaderMock implements Downloader
func NewDownloaderMock ¶
func NewDownloaderMock(t minimock.Tester) *DownloaderMock
NewDownloaderMock returns a mock for Downloader
func (*DownloaderMock) Download ¶
func (mmDownload *DownloaderMock) Download(module coordinates.SerialModule) (err error)
Download implements Downloader
func (*DownloaderMock) DownloadAfterCounter ¶
func (mmDownload *DownloaderMock) DownloadAfterCounter() uint64
DownloadAfterCounter returns a count of finished DownloaderMock.Download invocations
func (*DownloaderMock) DownloadBeforeCounter ¶
func (mmDownload *DownloaderMock) DownloadBeforeCounter() uint64
DownloadBeforeCounter returns a count of DownloaderMock.Download invocations
func (*DownloaderMock) MinimockDownloadDone ¶
func (m *DownloaderMock) MinimockDownloadDone() bool
MinimockDownloadDone returns true if the count of the Download invocations corresponds the number of defined expectations
func (*DownloaderMock) MinimockDownloadInspect ¶
func (m *DownloaderMock) MinimockDownloadInspect()
MinimockDownloadInspect logs each unmet expectation
func (*DownloaderMock) MinimockFinish ¶
func (m *DownloaderMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*DownloaderMock) MinimockWait ¶
func (m *DownloaderMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
type DownloaderMockDownloadExpectation ¶
type DownloaderMockDownloadExpectation struct { Counter uint64 // contains filtered or unexported fields }
DownloaderMockDownloadExpectation specifies expectation struct of the Downloader.Download
func (*DownloaderMockDownloadExpectation) Then ¶
func (e *DownloaderMockDownloadExpectation) Then(err error) *DownloaderMock
Then sets up Downloader.Download return parameters for the expectation previously defined by the When method
type DownloaderMockDownloadParams ¶
type DownloaderMockDownloadParams struct {
// contains filtered or unexported fields
}
DownloaderMockDownloadParams contains parameters of the Downloader.Download
type DownloaderMockDownloadResults ¶
type DownloaderMockDownloadResults struct {
// contains filtered or unexported fields
}
DownloaderMockDownloadResults contains results of the Downloader.Download
type Ranges ¶
type Ranges = coordinates.RangeIDs
Range is an alias of coordinates.RangeIDs for brevity.
type RegistryAPI ¶
type RegistryAPI interface {
ModulesNeeded(Ranges) ([]coordinates.SerialModule, error)
}
RegistryAPI is used to issue API request from the registry
func NewRegistryAPI ¶
func NewRegistryAPI( registryClient registry.Client, index store.Index, ) RegistryAPI