upload

package
v0.0.0-...-47f4a12 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HuaWeiObs = new(_obs)

Functions

func NewBucket

func NewBucket() (*oss.Bucket, error)

func NewClient

func NewClient() *cos.Client

NewClient init COS client

func NewHuaWeiObsClient

func NewHuaWeiObsClient() (client *obs.ObsClient, err error)

Types

type AliyunOSS

type AliyunOSS struct{}

func (*AliyunOSS) DeleteFile

func (*AliyunOSS) DeleteFile(key string) error

func (*AliyunOSS) UploadFile

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

type AwsS3

type AwsS3 struct{}

func (*AwsS3) DeleteFile

func (*AwsS3) DeleteFile(key string) error

func (*AwsS3) UploadFile

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

type Local

type Local struct{}

func (*Local) DeleteFile

func (*Local) DeleteFile(key string) error

func (*Local) UploadFile

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

type OSS

type OSS interface {
	UploadFile(file *multipart.FileHeader) (string, string, error)
	DeleteFile(key string) error
}

OSS 对象存储接口 Author [SliverHorn](https://github.com/SliverHorn) Author [ccfish86](https://github.com/ccfish86)

func NewOss

func NewOss() OSS

NewOss OSS的实例化方法 Author [SliverHorn](https://github.com/SliverHorn) Author [ccfish86](https://github.com/ccfish86)

type Qiniu

type Qiniu struct{}

func (*Qiniu) DeleteFile

func (*Qiniu) DeleteFile(key string) error

func (*Qiniu) UploadFile

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

type TencentCOS

type TencentCOS struct{}

func (*TencentCOS) DeleteFile

func (*TencentCOS) DeleteFile(key string) error

DeleteFile delete file form COS

func (*TencentCOS) UploadFile

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

UploadFile upload file to COS

Jump to

Keyboard shortcuts

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