Documentation
¶
Index ¶
- func DownloadFile(config *Config, fileUrl string) (string, error)
- func InitFileUrl(fileUrl string, config *Config) (string, string)
- func RemoveFile(config *Config, fileUrl string, removeLocalFile bool) error
- func UploadFile(config *Config, fileUrl string) error
- type AliOSS
- func (aliOSS AliOSS) DownloadFile(cloudFileUrl string, localFileUrl string) error
- func (aliOSS AliOSS) InitClient() (*oss.Client, error)
- func (aliOSS AliOSS) RemoveFile(cloudFileUrl string, localFileUrl string, removeLocalFile bool) error
- func (aliOSS AliOSS) UploadFile(cloudFileUrl string, localFileUrl string) error
- type Config
- type Local
- type TencentCOS
- func (m *TencentCOS) DownloadFile(cloudFileUrl string, localFileUrl string) error
- func (m TencentCOS) InitClient() *cos.Client
- func (m *TencentCOS) RemoveFile(cloudFileUrl string, localFileUrl string, removeLocalFile bool) error
- func (m *TencentCOS) UploadFile(cloudFileUrl string, localFileUrl string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadFile ¶ added in v0.0.6
下载文件
func RemoveFile ¶
上传文件到云存储
Types ¶
type AliOSS ¶
type AliOSS struct {
Endpoint string
AccessKeyId string
AccessKeySecret string
BucketName string
BaseUrl string
}
func (AliOSS) DownloadFile ¶ added in v0.0.6
下载文件
type TencentCOS ¶
func (*TencentCOS) DownloadFile ¶ added in v0.0.6
func (m *TencentCOS) DownloadFile(cloudFileUrl string, localFileUrl string) error
下载文件
func (*TencentCOS) RemoveFile ¶
func (m *TencentCOS) RemoveFile(cloudFileUrl string, localFileUrl string, removeLocalFile bool) error
删除文件
func (*TencentCOS) UploadFile ¶
func (m *TencentCOS) UploadFile(cloudFileUrl string, localFileUrl string) error
上传文件
Click to show internal directories.
Click to hide internal directories.