s3

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Presign

func Presign(key string, cf Config) (string, error)

Presign generates a pre-signed URL for given S3 key

func Upload

func Upload(r UploadRequest, cf Config) (string, error)

Upload uploads a file to S3 base on given request

Types

type Config

type Config struct {
	Region string
	Bucket string
}

Config struct with general settings for the upload

type UploadRequest

type UploadRequest struct {
	Filename     string
	OriginalName string
	ContentType  string
}

UploadRequest contains the parameters to process a file upload to S3

Jump to

Keyboard shortcuts

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