s3

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Region, Bucket, Key                        string
	Concurrency, PresignTTLMinutes, MaxRetries uint
}

Options contains the information needed to push/pull an image from S3

type StorageManager

type StorageManager struct {
	// LogFunc is function that logs a formatted string somewhere
	LogFunc func(string, ...interface{})
	// contains filtered or unexported fields
}

StorageManager is an object capable of pushing/pulling from S3

func (*StorageManager) Push

func (m *StorageManager) Push(contentType string, in io.Reader, opts Options) (string, error)

Push reads data from in, pushes it to S3 and returns the S3 location URL (optionally presigned)

func (*StorageManager) SetCredentials

func (m *StorageManager) SetCredentials(accessKeyID, secretAccessKey string)

SetCredentials initializes StorageManager with the provided AWS credentials

Jump to

Keyboard shortcuts

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