minio

package
v1.9.22-beta023 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrArtifactsNotFound = errors.New("Execution doesn't have any artifacts associated with it")

ErrArtifactsNotFound contains error for not existing artifacts

Functions

This section is empty.

Types

type Client

type Client struct {
	Endpoint string

	Log *zap.SugaredLogger
	// contains filtered or unexported fields
}

Client for managing MinIO storage server

func NewClient

func NewClient(endpoint, accessKeyID, secretAccessKey, location, token, bucket string, ssl bool) *Client

NewClient returns new MinIO client

func (*Client) Connect added in v0.6.16

func (c *Client) Connect() error

Connect connects to MinIO server

func (*Client) CreateBucket

func (c *Client) CreateBucket(bucket string) error

CreateBucket creates new S3 like bucket

func (*Client) DeleteBucket

func (c *Client) DeleteBucket(bucket string, force bool) error

DeleteBucket deletes bucket by name

func (*Client) DeleteFile added in v1.8.20

func (c *Client) DeleteFile(bucketFolder, file string) error

DeleteFile deletes a file from a bucket folder where bucket is provided by config

func (*Client) DeleteFileFromBucket added in v1.9.3

func (c *Client) DeleteFileFromBucket(bucket, bucketFolder, file string) error

DeleteFileFromBucket deletes a file from a bucket folder

func (*Client) DownloadFile

func (c *Client) DownloadFile(bucketFolder, file string) (*minio.Object, error)

DownloadFile downloads file from bucket from the config

func (*Client) DownloadFileFromBucket added in v1.9.3

func (c *Client) DownloadFileFromBucket(bucket, bucketFolder, file string) (*minio.Object, error)

DownloadFileFromBucket downloads file from given bucket

func (*Client) GetValidBucketName added in v1.6.38

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

GetValidBucketName returns a minio-compatible bucket name

func (*Client) ListBuckets

func (c *Client) ListBuckets() ([]string, error)

ListBuckets lists available buckets

func (*Client) ListFiles

func (c *Client) ListFiles(bucketFolder string) ([]testkube.Artifact, error)

ListFiles lists available files in the bucket from the config

func (*Client) ListFilesFromBucket added in v1.9.3

func (c *Client) ListFilesFromBucket(bucket string) ([]testkube.Artifact, error)

ListFilesFromBucket lists available files in given bucket

func (*Client) PlaceFiles added in v1.6.38

func (c *Client) PlaceFiles(bucketFolders []string, prefix string) error

PlaceFiles saves the content of the buckets to the filesystem

func (*Client) SaveFile

func (c *Client) SaveFile(bucketFolder, filePath string) error

SaveFile saves file defined by local filePath to S3 bucket from the config

func (*Client) SaveFileDirect added in v1.9.23

func (c *Client) SaveFileDirect(ctx context.Context, folder, file string, data io.Reader, size int64) error

func (*Client) SaveFileToBucket added in v1.9.3

func (c *Client) SaveFileToBucket(bucket, bucketFolder, filePath string) error

SaveFileToBucket saves file defined by local filePath to given S3 bucket

func (*Client) ScrapeArtefacts

func (c *Client) ScrapeArtefacts(id string, directories ...string) error

ScrapeArtefacts pushes local files located in directories to given folder with given id located in the configured bucket

func (*Client) UploadFile added in v1.6.38

func (c *Client) UploadFile(bucketFolder, filePath string, reader io.Reader, objectSize int64) error

UploadFile saves a file to be copied into a running execution

func (*Client) UploadFileToBucket added in v1.9.3

func (c *Client) UploadFileToBucket(bucket, bucketFolder, filePath string, reader io.Reader, objectSize int64) error

UploadFileToBucket saves a file to be copied into a running execution

Jump to

Keyboard shortcuts

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