upload

package
v0.0.0-...-37838c1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBucket

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

func NewClient

func NewClient() *cos.Client

NewClient init COS client

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 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
}

func NewOss

func NewOss() OSS

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