s3driver

package
v0.0.0-...-0d4cdc4 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2015 License: MIT, MIT Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3Driver

type S3Driver struct {
	Username               string
	Password               string
	AWSRegion              string
	AWSCredentialsProvider aws.CredentialsProvider
	AWSBucketName          string
	WorkingDirectory       string
}

S3Driver ...

func (*S3Driver) Authenticate

func (d *S3Driver) Authenticate(username string, password string) bool

Authenticate checks that the FTP username and password match

func (*S3Driver) Bytes

func (d *S3Driver) Bytes(path string) int64

Bytes returns the ContentLength for the path if the key exists

func (*S3Driver) ChangeDir

func (d *S3Driver) ChangeDir(path string) bool

ChangeDir “changes directories” on S3 if there are files under the given path

func (*S3Driver) DeleteDir

func (d *S3Driver) DeleteDir(path string) bool

DeleteDir would delete a directory, but isn't currently implemented

func (*S3Driver) DeleteFile

func (d *S3Driver) DeleteFile(path string) bool

DeleteFile deletes the files from the given path

func (*S3Driver) DirContents

func (d *S3Driver) DirContents(path string) ([]os.FileInfo, bool)

DirContents lists “directory” contents on S3

func (*S3Driver) GetFile

func (d *S3Driver) GetFile(path string, position int64) (io.ReadCloser, bool)

GetFile returns a reader for the given path on S3

func (*S3Driver) MakeDir

func (d *S3Driver) MakeDir(path string) bool

MakeDir would normally make a directory but this isn't supported on S3

func (*S3Driver) ModifiedTime

func (d *S3Driver) ModifiedTime(path string) (time.Time, bool)

ModifiedTime returns the LastModifiedTime for the path if the key exists

func (*S3Driver) PutFile

func (d *S3Driver) PutFile(path string, reader io.Reader) bool

PutFile uploads a file to S3

func (*S3Driver) Rename

func (d *S3Driver) Rename(fromPath string, toPath string) bool

Rename isn't supported directly on S3

type S3DriverFactory

type S3DriverFactory struct {
	Username               string
	Password               string
	AWSRegion              string
	AWSCredentialsProvider aws.CredentialsProvider
	AWSBucketName          string
}

func (*S3DriverFactory) NewDriver

func (f *S3DriverFactory) NewDriver() (d graval.FTPDriver, err error)

Jump to

Keyboard shortcuts

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