fake

package
v0.0.0-...-bafb2d1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeAccessPolicyFactory

type FakeAccessPolicyFactory struct {
	//FailUpdateAccessPolicy ...
	FailUpdateAccessPolicy bool
	//FailUpdateAccessPolicyErrMsg with specific error msg...
	FailUpdateAccessPolicyErrMsg string
	//PassUpdateAccessPolicy ...
	PassUpdateAccessPolicy bool
	//FailUpdateAccessPolicy ...
	FailUpdateQuotaLimit bool
	//FailUpdateAccessPolicyErrMsg with specific error msg...
	FailUpdateQuotaLimitErrMsg string
	//PassUpdateAccessPolicy ...
	PassUpdateQuotaLimit bool
}

FakeAccessPolicyFactory implements backend.AccessPolicyFactory

func (*FakeAccessPolicyFactory) NewAccessPolicy

func (c *FakeAccessPolicyFactory) NewAccessPolicy() backend.AccessPolicy

NewAccessPolicy method creates a new fakeAccessPolicy session

type ObjectStorageSessionFactory

type ObjectStorageSessionFactory struct {
	//FailCheckBucketAccess ...
	FailCheckBucketAccess bool
	//FailCreateBucket ...
	FailCreateBucket bool
	//FailCreateBucket with specific error msg...
	FailCreateBucketErrMsg string
	//FailDeleteBucket ...
	FailDeleteBucket bool
	//CheckObjectPathExistenceError ...
	CheckObjectPathExistenceError bool
	//CheckObjectPathExistencePathNotFound ...
	CheckObjectPathExistencePathNotFound bool

	// LastEndpoint holds the endpoint of the last created session
	LastEndpoint string
	// LastRegion holds the region of the last created session
	LastRegion string
	// LastCredentials holds the credentials of the last created session
	LastCredentials *backend.ObjectStorageCredentials
	// LastCheckedBucket stores the name of the last bucket that was checked
	LastCheckedBucket string
	// LastCreatedBucket stores the name of the last bucket that was created
	LastCreatedBucket string
	// LastDeletedBucket stores the name of the last bucket that was deleted
	LastDeletedBucket string
	//LastUpdatedBucket
	LastUpdatedBucket string
}

ObjectStorageSessionFactory is a factory for mocked object storage sessions

func (*ObjectStorageSessionFactory) NewObjectStorageSession

func (f *ObjectStorageSessionFactory) NewObjectStorageSession(endpoint, region string, creds *backend.ObjectStorageCredentials, logger *zap.Logger) backend.ObjectStorageSession

NewObjectStorageSession method creates a new fake object store session

func (*ObjectStorageSessionFactory) ResetStats

func (f *ObjectStorageSessionFactory) ResetStats()

ResetStats clears the details about previous sessions

Jump to

Keyboard shortcuts

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