Documentation
¶
Overview ¶
Package s3 provides an S3 implementation of the storage provider.
Index ¶
- type Adapter
- func (a *Adapter) Close() error
- func (a *Adapter) GetAccessExamples(ctx context.Context, urn string) ([]storage.AccessExample, error)
- func (a *Adapter) GetDatasetAvailability(ctx context.Context, urn string) (*storage.DatasetAvailability, error)
- func (a *Adapter) ListObjects(ctx context.Context, dataset storage.DatasetIdentifier, limit int) ([]storage.ObjectInfo, error)
- func (a *Adapter) Name() string
- func (a *Adapter) ResolveDataset(_ context.Context, urn string) (*storage.DatasetIdentifier, error)
- type Config
- type S3Client
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 NewFromConfig ¶
NewFromConfig creates a new S3 adapter with a new client from config.
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) ResolveDataset ¶
ResolveDataset converts a URN to an S3 dataset identifier.
type Config ¶
type Config struct {
Region string
Endpoint string
AccessKeyID string
SecretKey string
BucketPrefix string
ConnectionName string
ReadOnly bool
}
Config holds S3 adapter configuration.
type S3Client ¶ added in v0.2.0
type S3Client interface {
ListObjects(ctx context.Context, bucket, prefix, delimiter string, maxKeys int32, continueToken string) (*s3client.ListObjectsOutput, error)
Close() error
}
S3Client defines the interface for S3 operations used by the adapter. This interface allows for mocking in tests.
Click to show internal directories.
Click to hide internal directories.