awss3v2

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFileToS3

func AddFileToS3(s *session.Session, localFileDir, fileDir string) error

AddFileToS3 will upload a single file to S3, it will require a pre-built aws session and will set file info like content type and encryption on the uploaded file.

func AddFileToS3ACL

func AddFileToS3ACL(s *session.Session, localFileDir, fileDir, perm string) error

AddFileToS3ACL will upload a single file to S3, it will require a pre-built aws session and will set file info like content type and encryption on the uploaded file.

perm must be "public-read" or "private".

func AddFileToS3ACLBucket

func AddFileToS3ACLBucket(s *session.Session, bucket, localFileDir, fileDir, perm string) error

func GetS3FileFromS3

func GetS3FileFromS3(s *session.Session, to, bucket, s3fn string) (err error)

func Setup

func Setup(gcfg *AwsS3Cfg, lfp *os.File) (s *session.Session, err error)

Types

type AwsS3Cfg

type AwsS3Cfg struct {
	S3_Region string `json:"aws_s3_region" default:"us-east-1"`
	S3_Bucket string `json:"aws_s3_bucket" default:"a-document"`
	S3_Perms  string `json:"aws_s3_perms" default:"private"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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