s3driver

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

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

Go to latest
Published: Jan 9, 2020 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultRegion = "us-east-1"

Variables

This section is empty.

Functions

func CredentialsFromCtx

func CredentialsFromCtx(ctx context.Context) (*credentials.Credentials, bool)

func CtxWithCredentials

func CtxWithCredentials(ctx context.Context, creds *credentials.Credentials) context.Context

func CtxWithTimeout

func CtxWithTimeout(ctx context.Context, timeout time.Duration) context.Context

func NewObjectWriter

func NewObjectWriter(svc s3iface.S3API, bucket, key, canonicalURL string) driver.ObjectWriter

func RegisterDefaultDriver

func RegisterDefaultDriver()

func TimeoutFromCtx

func TimeoutFromCtx(ctx context.Context) (*time.Duration, bool)

Types

type Driver

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

func (*Driver) Create

func (d *Driver) Create(ctx context.Context, url string) (driver.ObjectWriter, error)

func (*Driver) Name

func (d *Driver) Name() string

func (*Driver) Open

func (d *Driver) Open(ctx context.Context, url string, size int64) (driver.Object, error)

func (*Driver) Readdir

func (d *Driver) Readdir(ctx context.Context, url string) ([]os.FileInfo, error)

func (*Driver) Remove

func (d *Driver) Remove(ctx context.Context, url string) error

func (*Driver) Stat

func (d *Driver) Stat(ctx context.Context, url string) (os.FileInfo, error)

Jump to

Keyboard shortcuts

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