s3

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(c Config, service s3iface.S3API) (gost.Directory, error)

func SetService deprecated

func SetService(s s3iface.S3API)

Deprecated: SetService will be removed in the next major release

Types

type Config

type Config struct {
	Id     string
	Secret string
	Token  string
	Region string
	Bucket string
}

type Directory

type Directory struct {
	Path string
	Fs   *Filesystem
}

func (*Directory) Create

func (d *Directory) Create() error

func (*Directory) Delete

func (d *Directory) Delete() error

func (*Directory) Directories

func (d *Directory) Directories() ([]gost.Directory, error)

func (*Directory) Directory

func (d *Directory) Directory(path string) gost.Directory

func (*Directory) Exists

func (d *Directory) Exists() bool

func (*Directory) File

func (d *Directory) File(path string) gost.File

func (*Directory) Files

func (d *Directory) Files() ([]gost.File, error)

func (*Directory) GetPath

func (d *Directory) GetPath() string

func (*Directory) Stat

func (d *Directory) Stat() (gost.FileInfo, error)

func (*Directory) String

func (d *Directory) String() string

type File

type File struct {
	Path string
	Fs   *Filesystem
	// contains filtered or unexported fields
}

func (*File) Close

func (f *File) Close() error

func (*File) Copy

func (f *File) Copy(newName string) error

func (*File) CopyTo

func (f *File) CopyTo(dir gost.Directory, newName ...string) error

func (*File) Delete

func (f *File) Delete() error

func (*File) Directory

func (f *File) Directory() gost.Directory

func (*File) Exists

func (f *File) Exists() bool

func (*File) GetPath

func (f *File) GetPath() string

func (*File) GetSignedUrl

func (f *File) GetSignedUrl(ttl time.Duration) (string, error)

func (*File) Read

func (f *File) Read(p []byte) (n int, err error)

func (*File) ReadString

func (f *File) ReadString() (string, error)

func (*File) Stat

func (f *File) Stat() (gost.FileInfo, error)

func (*File) String

func (f *File) String() string

func (*File) Write

func (f *File) Write(p []byte) (n int, err error)

func (*File) WriteString

func (f *File) WriteString(s string) error

type Filesystem

type Filesystem struct {
	Service s3iface.S3API
	Config  Config
}

Jump to

Keyboard shortcuts

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