oss

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 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 OSS

type OSS struct {
	Client *cos.Client
	// contains filtered or unexported fields
}

func NewOss

func NewOss(ossCli *cos.Client, options *OssOption) *OSS

func (*OSS) DownloadFiles

func (e *OSS) DownloadFiles(fileObject []string, localDir string) error

下载文件 fileObject - cos文件对象 localDir - 本地存储路径

func (*OSS) GetCredential

func (e *OSS) GetCredential() (*sts.CredentialResult, error)

获取临时上传密钥

func (*OSS) GetPresignedURL

func (e *OSS) GetPresignedURL(objectName string) (string, error)

获取签名链接

func (*OSS) GetSignedFileUrl

func (e *OSS) GetSignedFileUrl(dir string, isSign bool) ([]string, []string, error)

查询目录下的文件

func (*OSS) UpLoad

func (e *OSS) UpLoad(objectName, localFile string) (string, error)

UpLoad 文件上传

type OssOption

type OssOption struct {
	SecretId   string
	SecretKey  string
	AppId      string
	Bucket     string
	Region     string
	ExpireTime int64
}

Jump to

Keyboard shortcuts

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