storage

package
v1.10.38 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CmdStorageCreateBucket = "storage.createBucket"
	CmdStorageDeleteBucket = "storage.deleteBucket"
	CmdStorageListBuckets  = "storage.listBuckets"
	CmdStorageUploadFile   = "storage.uploadFile"
	CmdStorageDownloadFile = "storage.downloadFile"
	CmdStorageDeleteFile   = "storage.deleteFile"
	CmdStorageListFiles    = "storage.listFiles"
	CmdStorageSaveFile     = "storage.saveFile"
	CmdStoragePlaceFiles   = "storage.placeFiles"
)

Variables

View Source
var ErrNotAllowed = errors.New("operation not allowed in cloud mode")

Functions

This section is empty.

Types

type CloudClient

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

func NewCloudClient

func NewCloudClient(cloudClient cloud.TestKubeCloudAPIClient, apiKey string) *CloudClient

func (*CloudClient) CreateBucket

func (c *CloudClient) CreateBucket(ctx context.Context, bucket string) error

func (*CloudClient) DeleteBucket

func (c *CloudClient) DeleteBucket(ctx context.Context, bucket string, force bool) error

func (*CloudClient) DeleteFile

func (c *CloudClient) DeleteFile(ctx context.Context, bucketFolder, file string) error

func (*CloudClient) DeleteFileFromBucket

func (c *CloudClient) DeleteFileFromBucket(ctx context.Context, bucket, bucketFolder, file string) error

func (*CloudClient) DownloadFile

func (c *CloudClient) DownloadFile(ctx context.Context, bucketFolder, file string) (*minio.Object, error)

func (*CloudClient) DownloadFileFromBucket

func (c *CloudClient) DownloadFileFromBucket(ctx context.Context, bucket, bucketFolder, file string) (*minio.Object, error)

func (*CloudClient) GetValidBucketName

func (c *CloudClient) GetValidBucketName(parentType string, parentName string) string

func (*CloudClient) ListBuckets

func (c *CloudClient) ListBuckets(ctx context.Context) ([]string, error)

func (*CloudClient) ListFiles

func (c *CloudClient) ListFiles(ctx context.Context, bucketFolder string) ([]testkube.Artifact, error)

func (*CloudClient) PlaceFiles

func (c *CloudClient) PlaceFiles(ctx context.Context, bucketFolders []string, prefix string) error

func (*CloudClient) SaveFile

func (c *CloudClient) SaveFile(ctx context.Context, bucketFolder, filePath string) error

func (*CloudClient) UploadFile

func (c *CloudClient) UploadFile(ctx context.Context, bucketFolder string, filePath string, reader io.Reader, objectSize int64) error

func (*CloudClient) UploadFileToBucket

func (c *CloudClient) UploadFileToBucket(ctx context.Context, bucket, bucketFolder, filePath string, reader io.Reader, objectSize int64) error

type DeleteFileRequest

type DeleteFileRequest struct {
	BucketFolder string
	File         string
}

type DeleteFileResponse

type DeleteFileResponse struct{}

type DownloadFileRequest

type DownloadFileRequest struct {
	BucketFolder string
	File         string
}

type DownloadFileResponse

type DownloadFileResponse struct {
	URL string
}

type ListFilesRequest

type ListFilesRequest struct {
	BucketFolder string
}

type ListFilesResponse

type ListFilesResponse struct {
	Artifacts []testkube.Artifact
}

type PlaceFilesRequest

type PlaceFilesRequest struct {
	BucketFolders []string
	Prefix        string
}

type PlaceFilesResponse

type PlaceFilesResponse struct{}

type SaveFileRequest

type SaveFileRequest struct {
	BucketFolder string
	FilePath     string
	Reader       io.Reader
	ObjectSize   int64
}

type SaveFileResponse

type SaveFileResponse struct{}

Jump to

Keyboard shortcuts

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