s3

package
v0.0.0-...-2d4236e Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3

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

func (*S3) BucketExists

func (s3 *S3) BucketExists(bucketName string) (bool, error)

func (*S3) Connect

func (s3 *S3) Connect(endpoint string, accessKey string, secretKey string, secure bool) error

Setups a connection to S3. Must be called before any other function

func (*S3) CreateBucket

func (s3 *S3) CreateBucket(name string) error

func (*S3) DeleteBucket

func (s3 *S3) DeleteBucket(name string) error

func (*S3) DeleteObject

func (s3 *S3) DeleteObject(bucketName string, objName string) error

func (*S3) GetObjectInfo

func (s3 *S3) GetObjectInfo(bucketName string, objName string) (*minio.ObjectInfo, error)

func (*S3) GetObjectString

func (s3 *S3) GetObjectString(bucketName string, objName string) (string, error)

Gets the specified object and returns the contained data as a string

func (*S3) GetObjects

func (s3 *S3) GetObjects(bucketName string, objectPrefix string, recursive bool) (<-chan minio.ObjectInfo, chan struct{})

GetObjects Returns a channel of object information and another channeling to control the underlying goroutine

'recursive' is whether all 'directories' under the given prefix are given, or only the directory directly under it

The second returned channel should be closed by the user when done using the object information channel

func (*S3) PutObject

func (s3 *S3) PutObject(bucketName string, objName string, data string) error

func (*S3) PutObjectWithMetadata

func (s3 *S3) PutObjectWithMetadata(bucketName string, objName string, data string, metadata map[string]string) error

Jump to

Keyboard shortcuts

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