artifacts

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: May 24, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package artifacts provides access to external object stores.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store provides access to artifact objects stored in S3.

func New

func New(bucket string) *Store

New constructs a new artifact Store for an S3 bucket name.

func NewWithClient

func NewWithClient(bucket string, client *s3.Client) *Store

NewWithClient constructs a Store backed by an injected S3 client.

This is primarily intended for deterministic, offline tests.

func (*Store) DeleteObject

func (a *Store) DeleteObject(ctx context.Context, key string) error

DeleteObject deletes an object from the artifact bucket.

func (*Store) GetObject

func (a *Store) GetObject(ctx context.Context, key string, maxBytes int64) ([]byte, string, string, error)

GetObject fetches and returns object bytes with basic metadata.

func (*Store) HeadObject

func (a *Store) HeadObject(ctx context.Context, key string) (string, string, int64, error)

HeadObject returns object metadata without downloading the object body.

func (*Store) PutObject

func (a *Store) PutObject(ctx context.Context, key string, body []byte, contentType string, cacheControl string) error

PutObject uploads an object to the artifact bucket.

Jump to

Keyboard shortcuts

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