upload

package
v0.0.0-...-6703be6 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2019 License: MIT, MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContentType = map[string]string{
	"(.html|.htm)$":       "text/html",
	"(.css)$":             "text/css",
	"(.txt)$":             "text/plain",
	"(.gif)$":             "image/gif",
	"(.ico)$":             "image/x-icon",
	"(.jpg|jpeg)$":        "image/jpeg",
	"(.png)$":             "image/png",
	"(.svg)$":             "image/svg+xml",
	"(.js|.map|.js.map)$": "application/javascript",
	"(.eot)$":             "application/vnd.ms-fontobject",
	"(.pdf)$":             "application/pdf",
	"(.zip)$":             "application/zip",
	"(.json)$":            "application/json",
	"(.otf)$":             "font/otf",
	"(.mp4)$":             "video/x-mpeg",
	"(.ogg)$":             "audio/ogg",
	"(.mpeg)$":            "audio/mpeg",
	"(.webm)$":            "audio/webm",
	"(.ttf)$":             "application/x-font-ttf",
}

Functions

func ClearBucket

func ClearBucket(svc *s3.S3, bucketName string)

*

*

func ExitErrorf

func ExitErrorf(msg string, args ...interface{})

*

*

func GetContentType

func GetContentType(fileName string) string

*

*

func ListBuckets

func ListBuckets(svc *s3.S3) []*s3.Bucket

*

  • Returns a list of buckets

func RemoveContent

func RemoveContent(svc *s3.S3, bucketName string)

*

  • Remove all content from the Bucket

func Upload

func Upload(files []string, config config.Config)

* Upload file to S3

Types

This section is empty.

Jump to

Keyboard shortcuts

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