s3

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package s3 provides an S3 implementation of the storage provider.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

Adapter implements storage.Provider using S3.

func New

func New(cfg Config, client Client) (*Adapter, error)

New creates a new S3 adapter with an existing client.

func NewFromConfig

func NewFromConfig(cfg Config) (*Adapter, error)

NewFromConfig creates a new S3 adapter with a new client from config.

func (*Adapter) Close

func (a *Adapter) Close() error

Close releases resources.

func (*Adapter) GetAccessExamples

func (a *Adapter) GetAccessExamples(ctx context.Context, urn string) ([]storage.AccessExample, error)

GetAccessExamples returns examples for accessing an S3 dataset.

func (*Adapter) GetDatasetAvailability

func (a *Adapter) GetDatasetAvailability(ctx context.Context, urn string) (*storage.DatasetAvailability, error)

GetDatasetAvailability checks if a dataset is available in S3.

func (*Adapter) ListObjects

func (a *Adapter) ListObjects(ctx context.Context, dataset storage.DatasetIdentifier, limit int) ([]storage.ObjectInfo, error)

ListObjects lists objects in an S3 dataset prefix.

func (*Adapter) Name

func (*Adapter) Name() string

Name returns the provider name.

func (*Adapter) ResolveDataset

func (a *Adapter) ResolveDataset(_ context.Context, urn string) (*storage.DatasetIdentifier, error)

ResolveDataset converts a URN to an S3 dataset identifier.

type Client added in v0.14.0

type Client interface {
	ListObjects(ctx context.Context, bucket, prefix, delimiter string, maxKeys int32, continueToken string) (*s3client.ListObjectsOutput, error)
	Close() error
}

Client defines the interface for S3 operations used by the adapter. This interface allows for mocking in tests.

type Config

type Config struct {
	Region         string
	Endpoint       string
	AccessKeyID    string
	SecretKey      string
	BucketPrefix   string
	ConnectionName string
	ReadOnly       bool
}

Config holds S3 adapter configuration.

Jump to

Keyboard shortcuts

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