qcloud

package
v1.10.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2025 License: MulanPSL-2.0 Imports: 9 Imported by: 0

Documentation

Index

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)

func (*QcloudCOSBackend) ReadFile

func (b *QcloudCOSBackend) ReadFile(objectId string) ([]byte, error)

func (*QcloudCOSBackend) Save

func (b *QcloudCOSBackend) Save(objectId string, content []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL