package storage import "time" type ObjectInfo struct { Size int64 MimeType string Hash string PutTime int64 } type Storage interface { Put(fileName, objectName string, onProcess func(fsize, uploaded int64)) error Get(objectName, fileName string) error Del(objectName string) error Url(objectName string, expire time.Duration) string Stat(objectName string) (*ObjectInfo, error) List(objectPrefix string) ([]string, error) Fetch(url, objectName string, local ...bool) error //local参数决定是否先下载到本地在上传,七牛云下载企业微信的文件需要不能直接下载 }