storage

package
v1.16.26-beta1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package storage is a generated GoMock package.

Package storage is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactsStorage added in v1.10.41

type ArtifactsStorage interface {
	// ListFiles lists available files in the configured bucket
	ListFiles(ctx context.Context, executionId, testName, testSuiteName string) ([]testkube.Artifact, error)
	// DownloadFile downloads file from configured
	DownloadFile(ctx context.Context, file, executionId, testName, testSuiteName string) (io.Reader, error)
	// DownloadArchive downloads archive from configured
	DownloadArchive(ctx context.Context, executionId string, masks []string) (io.Reader, error)
	// UploadFile uploads file to configured bucket
	UploadFile(ctx context.Context, bucketFolder string, filePath string, reader io.Reader, objectSize int64) error
	// PlaceFiles saves the content of the bucket folders to the filesystem
	PlaceFiles(ctx context.Context, bucketFolders []string, prefix string) error
	// GetValidBucketName returns a valid bucket name for the given parent type and name
	GetValidBucketName(parentType string, parentName string) string
}

type Client

type Client interface {
	ClientBucket
	ClientImplicitBucket
}

Client is storage client abstraction

type ClientBucket added in v1.9.3

type ClientBucket interface {
	CreateBucket(ctx context.Context, bucket string) error
	DeleteBucket(ctx context.Context, bucket string, force bool) error
	ListBuckets(ctx context.Context) ([]string, error)
	DownloadFileFromBucket(ctx context.Context, bucket, bucketFolder, file string) (io.Reader, minio.ObjectInfo, error)
	DownloadArchiveFromBucket(ctx context.Context, bucket, bucketFolder string, masks []string) (io.Reader, error)
	UploadFileToBucket(ctx context.Context, bucket, bucketFolder, filePath string, reader io.Reader, objectSize int64) error
	GetValidBucketName(parentType string, parentName string) string
	DeleteFileFromBucket(ctx context.Context, bucket, bucketFolder, file string) error
}

ClientBucket is storage client abstraction where you have to specify bucket name

type ClientImplicitBucket added in v1.9.3

type ClientImplicitBucket interface {
	IsConnectionPossible(ctx context.Context) (bool, error)
	ListFiles(ctx context.Context, bucketFolder string) ([]testkube.Artifact, error)
	SaveFile(ctx context.Context, bucketFolder, filePath string) error
	DownloadFile(ctx context.Context, bucketFolder, file string) (*minio.Object, error)
	DownloadArchive(ctx context.Context, bucketFolder string, masks []string) (io.Reader, error)
	UploadFile(ctx context.Context, bucketFolder string, filePath string, reader io.Reader, objectSize int64) error
	PlaceFiles(ctx context.Context, bucketFolders []string, prefix string) error
	DeleteFile(ctx context.Context, bucketFolder, file string) error
}

ClientImplicitBucket is storage client abstraction where bucket name is provided from config

type MockArtifactsStorage added in v1.10.41

type MockArtifactsStorage struct {
	// contains filtered or unexported fields
}

MockArtifactsStorage is a mock of ArtifactsStorage interface.

func NewMockArtifactsStorage added in v1.10.41

func NewMockArtifactsStorage(ctrl *gomock.Controller) *MockArtifactsStorage

NewMockArtifactsStorage creates a new mock instance.

func (*MockArtifactsStorage) DownloadArchive added in v1.10.45

func (m *MockArtifactsStorage) DownloadArchive(arg0 context.Context, arg1 string, arg2 []string) (io.Reader, error)

DownloadArchive mocks base method.

func (*MockArtifactsStorage) DownloadFile added in v1.10.41

func (m *MockArtifactsStorage) DownloadFile(arg0 context.Context, arg1, arg2, arg3, arg4 string) (io.Reader, error)

DownloadFile mocks base method.

func (*MockArtifactsStorage) EXPECT added in v1.10.41

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockArtifactsStorage) GetValidBucketName added in v1.10.44

func (m *MockArtifactsStorage) GetValidBucketName(arg0, arg1 string) string

GetValidBucketName mocks base method.

func (*MockArtifactsStorage) ListFiles added in v1.10.41

func (m *MockArtifactsStorage) ListFiles(arg0 context.Context, arg1, arg2, arg3 string) ([]testkube.Artifact, error)

ListFiles mocks base method.

func (*MockArtifactsStorage) PlaceFiles added in v1.10.44

func (m *MockArtifactsStorage) PlaceFiles(arg0 context.Context, arg1 []string, arg2 string) error

PlaceFiles mocks base method.

func (*MockArtifactsStorage) UploadFile added in v1.10.44

func (m *MockArtifactsStorage) UploadFile(arg0 context.Context, arg1, arg2 string, arg3 io.Reader, arg4 int64) error

UploadFile mocks base method.

