s3vfs

package module
v0.0.0-...-d193b95 Latest Latest
Warning

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

Go to latest
Published: May 23, 2015 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultS3Config = s3util.Config{
	Keys: &s3.Keys{
		AccessKey: os.Getenv("AWS_ACCESS_KEY_ID"),
		SecretKey: os.Getenv("AWS_SECRET_KEY"),
	},
	Service: s3.DefaultService,
}

Functions

func S3

func S3(bucket *url.URL, config *s3util.Config) rwvfs.FileSystem

S3 returns an implementation of FileSystem using the specified S3 bucket and config. If config is nil, DefaultS3Config is used.

The bucket URL is the full URL to the bucket on Amazon S3, including the bucket name and AWS region (e.g., https://s3-us-west-2.amazonaws.com/mybucket).

Types

type S3FS

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

func (*S3FS) Create

func (fs *S3FS) Create(path string) (io.WriteCloser, error)

Create opens the file at path for writing, creating the file if it doesn't exist and truncating it otherwise.

func (*S3FS) Lstat

func (fs *S3FS) Lstat(name string) (os.FileInfo, error)

func (*S3FS) Mkdir

func (fs *S3FS) Mkdir(name string) error

func (*S3FS) MkdirAll

func (fs *S3FS) MkdirAll(name string) error

MkdirAll implements rwvfs.MkdirAllOverrider.

func (*S3FS) Open

func (fs *S3FS) Open(name string) (vfs.ReadSeekCloser, error)

func (*S3FS) OpenFetcher

func (fs *S3FS) OpenFetcher(name string) (vfs.ReadSeekCloser, error)

func (*S3FS) OpenRange

func (fs *S3FS) OpenRange(name string, rangeHeader string) (f vfs.ReadSeekCloser, err error)

func (*S3FS) ReadDir

func (fs *S3FS) ReadDir(path string) ([]os.FileInfo, error)

func (*S3FS) Remove

func (fs *S3FS) Remove(name string) (err error)

func (*S3FS) Stat

func (fs *S3FS) Stat(name string) (os.FileInfo, error)

func (*S3FS) String

func (fs *S3FS) String() string

Jump to

Keyboard shortcuts

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