s3

package
v0.0.0-...-5d142b5 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2016 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewS3FileSystem

func NewS3FileSystem(url string) (filesystem.FileSystem, error)

Types

type S3Config

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

type S3File

type S3File struct {
	S3Name    string      // base name of the file
	S3Path    string      // Path to file
	S3Size    int64       // length in bytes for regular files; system-dependent for others
	S3ModTime time.Time   // modification time
	S3IsDir   bool        // abbreviation for Mode().IsDir()
	S3Mode    os.FileMode // abbreviation for Mode().IsDir()
}

func (S3File) IsDir

func (f S3File) IsDir() bool

func (S3File) ModTime

func (f S3File) ModTime() time.Time

func (S3File) Mode

func (f S3File) Mode() os.FileMode

func (S3File) Name

func (f S3File) Name() string

func (S3File) Path

func (f S3File) Path() string

func (S3File) Size

func (f S3File) Size() int64

func (S3File) Sys

func (f S3File) Sys() interface{}

type S3FileSystem

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

S3 File System implementation

func New

func New(url string) (*S3FileSystem, error)

Create a new S3FileSystem object. Requires an S3 URL to configure

func (S3FileSystem) Delete

func (fs S3FileSystem) Delete(file string) error

func (S3FileSystem) Dir

func (fs S3FileSystem) Dir(dir string) ([]filesystem.File, error)

func (S3FileSystem) FileMap

func (fs S3FileSystem) FileMap(root filesystem.File) filesystem.FileMap

func (S3FileSystem) FileTree

func (fs S3FileSystem) FileTree(root filesystem.File) *filesystem.FileTree

func (S3FileSystem) MkDir

func (fs S3FileSystem) MkDir(file filesystem.File) error

func (S3FileSystem) Read

func (fs S3FileSystem) Read(f filesystem.File) ([]byte, error)

func (S3FileSystem) ReadFile

func (fs S3FileSystem) ReadFile(file string) (filesystem.File, error)

func (S3FileSystem) Write

func (fs S3FileSystem) Write(file filesystem.File, data []byte, perm os.FileMode) error

func (*S3FileSystem) WriteRemote

func (f *S3FileSystem) WriteRemote(req *WriteRequest, res *WriteResponse) error

type WriteRequest

type WriteRequest struct {
	// TODO: How do we make this protocol agnostic??
	// "type not registered for interface: fs.StdFile"
	File filesystem.File
	//File fs.StdFile
	Data []byte
	Perm os.FileMode
}

type WriteResponse

type WriteResponse struct {
	Success bool
}

Jump to

Keyboard shortcuts

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