s3

package
v0.0.0-...-8749f2e Latest Latest
Warning

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

Go to latest
Published: May 15, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsS3ErrCode

func IsS3ErrCode(err error, code string) bool

IsS3ErrCode returns if the supplied error is of a specific S3 error code

Types

type S3Client

type S3Client interface {
	// PutFile puts a single file to a bucket at the specified key
	PutFile(bucket, key, path string) error

	// PutDirectory puts a complete directory into a bucket key prefix, with each file in the directory
	// a separate key in the bucket.
	PutDirectory(bucket, key, path string) error

	// GetFile downloads a file to a local file path
	GetFile(bucket, key, path string) error

	// GetDirectory downloads a directory to a local file path
	GetDirectory(bucket, key, path string) error

	// IsDirectory tests if the key is acting like a s3 directory
	IsDirectory(bucket, key string) (bool, error)
}

func NewS3Client

func NewS3Client(opts S3ClientOpts) (S3Client, error)

NewS3Client instantiates a new S3 client object backed

type S3ClientOpts

type S3ClientOpts struct {
	Endpoint  string
	Region    string
	Secure    bool
	AccessKey string
	SecretKey string
}

Jump to

Keyboard shortcuts

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