cdn

package
v0.0.0-...-85e1034 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QiNiu

type QiNiu struct {
	Bucket        string
	Url           string
	Mac           *qbox.Mac
	CdnManager    *cdn.CdnManager
	Config        *storage.Config
	PutPolicy     *storage.PutPolicy
	BucketManager *storage.BucketManager
}

func NewQiNiu

func NewQiNiu(bucket string, url string, accessKey, secretKey string) *QiNiu

func (*QiNiu) Delete

func (c *QiNiu) Delete(url string) (err error)

func (*QiNiu) GetPrivateMediaUrl

func (c *QiNiu) GetPrivateMediaUrl(src_url string) (privateAccessURL string)

返回私人有地址

func (*QiNiu) GetTokenUpload

func (c *QiNiu) GetTokenUpload(region string, key string) (m map[string]interface{})

func (*QiNiu) MoveFile

func (c *QiNiu) MoveFile(src_url string, dst_url string) (url_file string, err error)

func (*QiNiu) Refresh

func (c *QiNiu) Refresh(url ...string) (err error)

func (*QiNiu) RefreshDir

func (c *QiNiu) RefreshDir(dir string) (err error)

func (*QiNiu) Upload

func (c *QiNiu) Upload(localFile io.Reader, size int64, file_name string, is_refresh bool) (url_file string, err error)

func (*QiNiu) UploadFile

func (c *QiNiu) UploadFile(file_name string, file_data []byte) (url_file string, err error)

Jump to

Keyboard shortcuts

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