Documentation ¶
Index ¶
- Variables
- type ArtifactClient
- func (c *ArtifactClient) DownloadArchive(ctx context.Context, executionId string, masks []string) (io.Reader, error)
- func (c *ArtifactClient) DownloadFile(ctx context.Context, file, executionId, testName, testSuiteName string) (io.Reader, error)
- func (c *ArtifactClient) GetValidBucketName(parentType string, parentName string) string
- func (c *ArtifactClient) ListFiles(ctx context.Context, executionId, testName, testSuiteName string) ([]testkube.Artifact, error)
- func (c *ArtifactClient) PlaceFiles(ctx context.Context, bucketFolders []string, prefix string) error
- func (c *ArtifactClient) UploadFile(ctx context.Context, bucketFolder, filePath string, reader io.Reader, ...) error
- type Client
- func (c *Client) Connect() error
- func (c *Client) CreateBucket(ctx context.Context, bucket string) error
- func (c *Client) DeleteBucket(ctx context.Context, bucket string, force bool) error
- func (c *Client) DeleteFile(ctx context.Context, bucketFolder, file string) error
- func (c *Client) DeleteFileFromBucket(ctx context.Context, bucket, bucketFolder, file string) error
- func (c *Client) DownloadArchive(ctx context.Context, bucketFolder string, masks []string) (io.Reader, error)
- func (c *Client) DownloadArchiveFromBucket(ctx context.Context, bucket, bucketFolder string, masks []string) (io.Reader, error)
- func (c *Client) DownloadFile(ctx context.Context, bucketFolder, file string) (*minio.Object, error)
- func (c *Client) DownloadFileFromBucket(ctx context.Context, bucket, bucketFolder, file string) (io.Reader, error)
- func (c *Client) GetValidBucketName(parentType string, parentName string) string
- func (c *Client) IsConnectionPossible(ctx context.Context) (bool, error)
- func (c *Client) ListBuckets(ctx context.Context) ([]string, error)
- func (c *Client) ListFiles(ctx context.Context, bucketFolder string) ([]testkube.Artifact, error)
- func (c *Client) PlaceFiles(ctx context.Context, bucketFolders []string, prefix string) error
- func (c *Client) SaveFile(ctx context.Context, bucketFolder, filePath string) error
- func (c *Client) SaveFileDirect(ctx context.Context, folder, file string, data io.Reader, size int64, ...) error
- func (c *Client) ScrapeArtefacts(ctx context.Context, id string, directories ...string) error
- func (c *Client) SetExpirationPolicy(expirationDays int) error
- func (c *Client) UploadFile(ctx context.Context, bucketFolder, filePath string, reader io.Reader, ...) error
- func (c *Client) UploadFileToBucket(ctx context.Context, bucket, bucketFolder, filePath string, reader io.Reader, ...) error
- type Connecter
- type Option
Constants ¶
This section is empty.
Variables ¶
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 ArtifactClient ¶ added in v1.10.41
type ArtifactClient struct {
// contains filtered or unexported fields
}
func NewMinIOArtifactClient ¶ added in v1.10.41
func NewMinIOArtifactClient(client storage.Client) *ArtifactClient
NewMinIOArtifactClient returns new MinIO client
func (*ArtifactClient) DownloadArchive ¶ added in v1.10.45
func (c *ArtifactClient) DownloadArchive(ctx context.Context, executionId string, masks []string) (io.Reader, error)
DownloadArrchive downloads archive from bucket from the config
func (*ArtifactClient) DownloadFile ¶ added in v1.10.41
func (c *ArtifactClient) DownloadFile(ctx context.Context, file, executionId, testName, testSuiteName string) (io.Reader, error)
DownloadFile downloads file from bucket from the config
func (*ArtifactClient) GetValidBucketName ¶ added in v1.10.44
func (c *ArtifactClient) GetValidBucketName(parentType string, parentName string) string
func (*ArtifactClient) ListFiles ¶ added in v1.10.41
func (c *ArtifactClient) ListFiles(ctx context.Context, executionId, testName, testSuiteName string) ([]testkube.Artifact, error)
ListFiles lists available files in the bucket from the config
func (*ArtifactClient) PlaceFiles ¶ added in v1.10.44
func (c *ArtifactClient) PlaceFiles(ctx context.Context, bucketFolders []string, prefix string) error
PlaceFiles saves the content of the buckets to the filesystem
func (*ArtifactClient) UploadFile ¶ added in v1.10.44
func (c *ArtifactClient) UploadFile(ctx context.Context, bucketFolder, filePath string, reader io.Reader, objectSize int64) error
UploadFile saves a file to be copied into a running execution
type Client ¶
type Client struct { Log *zap.SugaredLogger // contains filtered or unexported fields }
Client for managing MinIO storage server
func NewClient ¶
func NewClient(endpoint, accessKeyID, secretAccessKey, region, token, bucket string, opts ...Option) *Client
NewClient returns new MinIO client
func (*Client) CreateBucket ¶
CreateBucket creates new S3 like bucket
func (*Client) DeleteBucket ¶
DeleteBucket deletes bucket by name
func (*Client) DeleteFile ¶ added in v1.8.20
DeleteFile deletes a file from a bucket folder where bucket is provided by config
func (*Client) DeleteFileFromBucket ¶ added in v1.9.3
DeleteFileFromBucket deletes a file from a bucket folder
func (*Client) DownloadArchive ¶ added in v1.10.45
func (c *Client) DownloadArchive(ctx context.Context, bucketFolder string, masks []string) (io.Reader, error)
DownloadArchive downloads archive from bucket from the config
func (*Client) DownloadArchiveFromBucket ¶ added in v1.10.45
func (c *Client) DownloadArchiveFromBucket(ctx context.Context, bucket, bucketFolder string, masks []string) (io.Reader, error)
DownloadArrchiveFromBucket downloads archive from given bucket
func (*Client) DownloadFile ¶
func (c *Client) DownloadFile(ctx context.Context, 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(ctx context.Context, bucket, bucketFolder, file string) (io.Reader, error)
DownloadFileFromBucket downloads file from given bucket
func (*Client) GetValidBucketName ¶ added in v1.6.38
GetValidBucketName returns a minio-compatible bucket name
func (*Client) IsConnectionPossible ¶ added in v1.14.0
IsConnectionPossible checks if the connection to minio is possible
func (*Client) ListBuckets ¶
ListBuckets lists available buckets
func (*Client) PlaceFiles ¶ added in v1.6.38
PlaceFiles saves the content of the buckets to the filesystem
func (*Client) SaveFile ¶
SaveFile saves file defined by local filePath to S3 bucket from the config
func (*Client) SaveFileDirect ¶ added in v1.9.23
func (*Client) ScrapeArtefacts ¶
ScrapeArtefacts pushes local files located in directories to given folder with given id located in the configured bucket
func (*Client) SetExpirationPolicy ¶ added in v1.10.47
type Connecter ¶ added in v1.16.25
type Connecter struct { Endpoint string AccessKeyID string SecretAccessKey string Region string Token string Bucket string Ssl bool TlsConfig *tls.Config Opts []Option Log *zap.SugaredLogger // contains filtered or unexported fields }
func NewConnecter ¶ added in v1.16.25
func NewConnecter(endpoint, accessKeyID, secretAccessKey, region, token, bucket string, log *zap.SugaredLogger, opts ...Option) *Connecter
NewConnecter creates a new Connecter
type Option ¶ added in v1.16.10
func ClientCert ¶ added in v1.16.10
ClientCert is a helper option to provide the client certificate from a file. If Secure is not already set this will set it as well.