Documentation
¶
Overview ¶
Package fake contains mock Crossplane package implementations.
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 NewMockConfigStorePullSecretForFn(imageConfig, pullSecret string, err error) func(context.Context, string) (string, string, 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 MockConfigStore
- type MockFetcher
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 NewMockConfigStorePullSecretForFn ¶ added in v1.16.4
func NewMockConfigStorePullSecretForFn(imageConfig, pullSecret string, err error) func(context.Context, string) (string, string, error)
NewMockConfigStorePullSecretForFn creates a new MockPullSecretFor function for MockConfigStore.
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 MockConfigStore ¶ added in v1.16.4
type MockConfigStore struct {
MockPullSecretFor func(ctx context.Context, image string) (imageConfig string, pullSecret string, err error)
}
MockConfigStore is a mock ConfigStore.
func (*MockConfigStore) PullSecretFor ¶ added in v1.16.4
func (s *MockConfigStore) PullSecretFor(ctx context.Context, image string) (imageConfig string, pullSecret string, err error)
PullSecretFor calls the underlying MockPullSecretFor.
type MockFetcher ¶
type MockFetcher struct { MockFetch func() (v1.Image, error) MockHead func() (*v1.Descriptor, error) MockTags func() ([]string, error) }
MockFetcher is a mock fetcher.