fake

package
v0.0.0-...-eccd397 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeNodeClient

type FakeNodeClient struct {
	MockGetBAR func(ctx context.Context, pod *v1.Pod, barName, barNs string) (*v1alpha1.BucketAccessRequest, error)
	MockGetBA  func(ctx context.Context, pod *v1.Pod, baName string) (*v1alpha1.BucketAccess, error)
	MockGetBR  func(ctx context.Context, pod *v1.Pod, brName, brNs string) (*v1alpha1.BucketRequest, error)
	MockGetB   func(ctx context.Context, pod *v1.Pod, bName string) (*v1alpha1.Bucket, error)
	MockGetPod func(ctx context.Context, podName, podNs string) (*v1.Pod, error)

	MockGetResources func(ctx context.Context, barName, podName, podNs string) (bkt *v1alpha1.Bucket, ba *v1alpha1.BucketAccess, secret *v1.Secret, pod *v1.Pod, err error)

	MockAddBAFinalizer    func(ctx context.Context, ba *v1alpha1.BucketAccess, BAFinalizer string) error
	MockRemoveBAFinalizer func(ctx context.Context, ba *v1alpha1.BucketAccess, BAFinalizer string) error
}

func (FakeNodeClient) AddBAFinalizer

func (f FakeNodeClient) AddBAFinalizer(ctx context.Context, ba *v1alpha1.BucketAccess, BAFinalizer string) error

func (FakeNodeClient) GetB

func (f FakeNodeClient) GetB(ctx context.Context, pod *v1.Pod, bName string) (*v1alpha1.Bucket, error)

func (FakeNodeClient) GetBA

func (f FakeNodeClient) GetBA(ctx context.Context, pod *v1.Pod, baName string) (*v1alpha1.BucketAccess, error)

func (FakeNodeClient) GetBAR

func (f FakeNodeClient) GetBAR(ctx context.Context, pod *v1.Pod, barName, barNs string) (*v1alpha1.BucketAccessRequest, error)

func (FakeNodeClient) GetBR

func (f FakeNodeClient) GetBR(ctx context.Context, pod *v1.Pod, brName, brNs string) (*v1alpha1.BucketRequest, error)

func (FakeNodeClient) GetPod

func (f FakeNodeClient) GetPod(ctx context.Context, podName, podNs string) (*v1.Pod, error)

func (FakeNodeClient) GetResources

func (f FakeNodeClient) GetResources(ctx context.Context, barName, podName, podNs string) (bkt *v1alpha1.Bucket, ba *v1alpha1.BucketAccess, secret *v1.Secret, pod *v1.Pod, err error)

func (FakeNodeClient) Recorder

func (f FakeNodeClient) Recorder() record.EventRecorder

func (FakeNodeClient) RemoveBAFinalizer

func (f FakeNodeClient) RemoveBAFinalizer(ctx context.Context, ba *v1alpha1.BucketAccess, BAFinalizer string) error

type MockProvisionerClient

type MockProvisionerClient struct {
	MockMkdirAll  func(path string, perm os.FileMode) error
	MockRemoveAll func(path string) error
	MockWriteFile func(data []byte, filepath string) error
	MockReadFile  func(filename string) ([]byte, error)
}

func (MockProvisionerClient) MkdirAll

func (p MockProvisionerClient) MkdirAll(path string, perm os.FileMode) error

func (MockProvisionerClient) ReadFile

func (p MockProvisionerClient) ReadFile(filename string) ([]byte, error)

func (MockProvisionerClient) RemoveAll

func (p MockProvisionerClient) RemoveAll(path string) error

func (MockProvisionerClient) WriteFile

func (p MockProvisionerClient) WriteFile(data []byte, filepath string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL