aws

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package aws package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObjectStore

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

ObjectStore implementation for AWS S3

func New

func New(ctx context.Context, logger logger.Logger, pluginData map[string]string) (*ObjectStore, error)

New returns an S3 implementation of the ObjectStore interface

func (*ObjectStore) DoesObjectExist

func (s *ObjectStore) DoesObjectExist(ctx context.Context, key string) (bool, error)

DoesObjectExist returns a boolean indicating an object's existence. It doesn't download the object itself but simply queries for it's metadata.

func (*ObjectStore) DownloadObject

func (s *ObjectStore) DownloadObject(ctx context.Context, key string, w io.WriterAt, options *objectstore.DownloadOptions) error

DownloadObject downloads an object using a concurrent download

func (*ObjectStore) GetObjectStream

func (s *ObjectStore) GetObjectStream(ctx context.Context, key string, options *objectstore.DownloadOptions) (io.ReadCloser, error)

GetObjectStream returns an object stream for the object at the specified key

func (*ObjectStore) GetPresignedURL

func (s *ObjectStore) GetPresignedURL(ctx context.Context, key string) (string, error)

GetPresignedURL returns a presigned URL which can be used to temporarily provide access to an object from object storage without requiring IAM or AWS credentials.

func (*ObjectStore) UploadObject

func (s *ObjectStore) UploadObject(ctx context.Context, key string, body io.Reader) error

UploadObject uploads an object to the object store

Jump to

Keyboard shortcuts

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