Versions in this module Expand all Collapse all v0 v0.1.1 Jul 27, 2017 v0.1.0 Jul 24, 2017 Changes in this version + func Download(key string) (string, error) + func GenerateDownloadURL(key string) string + func InitStorage(storageType string, config *Config) + func Upload(key, filePath string) (string, error) + type Config struct + AccessKey string + Bucket string + DownloadURL string + LocalStoragePath string + OSSEndpoint string + Prefix string + QiNiuZone int + SecretKey string + type Local struct + Config *Config + func NewLocal(config *Config) *Local + func (self *Local) Download(key string) (string, error) + func (self *Local) GenerateDownloadURL(key string) string + func (self *Local) Upload(key, filePath string) (string, error) + type OSS struct + Bucket *oss.Bucket + Config *Config + func NewOSS(config *Config) *OSS + func (self *OSS) Download(key string) (string, error) + func (self *OSS) GenerateDownloadURL(key string) string + func (self *OSS) Upload(key, filePath string) (string, error) + type QiNiu struct + Bucket kodo.Bucket + Config *Config + func NewQiNiu(config *Config) *QiNiu + func (self *QiNiu) Download(key string) (string, error) + func (self *QiNiu) GenerateDownloadURL(key string) string + func (self *QiNiu) Upload(key, filePath string) (string, error) + type Storage interface + Download func(key string) (string, error) + GenerateDownloadURL func(key string) string + Upload func(key, filePath string) (string, error)