gos3

package
v0.0.0-...-26e3963 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ErrNoSuchKey = "ITEM_NOT_FOUND"

Variables

This section is empty.

Functions

func GetObject

func GetObject(svc interface{}, bucket, key string) ([]byte, error)

GetObject returns the S3 object at the given bucket/key as a byte slice.

func InitSesh

func InitSesh() interface{}

InitSesh initializes a new AWS sesions and S3 client

func InitUploader

func InitUploader(svc interface{}, partSize int64) interface{}

func NewS3Client

func NewS3Client(session goaws.Session) interface{}

Types

type UploadFileResponse

type UploadFileResponse struct {
	Location  string `json:"location"`
	VersionID string `json:"version_id"`
	UploadID  string `json:"upload_id"`
	ETag      string `json:"etag"`
}

UploadFileResponse contains the data returned by the S3 Upload operation.

func UploadFile

func UploadFile(uploader interface{}, bucket, key string, file io.Reader, publicRead bool) (UploadFileResponse, error)

UploadFile uploads a new file to the given S3 bucket.

Jump to

Keyboard shortcuts

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