artifacts

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

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

Collector handles the packaging and uploading of file artifacts produced by skill executions. Output files are tar-gzipped and stored in MinIO with a presigned download URL.

func New

func New(endpoint, accessKey, secretKey, bucket string, useSSL bool) (*Collector, error)

New creates a Collector connected to the given S3/MinIO endpoint. It ensures the target bucket exists, creating it if necessary.

func (*Collector) Collect

func (c *Collector) Collect(ctx context.Context, tenantID, executionID, filesDir string) (filesURL string, filesList []string, err error)

Collect packages all files found in filesDir into a tar.gz archive, uploads it to MinIO at {tenantID}/{executionID}/files.tar.gz, and returns a presigned GET URL (1 hour TTL) along with the list of relative file paths. If filesDir is empty or contains no files, it returns empty values with no error.

func (*Collector) DeleteObject added in v0.2.0

func (c *Collector) DeleteObject(ctx context.Context, key string) error

DeleteObject removes the object at the given S3 key.

func (*Collector) DownloadObject added in v0.2.0

func (c *Collector) DownloadObject(ctx context.Context, key string) (io.ReadCloser, int64, string, error)

DownloadObject returns a ReadCloser for the object stored at the given S3 key. The caller is responsible for closing the returned reader.

func (*Collector) UploadObject added in v0.2.0

func (c *Collector) UploadObject(ctx context.Context, key string, reader io.Reader, size int64, contentType string) (int64, error)

UploadObject uploads data from reader to the given S3 key with the specified content type and returns the number of bytes written.

Jump to

Keyboard shortcuts

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