s3

package
v0.0.0-...-718b947 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

type Bucket interface {
	Files() ([]File, error)

	URL() string
}

type CDNBucket

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

func NewCDNBucket

func NewCDNBucket(urlFactory URLFactory, bucket Bucket) CDNBucket

func (CDNBucket) Files

func (b CDNBucket) Files() ([]File, error)

func (CDNBucket) URL

func (b CDNBucket) URL() string

type CDNFile

type CDNFile struct {
	File
	// contains filtered or unexported fields
}

func (CDNFile) URL

func (f CDNFile) URL() (string, error)

type CDNSignedURL

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

func (CDNSignedURL) String

func (u CDNSignedURL) String() (string, error)

type CDNSignedURLFactory

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

func NewCDNURLFactory

func NewCDNURLFactory(base, keyPairID, privateKey string) (CDNSignedURLFactory, error)

func (CDNSignedURLFactory) New

func (f CDNSignedURLFactory) New(path, fileName string) URL

type DirectURL

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

func (DirectURL) String

func (u DirectURL) String() (string, error)

type DirectURLFactory

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

func (DirectURLFactory) New

func (f DirectURLFactory) New(path, fileName string) URL

type File

type File interface {
	Key() string
	ETag() string

	Size() uint64
	LastModified() string

	URL() (string, error)
}

func NewCDNFile

func NewCDNFile(file File, urlFactory URLFactory) File

func NewPlainFile

func NewPlainFile(key, eTag string, size uint64, lastModified string, baseURL string) File

type PlainFile

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

func (PlainFile) ETag

func (f PlainFile) ETag() string

func (PlainFile) Key

func (f PlainFile) Key() string

func (PlainFile) LastModified

func (f PlainFile) LastModified() string

func (PlainFile) Size

func (f PlainFile) Size() uint64

func (PlainFile) URL

func (f PlainFile) URL() (string, error)

URL returns full URL of the S3 object

type URL

type URL interface {
	String() (string, error)
}

type URLFactory

type URLFactory interface {
	New(path, fileName string) URL
}

func NewDirectURLFactory

func NewDirectURLFactory(base string) URLFactory

Jump to

Keyboard shortcuts

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