s3

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const IDByteSize = 6

Variables

This section is empty.

Functions

This section is empty.

Types

type MockObjectStore

type MockObjectStore struct{}

func (MockObjectStore) DownloadFile

func (m MockObjectStore) DownloadFile(_ context.Context, _ string) (io.ReadCloser, error)

func (MockObjectStore) UploadArtifacts

func (m MockObjectStore) UploadArtifacts(_ context.Context, _ []types.Artifact) ([]types.SavedArtifact, error)

func (MockObjectStore) UploadFile

func (m MockObjectStore) UploadFile(_ context.Context, key string, _ io.Reader) (string, error)

type ObjectStore

type ObjectStore interface {
	UploadFile(ctx context.Context, key string, body io.Reader) (string, error)
	DownloadFile(ctx context.Context, key string) (io.ReadCloser, error)
	UploadArtifacts(ctx context.Context, artifacts []types.Artifact) ([]types.SavedArtifact, error)
}

type Store

type Store struct {
	Bucket          string
	Endpoint        string
	AccessKey       string
	SecretAccessKey string
	Signature       string
	Region          string
	Prefix          string
	// contains filtered or unexported fields
}

func NewStore

func NewStore(ops StoreOps) (Store, error)

func (Store) DownloadFile

func (s Store) DownloadFile(ctx context.Context, key string) (io.ReadCloser, error)

DownloadFile.

func (*Store) GenerateKey

func (s *Store) GenerateKey(name string) string

func (Store) UploadArtifacts

func (s Store) UploadArtifacts(ctx context.Context, as []types.Artifact) ([]types.SavedArtifact, error)

func (Store) UploadFile

func (s Store) UploadFile(ctx context.Context, key string, body io.Reader) (string, error)

type StoreOps

type StoreOps struct {
	Bucket          string
	Endpoint        string
	AccessKey       string
	SecretAccessKey string
	Region          string
	Signature       string
	Prefix          string
}

Jump to

Keyboard shortcuts

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