package s3

import "github.com/docker/distribution/registry/storage/driver/s3"

Package s3 provides a storagedriver.StorageDriver implementation to store blobs in Amazon S3 cloud storage.

This package leverages the AdRoll/goamz client library for interfacing with s3.

Because s3 is a key, value store the Stat call does not support last modification time for directories (directories are an abstraction for key, value stores)

Keep in mind that s3 guarantees only eventual consistency, so do not assume that a successful write will mean immediate access to the data written (although in most regions a new object put has guaranteed read after write). The only true guarantee is that once you call Stat and receive a certain file size, that much of the file is already accessible.

Index

Types

type Driver

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

Driver is a storagedriver.StorageDriver implementation backed by Amazon S3 Objects are stored at absolute keys in the provided bucket.

func FromParameters

func FromParameters(parameters map[string]interface{}) (*Driver, error)

FromParameters constructs a new Driver with a given parameters map Required parameters: - accesskey - secretkey - region - bucket - encrypt

func New

func New(params DriverParameters) (*Driver, error)

New constructs a new Driver with the given AWS credentials, region, encryption flag, and bucketName

func (*Driver) S3BucketKey

func (d *Driver) S3BucketKey(path string) string

S3BucketKey returns the s3 bucket key for the given storage driver path.

type DriverParameters

type DriverParameters struct {
	AccessKey     string
	SecretKey     string
	Bucket        string
	Region        aws.Region
	Encrypt       bool
	Secure        bool
	V4Auth        bool
	ChunkSize     int64
	RootDirectory string
}

DriverParameters A struct that encapsulates all of the driver parameters after all values have been set

Source Files

s3.go

Version
v2.2.1+incompatible
Published
Dec 9, 2015
Platform
js/wasm
Imports
17 packages
Last checked
10 hours ago

Tools for package owners.