awss3v2

package
v0.1.43 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DbFlag = make(map[string]bool)

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 Setup

func Setup(gcfg *AwsS3Cfg, lfp *os.File, dbf map[string]bool) (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