awsgo

package module
v0.0.0-...-8f0a586 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2019 License: MIT Imports: 12 Imported by: 0

README

AWS Go

AWS Service to simplify AWS SDK functions

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsService

type AwsService struct {
	Session *session.Session
}

func NewAwsService

func NewAwsService(endpoint, region, awsKey, awsSecret string, s3ForcePathStyle, disableSSL bool) (*AwsService, error)

func (*AwsService) DownloadObject

func (a *AwsService) DownloadObject(bucket, key string, retry int) (data []byte, n int64, err error)

func (*AwsService) DownloadObjectToFile

func (a *AwsService) DownloadObjectToFile(file *os.File, bucket, key string, retry int) (n int64, err error)

func (*AwsService) GetObject

func (a *AwsService) GetObject(ctx context.Context, bucket, key string) (*s3.GetObjectOutput, error)

func (*AwsService) ListObjects

func (a *AwsService) ListObjects(path, bucket string, fn func(*s3.ListObjectsV2Output, bool) bool) error

func (*AwsService) ObjectExists

func (a *AwsService) ObjectExists(bucket, path string) (bool, error)

func (*AwsService) ObjectInfo

func (a *AwsService) ObjectInfo(bucket, path string) (*s3.HeadObjectOutput, error)

func (*AwsService) UploadDir

func (a *AwsService) UploadDir(path, bucket, key string) error

func (*AwsService) UploadInput

func (a *AwsService) UploadInput(obj *s3manager.UploadInput, retry int) (uploadOutput *s3manager.UploadOutput, err error)

func (*AwsService) UploadObject

func (a *AwsService) UploadObject(bucket, key string, data []byte, retry int) (uploadOutput *s3manager.UploadOutput, err error)

Jump to

Keyboard shortcuts

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