Documentation ¶
Index ¶
- func NewMockCacheDeleteFn(err error) func() error
- func NewMockCacheGetFn(img v1.Image, err error) func() (v1.Image, error)
- func NewMockCacheStoreFn(err error) func() 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 ¶
NewMockCacheGetFn creates a new MockGet function for MockCache.
func NewMockCacheStoreFn ¶
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 { MockGet func() (v1.Image, error) MockStore func() error MockDelete func() error }
MockCache is a mock Cache.
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.