s3

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsBucket

func IsBucket(session config.AWSSession, bucketName string) bool

IsBucket validator to ensure bucket is available in profile

func ListObjects

func ListObjects(svc s3iface.S3API, bucketName string, prefix string,
	objects chan<- StoredObject, listErrors chan<- error, done chan<- bool)

ListObjects lists all objects in the specified bucket

Types

type Object added in v0.0.3

type Object struct {
	Key string
}

Object provides an Object with a Key

func (Object) GetContent added in v0.0.3

func (o Object) GetContent(session *config.AWSSession, bucketName string) ([]byte, int64, error)

GetContent loads the content of a S3 object key into a buffer

func (Object) GetKey added in v0.0.3

func (o Object) GetKey() string

GetKey is a getter method to get the Key of the Object

type StoredObject added in v0.0.3

type StoredObject interface {
	GetKey() string
	GetContent(*config.AWSSession, string) ([]byte, int64, error)
}

StoredObject provides an interface for Objects in a Cloud Storage

func NewObject added in v0.0.3

func NewObject(key string) StoredObject

NewObject is a constructor for Objects

Jump to

Keyboard shortcuts

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