Documentation
¶
Index ¶
- type QcloudCOSBackend
- func (b *QcloudCOSBackend) Delete(objectId string) error
- func (b *QcloudCOSBackend) GetUrl(objectId string) (url string)
- func (b *QcloudCOSBackend) Ping() (err error)
- func (b *QcloudCOSBackend) ReadFile(objectId string) ([]byte, error)
- func (b *QcloudCOSBackend) Save(objectId string, content []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QcloudCOSBackend ¶
type QcloudCOSBackend struct {
BucketName string
Region string
BaseUrl string
Proxy bool
Client *cos.Client
}
func NewQcloudCOSBackend ¶
func NewQcloudCOSBackend(proxy bool, bucketName, region, secretID, secretKey, baseUrl string) *QcloudCOSBackend
func (*QcloudCOSBackend) Delete ¶
func (b *QcloudCOSBackend) Delete(objectId string) error
func (*QcloudCOSBackend) GetUrl ¶
func (b *QcloudCOSBackend) GetUrl(objectId string) (url string)
GetUrl 本地代理文件下载地址,使用fileInfo.fileID 云端使用fileInfo.StoredFilename
func (*QcloudCOSBackend) Ping ¶
func (b *QcloudCOSBackend) Ping() (err error)
Click to show internal directories.
Click to hide internal directories.