Documentation
¶
Index ¶
- func NewBucket(cfg config.File) (*oss.Bucket, error)
- func NewClient(cfg config.File) *cos.Client
- type AliyunOSS
- func (a *AliyunOSS) DeleteFile(key string) error
- func (a *AliyunOSS) MultipartUploadFile(file *multipart.FileHeader, keyPrefix ...string) (string, string, string, int64, error)
- func (a *AliyunOSS) UploadFile(file *os.File, keyPrefix ...string) (reqPath, fileKey, md5 string, err error)
- func (a *AliyunOSS) UploadTokenGet(key string, uuid string) (token string, fileKey string, err error)
- type AwsS3
- type Local
- func (l *Local) DeleteFile(key string) error
- func (l *Local) MultipartUploadFile(file *multipart.FileHeader, keyPrefix ...string) (string, string, string, int64, error)
- func (l *Local) UploadFile(file *os.File, keyPrefix ...string) (reqPath, fileKey, md5 string, err error)
- func (l *Local) UploadTokenGet(key string, uuid string) (token string, fileKey string, err error)
- type OSS
- type Qiniu
- func (q *Qiniu) DeleteFile(key string) error
- func (q *Qiniu) MultipartUploadFile(file *multipart.FileHeader, keyPrefix ...string) (string, string, string, int64, error)
- func (q *Qiniu) UploadFile(file *os.File, keyPrefix ...string) (reqPath, fileKey, md5 string, err error)
- func (q *Qiniu) UploadTokenGet(key string, uuid string) (token string, fileKey string, err error)
- type TencentCOS
- func (t *TencentCOS) DeleteFile(key string) error
- func (t *TencentCOS) MultipartUploadFile(file *multipart.FileHeader, keyPrefix ...string) (string, string, string, int64, error)
- func (t *TencentCOS) UploadFile(file *os.File, keyPrefix ...string) (reqPath, fileKey, md5 string, err error)
- func (t *TencentCOS) UploadTokenGet(key string, uuid string) (token string, fileKey string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AliyunOSS ¶
type AliyunOSS struct {
// contains filtered or unexported fields
}
func (*AliyunOSS) DeleteFile ¶
func (*AliyunOSS) MultipartUploadFile ¶
func (*AliyunOSS) UploadFile ¶
type AwsS3 ¶
type AwsS3 struct {
// contains filtered or unexported fields
}
func (*AwsS3) DeleteFile ¶
func (*AwsS3) UploadFile ¶
type Local ¶
type Local struct {
// contains filtered or unexported fields
}
func (*Local) DeleteFile ¶
func (*Local) MultipartUploadFile ¶
func (*Local) UploadFile ¶
type OSS ¶
type OSS interface {
MultipartUploadFile(file *multipart.FileHeader, keyPrefix ...string) (reqPath, fileKey, md5 string, fsize int64, err error)
UploadFile(file *os.File, keyPrefix ...string) (reqPath, fileKey, md5 string, err error)
UploadTokenGet(key string, uuid string) (token string, fileKey string, err error)
DeleteFile(key string) error
}
type Qiniu ¶
type Qiniu struct {
// contains filtered or unexported fields
}
func (*Qiniu) DeleteFile ¶
func (*Qiniu) MultipartUploadFile ¶
func (*Qiniu) UploadFile ¶
type TencentCOS ¶
type TencentCOS struct {
// contains filtered or unexported fields
}
func (*TencentCOS) DeleteFile ¶
func (t *TencentCOS) DeleteFile(key string) error
func (*TencentCOS) MultipartUploadFile ¶
func (t *TencentCOS) MultipartUploadFile(file *multipart.FileHeader, keyPrefix ...string) (string, string, string, int64, error)
func (*TencentCOS) UploadFile ¶
func (*TencentCOS) UploadTokenGet ¶
Click to show internal directories.
Click to hide internal directories.