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 NewMockConfigStoreImageVerificationConfigForFn(imageConfig string, verificationConfig *v1beta1.ImageVerification, err error) func(context.Context, string) (string, *v1beta1.ImageVerification, 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 NewMockGetFn(pkg *xpkg.Package, err error) func(context.Context, string, ...xpkg.GetOption) (*xpkg.Package, error)
- func NewMockHeadFn(d *v1.Descriptor, err error) func(name.Reference) (*v1.Descriptor, error)
- func NewMockListVersionsFn(versions []string, err error) func(context.Context, string, ...xpkg.GetOption) ([]string, error)
- func NewMockRewritePathFn(imageConfig, newPath string, err error) func(context.Context, string) (string, string, error)
- func NewMockRuntimeConfigForFn(imageConfig string, runtimeConfig *v1beta1.ImageRuntime, err error) func(context.Context, string) (string, *v1beta1.ImageRuntime, error)
- func NewMockTagsFn(tags []string, err error) func(name.Reference) ([]string, error)
- type MockCache
- type MockClient
- type MockConfigStore
- func (s *MockConfigStore) ImageVerificationConfigFor(ctx context.Context, image string) (imageConfig string, verificationConfig *v1beta1.ImageVerification, err error)
- func (s *MockConfigStore) PullSecretFor(ctx context.Context, image string) (imageConfig string, pullSecret string, err error)
- func (s *MockConfigStore) RewritePath(ctx context.Context, image string) (imageConfig, newPath string, err error)
- func (s *MockConfigStore) RuntimeConfigFor(ctx context.Context, image string) (imageConfig string, runtimeConfig *v1beta1.ImageRuntime, err error)
- 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 ¶
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 NewMockConfigStoreImageVerificationConfigForFn ¶
func NewMockConfigStoreImageVerificationConfigForFn(imageConfig string, verificationConfig *v1beta1.ImageVerification, err error) func(context.Context, string) (string, *v1beta1.ImageVerification, error)
NewMockConfigStoreImageVerificationConfigForFn creates a new MockImageVerificationConfigFor function for MockConfigStore.
func NewMockConfigStorePullSecretForFn ¶
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 NewMockGetFn ¶
func NewMockGetFn(pkg *xpkg.Package, err error) func(context.Context, string, ...xpkg.GetOption) (*xpkg.Package, error)
NewMockGetFn creates a new MockGet function for MockClient.
func NewMockHeadFn ¶
func NewMockHeadFn(d *v1.Descriptor, err error) func(name.Reference) (*v1.Descriptor, error)
NewMockHeadFn creates a new MockHead function for MockFetcher.
func NewMockListVersionsFn ¶
func NewMockListVersionsFn(versions []string, err error) func(context.Context, string, ...xpkg.GetOption) ([]string, error)
NewMockListVersionsFn creates a new MockListVersions function for MockClient.
func NewMockRewritePathFn ¶
func NewMockRewritePathFn(imageConfig, newPath string, err error) func(context.Context, string) (string, string, error)
NewMockRewritePathFn creates a new MockRewritePath function for MockConfigStore.
func NewMockRuntimeConfigForFn ¶
func NewMockRuntimeConfigForFn(imageConfig string, runtimeConfig *v1beta1.ImageRuntime, err error) func(context.Context, string) (string, *v1beta1.ImageRuntime, error)
NewMockRuntimeConfigForFn creates a new MockRewritePath function for MockConfigStore.
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.
type MockClient ¶
type MockClient struct {
MockGet func(ctx context.Context, ref string, opts ...xpkg.GetOption) (*xpkg.Package, error)
MockListVersions func(ctx context.Context, source string, opts ...xpkg.GetOption) ([]string, error)
}
MockClient is a mock xpkg.Client.
func (*MockClient) Get ¶
func (c *MockClient) Get(ctx context.Context, ref string, opts ...xpkg.GetOption) (*xpkg.Package, error)
Get calls the underlying MockGet.
func (*MockClient) ListVersions ¶
func (c *MockClient) ListVersions(ctx context.Context, source string, opts ...xpkg.GetOption) ([]string, error)
ListVersions calls the underlying MockListVersions.
type MockConfigStore ¶
type MockConfigStore struct {
MockPullSecretFor func(ctx context.Context, image string) (imageConfig string, pullSecret string, err error)
MockImageVerificationConfigFor func(ctx context.Context, image string) (imageConfig string, verificationConfig *v1beta1.ImageVerification, err error)
MockRewritePath func(ctx context.Context, image string) (imageConfig, newPath string, err error)
MockRuntimeConfigFor func(ctx context.Context, image string) (imageConfig string, runtimeConfig *v1beta1.ImageRuntime, err error)
}
MockConfigStore is a mock ConfigStore.
func (*MockConfigStore) ImageVerificationConfigFor ¶
func (s *MockConfigStore) ImageVerificationConfigFor(ctx context.Context, image string) (imageConfig string, verificationConfig *v1beta1.ImageVerification, err error)
ImageVerificationConfigFor calls the underlying MockImageVerificationConfigFor.
func (*MockConfigStore) PullSecretFor ¶
func (s *MockConfigStore) PullSecretFor(ctx context.Context, image string) (imageConfig string, pullSecret string, err error)
PullSecretFor calls the underlying MockPullSecretFor.
func (*MockConfigStore) RewritePath ¶
func (s *MockConfigStore) RewritePath(ctx context.Context, image string) (imageConfig, newPath string, err error)
RewritePath calls the underlying MockRewritePath.
func (*MockConfigStore) RuntimeConfigFor ¶
func (s *MockConfigStore) RuntimeConfigFor(ctx context.Context, image string) (imageConfig string, runtimeConfig *v1beta1.ImageRuntime, err error)
RuntimeConfigFor calls the underlying MockRuntimeConfigFor.
type MockFetcher ¶
type MockFetcher struct {
MockFetch func() (v1.Image, error)
MockHead func(name.Reference) (*v1.Descriptor, error)
MockTags func(name.Reference) ([]string, error)
}
MockFetcher is a mock fetcher.