Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BucketLister ¶
type BucketLister struct { Bucket string AWSSession *session.Session // contains filtered or unexported fields }
BucketLister is a directory listing service for S3
func NewBucketLister ¶
func NewBucketLister(bucket, prefix string, awsSession *session.Session) *BucketLister
NewBucketLister returns a *BucketLister
prefix is the starting point for this lister
func (*BucketLister) AddBucketLister ¶
func (b *BucketLister) AddBucketLister(child *BucketLister)
AddBucketLister adds a lister to the root lister
If a lister is attached, it will show up as a directory link
func (*BucketLister) Empty ¶
func (b *BucketLister) Empty() (bool, error)
Empty returns true if the bucket contains zero keys
func (*BucketLister) Mount ¶
func (b *BucketLister) Mount() string
Mount returns the mount point of this lister
func (*BucketLister) ServeHTTP ¶
func (b *BucketLister) ServeHTTP(w http.ResponseWriter, req *http.Request)
ServeHTTP implements http.Handler
type File ¶
type File struct { Name string `json:"name"` LastModified time.Time `json:"last_modified"` Size int64 `json:"size"` }
File represents an object in a PrefixListing
func (*File) BaseEscaped ¶
func (*File) LastModifiedString ¶
func (*File) SizeString ¶
type Prefix ¶
type Prefix string
Prefix represents a prefix path
func (Prefix) URLEscaped ¶
URLEscaped returns prefix url encoded
type PrefixListing ¶
PrefixListing is a compact listing of an S3 prefix
func (*PrefixListing) HasFile ¶
func (p *PrefixListing) HasFile(key string) *File
HasFile returns *File if file exists in listing
func (*PrefixListing) PrefixStructs ¶
func (p *PrefixListing) PrefixStructs() []Prefix
PrefixStructs returns prefix objects
type SortMountedAt ¶
type SortMountedAt []*BucketLister
SortMountedAt sorts a slice of bucketlisters by mountedAt
func (SortMountedAt) Len ¶
func (s SortMountedAt) Len() int
func (SortMountedAt) Less ¶
func (s SortMountedAt) Less(i, j int) bool
func (SortMountedAt) Swap ¶
func (s SortMountedAt) Swap(i, j int)