aliyun

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: GPL-3.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFileOpen = errors.New("文件打开失败")

Functions

This section is empty.

Types

type Config

type Config struct {
	BucketUrl       string
	BasePath        string
	Endpoint        string
	AccessKeyId     string
	AccessKeySecret string
	BucketName      string
}

type OSS

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

func Init

func Init(config Config) *OSS

func (*OSS) DeleteFile

func (o *OSS) DeleteFile(key ...string) (oss.DeleteObjectsResult, error)

DeleteFile 删除文件 通过key删除对应文件

func (*OSS) UploadFile

func (o *OSS) UploadFile(file *multipart.FileHeader) (string, string, error)

UploadFile 上传文件 返回 访问地址,文件key,error

Jump to

Keyboard shortcuts

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