Documentation ¶
Index ¶
- func NewMockCacheDeleteFn(err error) func() error
- func NewMockCacheGetFn(rc io.ReadCloser, err error) func() (io.ReadCloser, error)
- func NewMockCacheHasFn(has bool) func() bool
- func NewMockCacheStoreFn(err error) func(s string, rc io.ReadCloser) error
- func NewMockFetchFn(img v1.Image, err error) func() (v1.Image, error)
- func NewMockHeadFn(d *v1.Descriptor, err error) func() (*v1.Descriptor, error)
- func NewMockTagsFn(tags []string, err error) func() ([]string, error)
- type MockCache
- type MockFetcher
- func (m *MockFetcher) Fetch(ctx context.Context, ref name.Reference, secrets ...string) (v1.Image, error)
- func (m *MockFetcher) Head(ctx context.Context, ref name.Reference, secrets ...string) (*v1.Descriptor, error)
- func (m *MockFetcher) Tags(ctx context.Context, ref name.Reference, secrets ...string) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMockCacheDeleteFn ¶
NewMockCacheDeleteFn creates a new MockDelete function for MockCache.
func NewMockCacheGetFn ¶
func NewMockCacheGetFn(rc io.ReadCloser, err error) func() (io.ReadCloser, error)
NewMockCacheGetFn creates a new MockGet function for MockCache.
func NewMockCacheHasFn ¶ added in v1.7.0
NewMockCacheHasFn creates a new MockGet function for MockCache.
func NewMockCacheStoreFn ¶
func NewMockCacheStoreFn(err error) func(s string, rc io.ReadCloser) error
NewMockCacheStoreFn creates a new MockStore function for MockCache.
func NewMockFetchFn ¶
NewMockFetchFn creates a new MockFetch function for MockFetcher.
func NewMockHeadFn ¶
func NewMockHeadFn(d *v1.Descriptor, err error) func() (*v1.Descriptor, error)
NewMockHeadFn creates a new MockHead function for MockFetcher.
Types ¶
type MockCache ¶
type MockCache struct { MockHas func() bool MockGet func() (io.ReadCloser, error) MockStore func(s string, rc io.ReadCloser) error MockDelete func() error }
MockCache is a mock Cache.
func (*MockCache) Get ¶
func (c *MockCache) Get(string) (io.ReadCloser, error)
Get calls the underlying MockGet.
type MockFetcher ¶
type MockFetcher struct { MockFetch func() (v1.Image, error) MockHead func() (*v1.Descriptor, error) MockTags func() ([]string, error) }
MockFetcher is a mock fetcher.
func (*MockFetcher) Fetch ¶
func (m *MockFetcher) Fetch(ctx context.Context, ref name.Reference, secrets ...string) (v1.Image, error)
Fetch calls the underlying MockFetch.
Click to show internal directories.
Click to hide internal directories.