Documentation ¶
Index ¶
- Variables
- func NewAliyunBucket() (bucket *oss.Bucket, err error)
- func NewFileInfo(options ...Option) interfaces.FileInfo
- func NewFileInfoByFs(info fs.FileInfo, options ...Option) interfaces.FileInfo
- func NewMinioClient() (client *minio.Client, err error)
- func NewTencentClient() (*cos.Client, error)
- func Oss() interfaces.Oss
- type FileInfo
- type Option
- func WithFileContentType(fileContentType string) Option
- func WithFileIsDir(fileIsDir bool) Option
- func WithFileModTime(fileModTime time.Time) Option
- func WithFileMode(fileMode fs.FileMode) Option
- func WithFileSys(fileSys interface{}) Option
- func WithFilename(filename string) Option
- func WithFilesize(filesize int64) Option
- func WithReader(reader io.Reader) Option
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 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 ¶
type Option ¶
type Option func(*FileInfo)
func WithFileContentType ¶
func WithFileIsDir ¶
func WithFileModTime ¶
func WithFileMode ¶
func WithFileSys ¶
func WithFileSys(fileSys interface{}) Option
func WithFilename ¶
func WithFilesize ¶
func WithReader ¶
Click to show internal directories.
Click to hide internal directories.