type MockArtifactsStorageMockRecorder added in v1.10.41

type MockArtifactsStorageMockRecorder struct {
	// contains filtered or unexported fields
}

MockArtifactsStorageMockRecorder is the mock recorder for MockArtifactsStorage.

func (*MockArtifactsStorageMockRecorder) DownloadArchive added in v1.10.45

func (mr *MockArtifactsStorageMockRecorder) DownloadArchive(arg0, arg1, arg2 interface{}) *gomock.Call

DownloadArchive indicates an expected call of DownloadArchive.

func (*MockArtifactsStorageMockRecorder) DownloadFile added in v1.10.41

func (mr *MockArtifactsStorageMockRecorder) DownloadFile(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call

DownloadFile indicates an expected call of DownloadFile.

func (*MockArtifactsStorageMockRecorder) GetValidBucketName added in v1.10.44

func (mr *MockArtifactsStorageMockRecorder) GetValidBucketName(arg0, arg1 interface{}) *gomock.Call

GetValidBucketName indicates an expected call of GetValidBucketName.

func (*MockArtifactsStorageMockRecorder) ListFiles added in v1.10.41

func (mr *MockArtifactsStorageMockRecorder) ListFiles(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

ListFiles indicates an expected call of ListFiles.

func (*MockArtifactsStorageMockRecorder) PlaceFiles added in v1.10.44

func (mr *MockArtifactsStorageMockRecorder) PlaceFiles(arg0, arg1, arg2 interface{}) *gomock.Call

PlaceFiles indicates an expected call of PlaceFiles.

func (*MockArtifactsStorageMockRecorder) UploadFile added in v1.10.44

func (mr *MockArtifactsStorageMockRecorder) UploadFile(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call

UploadFile indicates an expected call of UploadFile.

type MockClient added in v1.15.1

type MockClient struct {
	// contains filtered or unexported fields
}

MockClient is a mock of Client interface.

func NewMockClient added in v1.15.1

func NewMockClient(ctrl *gomock.Controller) *MockClient

NewMockClient creates a new mock instance.

func (*MockClient) CreateBucket added in v1.15.1

func (m *MockClient) CreateBucket(arg0 context.Context, arg1 string) error

CreateBucket mocks base method.

func (*MockClient) DeleteBucket added in v1.15.1

func (m *MockClient) DeleteBucket(arg0 context.Context, arg1 string, arg2 bool) error

DeleteBucket mocks base method.

func (*MockClient) DeleteFile added in v1.15.1

func (m *MockClient) DeleteFile(arg0 context.Context, arg1, arg2 string) error

DeleteFile mocks base method.

func (*MockClient) DeleteFileFromBucket added in v1.15.1

func (m *MockClient) DeleteFileFromBucket(arg0 context.Context, arg1, arg2, arg3 string) error

DeleteFileFromBucket mocks base method.

func (*MockClient) DownloadArchive added in v1.15.1

func (m *MockClient) DownloadArchive(arg0 context.Context, arg1 string, arg2 []string) (io.Reader, error)

DownloadArchive mocks base method.

func (*MockClient) DownloadArchiveFromBucket added in v1.15.1

func (m *MockClient) DownloadArchiveFromBucket(arg0 context.Context, arg1, arg2 string, arg3 []string) (io.Reader, error)

DownloadArchiveFromBucket mocks base method.

func (*MockClient) DownloadFile added in v1.15.1

func (m *MockClient) DownloadFile(arg0 context.Context, arg1, arg2 string) (*minio.Object, error)

DownloadFile mocks base method.

func (*MockClient) DownloadFileFromBucket added in v1.15.1

func (m *MockClient) DownloadFileFromBucket(arg0 context.Context, arg1, arg2, arg3 string) (io.Reader, minio.ObjectInfo, error)

DownloadFileFromBucket mocks base method.

func (*MockClient) EXPECT added in v1.15.1

func (m *MockClient) EXPECT() *MockClientMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockClient) GetValidBucketName added in v1.15.1

func (m *MockClient) GetValidBucketName(arg0, arg1 string) string

GetValidBucketName mocks base method.

func (*MockClient) IsConnectionPossible added in v1.15.1

func (m *MockClient) IsConnectionPossible(arg0 context.Context) (bool, error)

IsConnectionPossible mocks base method.

func (*MockClient) ListBuckets added in v1.15.1

func (m *MockClient) ListBuckets(arg0 context.Context) ([]string, error)

ListBuckets mocks base method.

func (*MockClient) ListFiles added in v1.15.1

func (m *MockClient) ListFiles(arg0 context.Context, arg1 string) ([]testkube.Artifact, error)

ListFiles mocks base method.

func (*MockClient) PlaceFiles added in v1.15.1

func (m *MockClient) PlaceFiles(arg0 context.Context, arg1 []string, arg2 string) error

PlaceFiles mocks base method.

func (*MockClient) SaveFile added in v1.15.1

func (m *MockClient) SaveFile(arg0 context.Context, arg1, arg2 string) error

SaveFile mocks base method.

func (*MockClient) UploadFile added in v1.15.1

func (m *MockClient) UploadFile(arg0 context.Context, arg1, arg2 string, arg3 io.Reader, arg4 int64) error

UploadFile mocks base method.

func (*MockClient) UploadFileToBucket added in v1.15.1

func (m *MockClient) UploadFileToBucket(arg0 context.Context, arg1, arg2, arg3 string, arg4 io.Reader, arg5 int64) error

UploadFileToBucket mocks base method.

type MockClientMockRecorder added in v1.15.1

type MockClientMockRecorder struct {
	// contains filtered or unexported fields
}

MockClientMockRecorder is the mock recorder for MockClient.

func (*MockClientMockRecorder) CreateBucket added in v1.15.1

func (mr *MockClientMockRecorder) CreateBucket(arg0, arg1 interface{}) *gomock.Call

CreateBucket indicates an expected call of CreateBucket.

func (*MockClientMockRecorder) DeleteBucket added in v1.15.1

func (mr *MockClientMockRecorder) DeleteBucket(arg0, arg1, arg2 interface{}) *gomock.Call

DeleteBucket indicates an expected call of DeleteBucket.

func (*MockClientMockRecorder) DeleteFile added in v1.15.1

func (mr *MockClientMockRecorder) DeleteFile(arg0, arg1, arg2 interface{}) *gomock.Call

DeleteFile indicates an expected call of DeleteFile.

func (*MockClientMockRecorder) DeleteFileFromBucket added in v1.15.1

func (mr *MockClientMockRecorder) DeleteFileFromBucket(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

DeleteFileFromBucket indicates an expected call of DeleteFileFromBucket.

func (*MockClientMockRecorder) DownloadArchive added in v1.15.1

func (mr *MockClientMockRecorder) DownloadArchive(arg0, arg1, arg2 interface{}) *gomock.Call

DownloadArchive indicates an expected call of DownloadArchive.

func (*MockClientMockRecorder) DownloadArchiveFromBucket added in v1.15.1

func (mr *MockClientMockRecorder) DownloadArchiveFromBucket(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

DownloadArchiveFromBucket indicates an expected call of DownloadArchiveFromBucket.

func (*MockClientMockRecorder) DownloadFile added in v1.15.1

func (mr *MockClientMockRecorder) DownloadFile(arg0, arg1, arg2 interface{}) *gomock.Call

DownloadFile indicates an expected call of DownloadFile.

func (*MockClientMockRecorder) DownloadFileFromBucket added in v1.15.1

func (mr *MockClientMockRecorder) DownloadFileFromBucket(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

DownloadFileFromBucket indicates an expected call of DownloadFileFromBucket.

func (*MockClientMockRecorder) GetValidBucketName added in v1.15.1

func (mr *MockClientMockRecorder) GetValidBucketName(arg0, arg1 interface{}) *gomock.Call

GetValidBucketName indicates an expected call of GetValidBucketName.

func (*MockClientMockRecorder) IsConnectionPossible added in v1.15.1

func (mr *MockClientMockRecorder) IsConnectionPossible(arg0 interface{}) *gomock.Call

IsConnectionPossible indicates an expected call of IsConnectionPossible.

func (*MockClientMockRecorder) ListBuckets added in v1.15.1

func (mr *MockClientMockRecorder) ListBuckets(arg0 interface{}) *gomock.Call

ListBuckets indicates an expected call of ListBuckets.

func (*MockClientMockRecorder) ListFiles added in v1.15.1

func (mr *MockClientMockRecorder) ListFiles(arg0, arg1 interface{}) *gomock.Call

ListFiles indicates an expected call of ListFiles.

func (*MockClientMockRecorder) PlaceFiles added in v1.15.1

func (mr *MockClientMockRecorder) PlaceFiles(arg0, arg1, arg2 interface{}) *gomock.Call

PlaceFiles indicates an expected call of PlaceFiles.

func (*MockClientMockRecorder) SaveFile added in v1.15.1

func (mr *MockClientMockRecorder) SaveFile(arg0, arg1, arg2 interface{}) *gomock.Call

SaveFile indicates an expected call of SaveFile.

func (*MockClientMockRecorder) UploadFile added in v1.15.1

func (mr *MockClientMockRecorder) UploadFile(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call

UploadFile indicates an expected call of UploadFile.

func (*MockClientMockRecorder) UploadFileToBucket added in v1.15.1

func (mr *MockClientMockRecorder) UploadFileToBucket(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call

UploadFileToBucket indicates an expected call of UploadFileToBucket.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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