oss

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliYun

type AliYun struct {
	AccessId      string `json:"accessId" yaml:"accessId"`
	AccessSecret  string `json:"accessSecret" yaml:"accessSecret"`
	DefaultBucket string `json:"defaultBucket" yaml:"defaultBucket"`
	EndPoint      string `json:"endPoint" yaml:"endPoint"`
	CustomDomain  string `json:"customDomain" yaml:"customDomain"`
}

type AliYunOss

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

func NewAliYunOss

func NewAliYunOss(c AliYun) *AliYunOss

func (*AliYunOss) DownloadFile

func (ao *AliYunOss) DownloadFile(objectKey string) (data []byte, err error)

DownloadFile 下载文件

func (*AliYunOss) UploadByteFile

func (ao *AliYunOss) UploadByteFile(objectKey string, file []byte, opt ...ali_oss.Option) (url string, err error)

UploadByteFile 上传文件

func (*AliYunOss) UploadFile

func (ao *AliYunOss) UploadFile(objectKey, localFilePath string, opt ...ali_oss.Option) (err error)

UploadFile 上传本地文件

func (*AliYunOss) UploadUrl

func (ao *AliYunOss) UploadUrl(objectKey string, url string, opt ...ali_oss.Option) (aliUrl string, err error)

UploadUrl 上传网络文件

type Oss

type Oss struct {
	AliYun AliYun `json:"aliYun" yaml:"aliYun"`
}

Jump to

Keyboard shortcuts

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