Versions in this module Expand all Collapse all v0 v0.3.0 Jan 31, 2023 v0.2.0 Dec 7, 2022 Changes in this version + const ALIYUN + const QINIU + const TENCENT + const TempFileSuffix + func NewStorage(ossName string, config Config) error + type Aliyun struct + func (a *Aliyun) DeleteObject(objectKey string) error + func (a *Aliyun) GetObjectToFile(objectKey, filePath string) error + func (a *Aliyun) GetObjectUrl(objectKey string) string + func (a *Aliyun) IsExists(objectKey string) (bool, error) + func (a *Aliyun) PutObject(objectKey string, reader io.Reader) error + func (a *Aliyun) PutObjectFromFile(objectKey, filePath string) error + type Config struct + AppID string + Bucket string + Domain string + Endpoint string + KeyID string + KeySecret string + Private bool + Region string + type Qiniu struct + func (q *Qiniu) DeleteObject(objectKey string) error + func (q *Qiniu) GetObjectToFile(objectKey, filePath string) error + func (q *Qiniu) GetObjectUrl(objectKey string) string + func (q *Qiniu) IsExists(objectKey string) (bool, error) + func (q *Qiniu) PutObject(objectKey string, reader io.Reader) error + func (q *Qiniu) PutObjectFromFile(objectKey, filePath string) error + type Storage interface + DeleteObject func(objectKey string) error + GetObjectToFile func(objectKey, downloadedFileName string) error + GetObjectUrl func(objectKey string) string + IsExists func(objectKey string) (bool, error) + PutObject func(objectKey string, reader io.Reader) error + PutObjectFromFile func(objectKey, filePath string) error + func GetStorage() (Storage, error) + type Tencent struct + func (t *Tencent) DeleteObject(objectKey string) error + func (t *Tencent) GetObjectToFile(objectKey, filePath string) error + func (t *Tencent) GetObjectUrl(objectKey string) string + func (t *Tencent) IsExists(objectKey string) (bool, error) + func (t *Tencent) PutObject(objectKey string, reader io.Reader) error + func (t *Tencent) PutObjectFromFile(objectKey, filePath string) error