s3

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store is an S3 implementation of a DocStore.

func New

func New(region string, bucket string, prefix string) (*Store, error)

New returns a new Store configured for the specified bucket and prefix.

func NewWithSession

func NewWithSession(sess *session.Session, bucket string, prefix string) (*Store, error)

NewWithSession returns a new Store configured for the specified session.

func (*Store) Delete

func (a *Store) Delete(ctx context.Context, key string) error

Delete removes an object from the S3 bucket.

func (*Store) Get

func (a *Store) Get(ctx context.Context, key string) ([]byte, error)

Get reads bytes stored in an S3 document.

func (*Store) GetStreaming

func (a *Store) GetStreaming(key string, w http.ResponseWriter) error

GetStreaming streams an S3 document's bytes into the supplied http.ResponseWriter

func (*Store) Put

func (a *Store) Put(ctx context.Context, key string, body []byte) error

Put writes bytes to an S3 object.

Jump to

Keyboard shortcuts

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