s3

package
v2.2.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2020 License: AGPL-3.0 Imports: 16 Imported by: 4

Documentation

Index

Constants

View Source
const (
	Name         = `s3`
	AccountIDKey = `storerID`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Filesystem

type Filesystem struct {
	*local.Filesystem
	// contains filtered or unexported fields
}

Filesystem 文件系统存储引擎

func NewFilesystem

func NewFilesystem(ctx context.Context, typ string) (*Filesystem, error)

func (*Filesystem) Close

func (f *Filesystem) Close() error

Close 关闭连接

func (*Filesystem) Delete

func (f *Filesystem) Delete(dstFile string) error

Delete 删除文件

func (*Filesystem) DeleteDir

func (f *Filesystem) DeleteDir(dstDir string) error

DeleteDir 删除文件夹及其内部文件

func (*Filesystem) ErrIsNotExist

func (f *Filesystem) ErrIsNotExist(err error) bool

func (*Filesystem) Exists

func (f *Filesystem) Exists(file string) (bool, error)

Exists 判断文件是否存在

func (*Filesystem) FileDir

func (f *Filesystem) FileDir(subpath string) string

FileDir 物理路径文件夹

func (*Filesystem) FileInfo

func (f *Filesystem) FileInfo(file string) (os.FileInfo, error)

FileInfo 获取文件信息

func (*Filesystem) FixURL

func (f *Filesystem) FixURL(content string, embedded ...bool) string

FixURL 改写文件网址

func (*Filesystem) Get

func (f *Filesystem) Get(dstFile string) (io.ReadCloser, error)

Get 获取文件读取接口

func (*Filesystem) Move

func (f *Filesystem) Move(src, dst string) error

Move 移动文件

func (*Filesystem) Name

func (f *Filesystem) Name() string

Name 引擎名

func (*Filesystem) Put

func (f *Filesystem) Put(dstFile string, src io.Reader, size int64) (savePath string, viewURL string, err error)

Put 上传文件

func (*Filesystem) SendFile

func (f *Filesystem) SendFile(ctx echo.Context, file string) error

SendFile 下载文件

Jump to

Keyboard shortcuts

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