s3store

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(h *S3Store)

func WithACL added in v0.1.7

func WithACL(acl string) Option

func WithBaseDir

func WithBaseDir(baseDir string) Option

func WithPathPrefix

func WithPathPrefix(prefix string) Option

type S3Store

type S3Store struct {
	S3       *s3.S3
	Uploader *s3manager.Uploader
	Bucket   string

	BaseDir    string
	PathPrefix string
	ACL        string
}

func New

func New(sess *session.Session, bucket string, options ...Option) *S3Store

func (*S3Store) Load

func (s *S3Store) Load(r *http.Request, image string) (*imagor.File, error)

func (*S3Store) Path

func (s *S3Store) Path(image string) (string, bool)

func (*S3Store) Save

func (s *S3Store) Save(ctx context.Context, image string, file *imagor.File) error

Jump to

Keyboard shortcuts

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