minio

package
v1.7.23 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: MIT Imports: 13 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 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) DownloadFile

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

DownloadFile downloads file in 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(bucket string) ([]testkube.Artifact, error)

ListFiles lists available files in given bucket

func (*Client) PlaceFiles added in v1.6.38

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

PlaceFiles saves the content of the buckets to the filesystem

func (*Client) SaveFile

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

SaveFile saves file defined by local filePath to S3 bucket

func (*Client) ScrapeArtefacts

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

ScrapeArtefacts pushes local files located in directories to given bucket ID

func (*Client) UploadFile added in v1.6.38

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

UploadFile 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