s3store

package
v0.0.0-...-963cbb1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package s3store contains the resources required to interact with an S3 store.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3ObjectStore

type S3ObjectStore struct {
	// Source object key
	Client s3utils.Client
	// contains filtered or unexported fields
}

S3ObjectStore allows interaction with an S3 object store.

func New

func New(client s3utils.Client, baseURI storage.Path) (*S3ObjectStore, error)

New creates a new S3ObjectStore instance.

func (*S3ObjectStore) BaseURI

func (s *S3ObjectStore) BaseURI() storage.Path

BaseURI gets the base URI.

func (*S3ObjectStore) Delete

func (s *S3ObjectStore) Delete(location storage.Path) error

Delete removes an object from a bucket.

func (*S3ObjectStore) DeleteFolder

func (s *S3ObjectStore) DeleteFolder(location storage.Path) error

DeleteFolder removes objects with a certain prefix.

func (*S3ObjectStore) Get

func (s *S3ObjectStore) Get(location storage.Path) ([]byte, error)

Get retrieves an object.

func (*S3ObjectStore) Head

func (s *S3ObjectStore) Head(location storage.Path) (storage.ObjectMeta, error)

Head retrieves metadata from an object without returning the object itself.

func (*S3ObjectStore) IsListOrdered

func (s *S3ObjectStore) IsListOrdered() bool

IsListOrdered returns true.

func (*S3ObjectStore) List

func (s *S3ObjectStore) List(prefix storage.Path, previousResult *storage.ListResult) (storage.ListResult, error)

List lists objects in a bucket using pagination.

func (*S3ObjectStore) ListAll

func (s *S3ObjectStore) ListAll(prefix storage.Path) (storage.ListResult, error)

ListAll lists objects in a bucket.

func (*S3ObjectStore) Put

func (s *S3ObjectStore) Put(location storage.Path, data []byte) error

Put adds an object to a bucket.

func (*S3ObjectStore) ReadAt

func (s *S3ObjectStore) ReadAt(location storage.Path, p []byte, off int64, max int64) (n int, err error)

ReadAt counts the number of bytes read from an object.

func (*S3ObjectStore) Rename

func (s *S3ObjectStore) Rename(from storage.Path, to storage.Path) error

Rename renames an object.

func (*S3ObjectStore) RenameIfNotExists

func (s *S3ObjectStore) RenameIfNotExists(from storage.Path, to storage.Path) error

RenameIfNotExists renames an object if it does not exist.

func (*S3ObjectStore) SetStorageClass

func (s *S3ObjectStore) SetStorageClass(storageClass types.StorageClass)

SetStorageClass sets the storage class for uploaded objects.

func (*S3ObjectStore) SupportsWriter

func (s *S3ObjectStore) SupportsWriter() bool

SupportsWriter returns false.

func (*S3ObjectStore) Writer

func (s *S3ObjectStore) Writer(to storage.Path, flag int) (io.Writer, func() error, error)

Writer returns an operation not supported error.

Jump to

Keyboard shortcuts

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