aliyun

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OssConfig

type OssConfig struct {
	AccessKeyID     string
	AccessKeySecret string
	Endpoint        string
	Bucket          string
}

type OssStore

type OssStore struct {
	// contains filtered or unexported fields
}

func NewOssStore

func NewOssStore(conf *OssConfig) (*OssStore, error)

func (*OssStore) DeleteBatch

func (s *OssStore) DeleteBatch(remotePaths []string) error

删除多个文件

func (*OssStore) DeleteOne

func (s *OssStore) DeleteOne(remotePath string) error

删除单个文件

func (*OssStore) Download

func (s *OssStore) Download(remotePath, localPath string) error

下载文件到本地

func (*OssStore) GetContent

func (s *OssStore) GetContent(remotePath string) ([]byte, error)

func (*OssStore) GetContentToBuf

func (s *OssStore) GetContentToBuf(remotePath string, buf *bytes.Buffer) error

下载文件到缓存

func (*OssStore) GetContentToStream

func (s *OssStore) GetContentToStream(remotePath string, fd *os.File) error

下载文件到文件流

func (*OssStore) UploadBytes

func (s *OssStore) UploadBytes(content []byte, remotePath string) error

上传Byte数组

func (*OssStore) UploadFile

func (s *OssStore) UploadFile(localPath, remotePath string) error

上传本地文件

func (*OssStore) UploadStream

func (s *OssStore) UploadStream(fd *os.File, remotePath string) error

上传文件流

func (*OssStore) UploadText

func (s *OssStore) UploadText(content, remotePath string) error

上传字符串

Jump to

Keyboard shortcuts

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