Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrKeyNotFound = errors.New("key not found")
Functions ¶
func AwsBucketToMap ¶
func AwsBucketToMap(m map[string]string, b AwsS3Bucket) map[string]string
Types ¶
type AwsS3Bucket ¶
type AwsS3Bucket struct { Name string `errorTxt:"bucket name" mandatory:"yes"` Prefix string `errorTxt:"bucket prefix"` Region string `errorTxt:"bucket region" mandatory:"yes"` Dsn string }
func NewAwsBucket ¶
func NewAwsBucket(c *shared.ConnectionDetails) *AwsS3Bucket
func ParseDSN ¶
func ParseDSN(bucketPrefix string, region string) (retval AwsS3Bucket, err error)
ParseDSN expects bucketPrefix to be of the form [s3://]<bucket>/<prefix> It returns an AwsS3Bucket populated with the components of bucketPrefix and the supplied region. If there is a parsing error it returns an error. The region may be empty.
func (AwsS3Bucket) GetScheme ¶
func (d AwsS3Bucket) GetScheme() (string, error)
func (AwsS3Bucket) Parse ¶
func (d AwsS3Bucket) Parse() error
type BasicClient ¶
type BasicClient interface { Lister Getter Putter BufferPutter Deleter }
func NewBasicClient ¶
func NewBasicClient(bucket, region, prefix string) BasicClient
type BufferPutter ¶
type BufferPutter interface {
BufferPut(key string, buf io.ReadSeeker) (err error)
}
BufferPutter can be used to put a file to S3 since File implements Read and Seek.
type Client ¶
type Client interface { BasicClient Mover }
func NewClientFromBasic ¶
func NewClientFromBasic(basicClient BasicClient) Client
Click to show internal directories.
Click to hide internal directories.