mocks

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockedS3Client

type MockedS3Client struct {
	mock.Mock
	// contains filtered or unexported fields
}

func NewMockedS3Client

func NewMockedS3Client() *MockedS3Client

func (*MockedS3Client) AddPoliciesToUser

func (mockedS3Provider *MockedS3Client) AddPoliciesToUser(
	username string,
	policies []string,
) error

func (*MockedS3Client) AddServiceAccountForUser

func (mockedS3Provider *MockedS3Client) AddServiceAccountForUser(
	name string,
	accessKey string,
	secretKey string,
) error

func (*MockedS3Client) BucketExists

func (mockedS3Provider *MockedS3Client) BucketExists(name string) (bool, error)

func (*MockedS3Client) CheckUserCredentialsValid

func (mockedS3Provider *MockedS3Client) CheckUserCredentialsValid(
	name string,
	accessKey string,
	secretKey string,
) (bool, error)

func (*MockedS3Client) CreateBucket

func (mockedS3Provider *MockedS3Client) CreateBucket(name string) error

func (*MockedS3Client) CreateOrUpdatePolicy

func (mockedS3Provider *MockedS3Client) CreateOrUpdatePolicy(name string, content string) error

func (*MockedS3Client) CreatePath

func (mockedS3Provider *MockedS3Client) CreatePath(bucketname string, path string) error

func (*MockedS3Client) CreateUser

func (mockedS3Provider *MockedS3Client) CreateUser(name string, password string) error

func (*MockedS3Client) DeleteBucket

func (mockedS3Provider *MockedS3Client) DeleteBucket(name string) error

func (*MockedS3Client) DeletePath

func (mockedS3Provider *MockedS3Client) DeletePath(bucketname string, path string) error

func (*MockedS3Client) DeletePolicy

func (mockedS3Provider *MockedS3Client) DeletePolicy(name string) error

func (*MockedS3Client) DeleteUser

func (mockedS3Provider *MockedS3Client) DeleteUser(name string) error

func (*MockedS3Client) GetConfig

func (mockedS3Provider *MockedS3Client) GetConfig() *s3client.S3Config

func (*MockedS3Client) GetPolicyInfo

func (mockedS3Provider *MockedS3Client) GetPolicyInfo(name string) (*madmin.PolicyInfo, error)

func (*MockedS3Client) GetQuota

func (mockedS3Provider *MockedS3Client) GetQuota(name string) (int64, error)

func (*MockedS3Client) GetUserPolicies

func (mockedS3Provider *MockedS3Client) GetUserPolicies(name string) ([]string, error)

func (*MockedS3Client) ListBuckets

func (mockedS3Provider *MockedS3Client) ListBuckets() ([]string, error)

func (*MockedS3Client) PathExists

func (mockedS3Provider *MockedS3Client) PathExists(bucketname string, path string) (bool, error)

func (*MockedS3Client) PolicyExist

func (mockedS3Provider *MockedS3Client) PolicyExist(name string) (bool, error)

func (*MockedS3Client) RemovePoliciesFromUser

func (mockedS3Provider *MockedS3Client) RemovePoliciesFromUser(
	username string,
	policies []string,
) error

func (*MockedS3Client) SetQuota

func (mockedS3Provider *MockedS3Client) SetQuota(name string, quota int64) error

func (*MockedS3Client) UserExist

func (mockedS3Provider *MockedS3Client) UserExist(name string) (bool, error)

type MockedS3ClientFactory

type MockedS3ClientFactory struct {
	mock.Mock
}

Mocked Factory

func NewMockedS3ClientFactory

func NewMockedS3ClientFactory() *MockedS3ClientFactory

func (*MockedS3ClientFactory) GenerateS3Client

func (m *MockedS3ClientFactory) GenerateS3Client(s3Provider string, s3Config *s3client.S3Config) (s3client.S3Client, error)

Jump to

Keyboard shortcuts

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