fsoss

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultEndpoint = "oss-cn-hangzhou.aliyuncs.com"
)

Functions

func New

func New(config *Config) flysystem.IAdapter

Types

type Config

type Config struct {
	CDN             string
	Bucket          string
	Endpoint        string
	AccessKeyID     string
	AccessKeySecret string
	OssConfig       *oss.Config
	PathPrefix      string
}

type FsOss

type FsOss struct {
	gfs.AbstractAdapter
	Config *Config
	// contains filtered or unexported fields
}

func (*FsOss) Copy

func (f *FsOss) Copy(source, destination string) (bool, error)

func (*FsOss) CreateDirectory

func (f *FsOss) CreateDirectory(dirname string) error

func (*FsOss) Delete

func (f *FsOss) Delete(path string) (int64, error)

func (*FsOss) DiskName

func (f *FsOss) DiskName() string

func (*FsOss) Exists

func (f *FsOss) Exists(path string) (bool, error)

func (*FsOss) GFSAdapter added in v0.3.0

func (f *FsOss) GFSAdapter() gfs.IAdapter

func (*FsOss) MimeType

func (f *FsOss) MimeType(path string) (string, error)

func (*FsOss) Move

func (f *FsOss) Move(source, destination string) (bool, error)

func (*FsOss) Read

func (f *FsOss) Read(path string) ([]byte, error)

func (*FsOss) Size

func (f *FsOss) Size(path string) (int64, error)

func (*FsOss) URL added in v0.1.2

func (f *FsOss) URL(path string) (*url.URL, error)

func (*FsOss) Update

func (f *FsOss) Update(path string, contents []byte) (string, error)

func (*FsOss) UpdateStream

func (f *FsOss) UpdateStream(path, resource string) (string, error)

func (*FsOss) Write

func (f *FsOss) Write(path string, contents []byte) (string, error)

func (*FsOss) WriteReader added in v0.0.2

func (f *FsOss) WriteReader(path string, reader io.Reader) (string, error)

func (*FsOss) WriteStream

func (f *FsOss) WriteStream(path, resource string) (string, error)

Jump to

Keyboard shortcuts

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