s3uploader

package
v0.0.0-...-342501b Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSLocalCreds

type AWSLocalCreds struct {
	Valid     bool
	AWSId     string
	AWSSecret string
}

AWSLocalCreds local creds for debugging

type S3Uploader

type S3Uploader struct {
	S3Session *s3.S3

	Log                        *logrus.Logger
	S3Bucket                   string
	S3Region                   string
	S3UploadTimeOutMs          int
	S3GrantReadToUploadedFiles bool
	AWSCreds                   AWSLocalCreds
}

S3Uploader HTTP uploader class class

func New

func New(log *logrus.Logger, s3Bucket string, s3Region string, s3UploadTimeOutMs int, s3GrantReadToUploadedFiles bool, awsCreds AWSLocalCreds) S3Uploader

New Creates a chunk instance

func (*S3Uploader) UploadData

func (s *S3Uploader) UploadData(buffer []byte, dstPathFile string, headers map[string]string) error

UploadData upload bytes

func (*S3Uploader) UploadLocalFile

func (s *S3Uploader) UploadLocalFile(localFilename string, dstPathFile string, headers map[string]string) error

UploadLocalFile Uploads a file from the filesystem

Jump to

Keyboard shortcuts

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