oss

package
v0.0.0-...-997d260 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Aliyun = new(aliyun)
View Source
var HuaWeiObs = new(_obs)
View Source
var Local = new(local)
View Source
var Minio = new(_minio)
View Source
var Qiniu = new(qiniu)
View Source
var Tencent = new(tencent)

Functions

func NewAliyunBucket

func NewAliyunBucket() (bucket *oss.Bucket, err error)

func NewFileInfo

func NewFileInfo(options ...Option) interfaces.FileInfo

func NewFileInfoByFs

func NewFileInfoByFs(info fs.FileInfo, options ...Option) interfaces.FileInfo

func NewMinioClient

func NewMinioClient() (client *minio.Client, err error)

func NewTencentClient

func NewTencentClient() (*cos.Client, error)

func Oss

func Oss() interfaces.Oss

Types

type FileInfo

type FileInfo struct {
	Filename        string      // base name of the file
	FileContentType string      // Content-Type of the given data
	Filesize        int64       // length in bytes for regular files; system-dependent for others
	FileMode        fs.FileMode // file mode bits
	FileModTime     time.Time   // modification time
	FileIsDir       bool        // abbreviation for Mode().IsDir()
	FileSys         interface{} // underlying data source (can return nil)
	FileHeader      textproto.MIMEHeader
	// contains filtered or unexported fields
}

func (*FileInfo) ContentType

func (f *FileInfo) ContentType() string

func (*FileInfo) IsDir

func (f *FileInfo) IsDir() bool

func (*FileInfo) ModTime

func (f *FileInfo) ModTime() time.Time

func (*FileInfo) Mode

func (f *FileInfo) Mode() fs.FileMode

func (*FileInfo) Name

func (f *FileInfo) Name() string

func (*FileInfo) Size

func (f *FileInfo) Size() int64

func (*FileInfo) Sys

func (f *FileInfo) Sys() interface{}

type Option

type Option func(*FileInfo)

func WithFileContentType

func WithFileContentType(fileContentType string) Option

func WithFileIsDir

func WithFileIsDir(fileIsDir bool) Option

func WithFileModTime

func WithFileModTime(fileModTime time.Time) Option

func WithFileMode

func WithFileMode(fileMode fs.FileMode) Option

func WithFileSys

func WithFileSys(fileSys interface{}) Option

func WithFilename

func WithFilename(filename string) Option

func WithFilesize

func WithFilesize(filesize int64) Option

func WithReader

func WithReader(reader io.Reader) Option

Jump to

Keyboard shortcuts

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