oss

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 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 AliClient

type AliClient struct {
	AccessKeyId string
	Secret      string
	EndPoint    string
	BucketName  string
	ServerUrl   string
}

AliClient AliClient

func NewAliClient added in v0.3.6

func NewAliClient(accessKeyId, secret, endPoint, bucketName, serverUrl string) *AliClient

NewAliClient NewAliClient

func (*AliClient) Upload

func (c *AliClient) Upload(reader io.Reader, dir, ext string) (url string, err error)

Upload 上传文件 返回远程地址及错误

url,err:=client.Upload(reader,dir,ext)
会强制重命名文件名

func (*AliClient) UploadFile added in v0.5.1

func (c *AliClient) UploadFile(reader io.Reader, dir, filename string) (url string, err error)

UploadFile 上传一个文件,返回远程地址及错误

不强制重命名文件名
like:   /dir/20210309/filename

func (*AliClient) UploadRemoteFile

func (c *AliClient) UploadRemoteFile(httpUrl, dir string) (url string, err error)

UploadRemoteFile 上传网络图片到oss

Jump to

Keyboard shortcuts

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