s3

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactStorage

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

ArtifactStorage implements server.ArtifactStorageProvider using an S3-compatible object store such as RustFS, MinIO or AWS S3

func NewArtifactStorage

func NewArtifactStorage(cfg *serverConfig.ArtifactsStorageConfig) (*ArtifactStorage, error)

NewArtifactStorage creates a new S3-based artifact storage provider

func (*ArtifactStorage) CleanupExpiredArtifacts

func (s *ArtifactStorage) CleanupExpiredArtifacts(ctx context.Context, maxAge time.Duration) (int, error)

CleanupExpiredArtifacts removes artifacts older than maxAge

func (*ArtifactStorage) CleanupOldestArtifacts

func (s *ArtifactStorage) CleanupOldestArtifacts(ctx context.Context, maxCount int) (int, error)

CleanupOldestArtifacts removes the oldest artifacts keeping only maxCount per context

func (*ArtifactStorage) Close

func (s *ArtifactStorage) Close() error

Close closes the S3 connection

func (*ArtifactStorage) Delete

func (s *ArtifactStorage) Delete(ctx context.Context, contextID string, artifactID string, filename string) error

Delete removes an artifact from S3 storage

func (*ArtifactStorage) Exists

func (s *ArtifactStorage) Exists(ctx context.Context, contextID string, artifactID string, filename string) (bool, error)

Exists checks if an artifact exists in S3 storage

func (*ArtifactStorage) GetURL

func (s *ArtifactStorage) GetURL(contextID string, artifactID string, filename string) string

GetURL returns the public URL for accessing an artifact

func (*ArtifactStorage) Retrieve

func (s *ArtifactStorage) Retrieve(ctx context.Context, contextID string, artifactID string, filename string) (io.ReadCloser, error)

Retrieve retrieves an artifact from S3 storage

func (*ArtifactStorage) Store

func (s *ArtifactStorage) Store(ctx context.Context, contextID string, artifactID string, filename string, data io.Reader) (string, error)

Store stores an artifact in S3 storage

Jump to

Keyboard shortcuts

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