awsutils

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BucketExists

func BucketExists(svc *s3.S3, bucketname string) (bool, error)

func CreateBucket

func CreateBucket(svc *s3.S3, bucket string) error

func DeleteBucket

func DeleteBucket(svc *s3.S3, bucket string) error

func DeleteFile

func DeleteFile(svc *s3.S3, bucket, filename string) error

func Diag

func Diag(params ...interface{})

func DownloadFile

func DownloadFile(svc s3iface.S3API, bucket, file string, writer io.WriterAt) (int64, error)

func EmptyBucket added in v0.2.0

func EmptyBucket(svc s3iface.S3API, bucket string) error

func GetAWSSession

func GetAWSSession() (*session.Session, error)

func GetAWSSessionFromStorage added in v0.3.0

func GetAWSSessionFromStorage(opts storage.S3) (*session.Session, error)

func IsFileNotFoundError added in v0.4.0

func IsFileNotFoundError(err error) bool

func ListObjects added in v0.3.0

func ListObjects(svc *s3.S3, bucket string) (*s3.ListObjectsOutput, error)

func S3Stat

func S3Stat(svc *s3.S3, bucket, filename string) (*s3.Object, error)

func UploadFileToS3 added in v0.3.0

func UploadFileToS3(sess client.ConfigProvider, fr io.ReadSeeker, bucket, filename string) error

Types

type FileNotFoundError

type FileNotFoundError struct {
	// contains filtered or unexported fields
}

func NewFileNotFoundErrorf added in v0.4.0

func NewFileNotFoundErrorf(args ...string) *FileNotFoundError

func (*FileNotFoundError) Error added in v0.4.0

func (f *FileNotFoundError) Error() string

Jump to

Keyboard shortcuts

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