artifacts

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalStore

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

LocalStore persists artifacts on the local filesystem under baseDir. Keys that are absolute paths are used as-is (backward compatibility with records created before this storage abstraction was introduced).

func NewLocalStore

func NewLocalStore(baseDir string) *LocalStore

func (*LocalStore) Delete

func (s *LocalStore) Delete(_ context.Context, key string) error

func (*LocalStore) Get

func (s *LocalStore) Get(_ context.Context, key string) (io.ReadCloser, error)

func (*LocalStore) Put

func (s *LocalStore) Put(_ context.Context, key string, r io.Reader, _ int64, _ string) error

type S3Config

type S3Config struct {
	Bucket          string
	Region          string
	Prefix          string // optional key prefix, e.g. "artifacts/" — appended before each key
	Endpoint        string // custom endpoint for MinIO or other S3-compatible stores
	AccessKeyID     string
	SecretAccessKey string
	ForcePathStyle  bool // required for MinIO and most S3-compatible stores
}

S3Config holds the parameters for creating an S3Store.

type S3Store

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

S3Store persists artifacts in an Amazon S3 or S3-compatible (e.g. MinIO) bucket.

func NewS3Store

func NewS3Store(ctx context.Context, cfg S3Config) (*S3Store, error)

NewS3Store creates an S3Store. cfg.Bucket must be non-empty.

func (*S3Store) Delete

func (s *S3Store) Delete(ctx context.Context, key string) error

func (*S3Store) Get

func (s *S3Store) Get(ctx context.Context, key string) (io.ReadCloser, error)

func (*S3Store) Put

func (s *S3Store) Put(ctx context.Context, key string, r io.Reader, size int64, contentType string) error

type Store

type Store interface {
	Put(ctx context.Context, key string, r io.Reader, size int64, contentType string) error
	Get(ctx context.Context, key string) (io.ReadCloser, error)
	Delete(ctx context.Context, key string) error
}

Store handles persistence and retrieval of artifact blobs. Keys are opaque strings (typically UUID strings or legacy absolute paths).

Jump to

Keyboard shortcuts

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