uploader

package
v0.0.0-...-4665912 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomReader

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

func (*CustomReader) Read

func (r *CustomReader) Read(p []byte) (int, error)

func (*CustomReader) ReadAt

func (r *CustomReader) ReadAt(p []byte, off int64) (int, error)

func (*CustomReader) Seek

func (r *CustomReader) Seek(offset int64, whence int) (int64, error)

type Uploader

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

func New

func New(svc s3iface.S3API, uSvc s3manageriface.UploaderAPI, logger *logrus.Logger, bucketName *string, prefix *string, kmsKeyID *string, forceUpload *bool, fs afero.Fs) *Uploader

func (*Uploader) FileChecksum

func (u *Uploader) FileChecksum(filename *string) (string, error)

func (*Uploader) FileExists

func (u *Uploader) FileExists(remotePath *string) bool

func (*Uploader) MakeURL

func (u *Uploader) MakeURL(remotePath *string) string

func (*Uploader) URLTos3Path

func (u *Uploader) URLTos3Path(s3Url string) (string, error)

func (*Uploader) UploadWithDedup

func (u *Uploader) UploadWithDedup(filename *string, extension string) (string, error)

type Uploaderiface

type Uploaderiface interface {
	UploadWithDedup(*string, string) (string, error)
	FileExists(*string) bool
	FileChecksum(*string) (string, error)
	MakeURL(*string) string
	URLTos3Path(string) (string, error)
}

Jump to

Keyboard shortcuts

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