oss

package
v1.0.22 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliyunOSS

type AliyunOSS struct {
	Endpoint        string
	AccessKeyId     string
	AccessKeySecret string
	BucketName      string
	BucketUrl       string
	// contains filtered or unexported fields
}

func (*AliyunOSS) DeleteFile

func (e *AliyunOSS) DeleteFile(filename string) error

func (*AliyunOSS) DownloadFile

func (e *AliyunOSS) DownloadFile(filename string) (io.ReadCloser, error)

func (*AliyunOSS) GetFileMeta

func (e *AliyunOSS) GetFileMeta(filename string) (map[string][]string, error)

func (*AliyunOSS) UpLoadLocalFile

func (e *AliyunOSS) UpLoadLocalFile(yourObjectName string, localFile string) error

UpLoadLocalFile 文件上传

func (*AliyunOSS) UploadFile

func (e *AliyunOSS) UploadFile(file io.Reader, filename string) (string, error)

type Local

type Local struct {
	Path string
}

func (*Local) DeleteFile

func (l *Local) DeleteFile(filename string) error

func (*Local) DownloadFile

func (l *Local) DownloadFile(filename string) (io.ReadCloser, error)

func (*Local) GetFileMeta

func (l *Local) GetFileMeta(filename string) (map[string][]string, error)

func (*Local) UpLoadLocalFile

func (l *Local) UpLoadLocalFile(objectName string, localFile string) error

func (*Local) UploadFile

func (l *Local) UploadFile(file io.Reader, filename string) (string, error)

type Oss

type Oss interface {
	UpLoadLocalFile(objectName string, localFile string) error
	UploadFile(file io.Reader, filename string) (string, error)
	DownloadFile(filename string) (io.ReadCloser, error)
	GetFileMeta(filename string) (map[string][]string, error)
	DeleteFile(filename string) error
}

func NewAliyun

func NewAliyun(endpoint, accessKeyId, accessKeySecret, bucketName string, bucketUrl string) Oss

func NewLocal

func NewLocal(path string) Oss

type TencentCOS

type TencentCOS struct{}

Jump to

Keyboard shortcuts

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