Documentation ¶
Index ¶
- type DirectUploader
- func (d *DirectUploader) BatchFileInfo(keys []string) []storage.BatchOpRet
- func (d *DirectUploader) BucketManager() *storage.BucketManager
- func (d *DirectUploader) ByteUpload(data []byte, fileName string) (url string, key string, err error)
- func (d *DirectUploader) ChangeMimeType(key string, mimeType string) error
- func (d *DirectUploader) DeleteFile(key string) error
- func (d *DirectUploader) FileInfo(key string) (storage.FileInfo, error)
- func (d *DirectUploader) FilerUpload(file multipart.File, fileHeader *multipart.FileHeader) (url string, key string, err error)
- func (d *DirectUploader) PrivateReadURL(key string) string
- func (d *DirectUploader) PublicReadUrl(key string) string
- func (d *DirectUploader) Upload(file multipart.File, fileHeader *multipart.FileHeader) (string, string, error)
- type IQiuNiuUploader
- type MyPutRet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DirectUploader ¶
type DirectUploader struct { Bucket string FileServer string Zone *storage.Zone UseHTTPS bool UseCdnDomains bool Expires uint32 }
func NewUploader ¶
func (*DirectUploader) BatchFileInfo ¶
func (d *DirectUploader) BatchFileInfo(keys []string) []storage.BatchOpRet
func (*DirectUploader) BucketManager ¶
func (d *DirectUploader) BucketManager() *storage.BucketManager
func (*DirectUploader) ByteUpload ¶
func (d *DirectUploader) ByteUpload(data []byte, fileName string) (url string, key string, err error)
上传bytes
func (*DirectUploader) ChangeMimeType ¶
func (d *DirectUploader) ChangeMimeType(key string, mimeType string) error
ChangeMime
func (*DirectUploader) FileInfo ¶
func (d *DirectUploader) FileInfo(key string) (storage.FileInfo, error)
获取文件信息
func (*DirectUploader) FilerUpload ¶
func (d *DirectUploader) FilerUpload(file multipart.File, fileHeader *multipart.FileHeader) (url string, key string, err error)
FilerUpload: 文件直传方式
func (*DirectUploader) PrivateReadURL ¶
func (d *DirectUploader) PrivateReadURL(key string) string
对于私有空间,首先需要按照公开空间的文件访问方式构建对应的公开空间访问链接,然后再对这个链接进行私有授权签名。
func (*DirectUploader) PublicReadUrl ¶
func (d *DirectUploader) PublicReadUrl(key string) string
func (*DirectUploader) Upload ¶
func (d *DirectUploader) Upload(file multipart.File, fileHeader *multipart.FileHeader) (string, string, error)
type IQiuNiuUploader ¶
type IQiuNiuUploader interface { FilerUpload(file multipart.File, fileHeader *multipart.FileHeader) (url string, key string, err error) ByteUpload(bytes []byte, fileName string) (url string, key string, err error) PublicReadUrl(key string) string PrivateReadURL(key string) string FileInfo(key string) (storage.FileInfo, error) ChangeMimeType(key, mimeType string) error DeleteFile(key string) error }
Click to show internal directories.
Click to hide internal directories.