flys3

package
v0.0.0-...-461a674 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

Adapter represents a AWS S3 adapter.

func NewAdapter

func NewAdapter(client s3iface.S3API, bucket string) *Adapter

NewAdapter creates a new AWS S3 adapter.

func (*Adapter) Copy

func (a *Adapter) Copy(src, dst string) error

Copy will copy a file to a new path on AWS S3.

func (*Adapter) CreateDir

func (a *Adapter) CreateDir(path string, args ...interface{}) error

CreateDir will create a directory.

func (*Adapter) Delete

func (a *Adapter) Delete(path string) error

Delete will delete a file on AWS S3.

func (*Adapter) DeleteDir

func (a *Adapter) DeleteDir(path string) error

DeleteDir will delete a directory.

func (*Adapter) Has

func (a *Adapter) Has(path string) (bool, error)

Has will check whether a file exists.

func (*Adapter) HasDir

func (a *Adapter) HasDir(path string) (bool, error)

HasDir will check whether a directory exists.

func (*Adapter) MimeType

func (a *Adapter) MimeType(path string) (string, error)

MimeType will return the file mime type.

func (*Adapter) Read

func (a *Adapter) Read(path string) (string, error)

Read will read a file on AWS S3.

func (*Adapter) ReadAndDelete

func (a *Adapter) ReadAndDelete(path string) (string, error)

ReadAndDelete will read a file and delete it if any.

func (*Adapter) Rename

func (a *Adapter) Rename(src string, dst string) error

Rename will rename a file to a new path on AWS S3.

func (*Adapter) Write

func (a *Adapter) Write(path, content string, args ...interface{}) error

Write will write a a new file AWS S3.

Jump to

Keyboard shortcuts

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