upload

package
v0.0.0-...-38e5134 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package upload @program: arco-design-pro-gin @author: [lliuhuan](https://github.com/lliuhuan) @create: 2021-12-10 15:59

Package upload @program: arco-design-pro-gin @author: [lliuhuan](https://github.com/lliuhuan) @create: 2021-12-10 15:58

Package upload @program: arco-design-pro-gin @author: [lliuhuan](https://github.com/lliuhuan) @create: 2021-12-10 15:50

Package upload @program: arco-design-pro-gin @author: [lliuhuan](https://github.com/lliuhuan) @create: 2021-12-10 16:04

Package upload @program: arco-design-pro-gin @author: [lliuhuan](https://github.com/lliuhuan) @create: 2021-12-10 16:07

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

DeleteFile 删除文件 @author: [lliuhuan](https://github.com/lliuhuan) @object: *AliyunOSS @function: DeleteFile @description: 删除文件 @param: key string @return: error

func (*AliyunOSS) UploadFile

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

UploadFile 上传文件 @author: [lliuhuan](https://github.com/lliuhuan) @object: *AliyunOSS @function: UploadFile @description: 上传文件 @param: file *multipart.FileHeader @return: string, string, error

type Local

type Local struct{}

func (*Local) DeleteFile

func (*Local) DeleteFile(key string) error

DeleteFile 删除文件 @author: [lliuhuan](https://github.com/lliuhuan) @object: *Local @function: DeleteFile @description: 删除文件 @param: key string @return: error

func (*Local) UploadFile

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

UploadFile 上传文件 @author: [lliuhuan](https://github.com/lliuhuan) @object: *Local @function: UploadFile @description: 上传文件 @param: file *multipart.FileHeader @return: string, string, error

type OSS

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

OSS OSS接口 @author: [lliuhuan](https://github.com/lliuhuan) @interface_name: OSS @description: OSS接口

func NewOss

func NewOss() OSS

NewOss 创建oss对象 @author: [lliuhuan](https://github.com/lliuhuan) @function: NewOss @description: OSS接口 @description: OSS的实例化方法 @return: OSS

type Qiniu

type Qiniu struct{}

func (*Qiniu) DeleteFile

func (*Qiniu) DeleteFile(key string) error

DeleteFile 删除文件 @author: [lliuhuan](https://github.com/lliuhuan) @object: *Qiniu @function: DeleteFile @description: 删除文件 @param: key string @return: error

func (*Qiniu) UploadFile

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

UploadFile 上传文件 @author: [lliuhuan](https://github.com/lliuhuan) @object: *Qiniu @function: UploadFile @description: 上传文件 @param: file *multipart.FileHeader @return: string, string, error

type TencentCOS

type TencentCOS struct{}

func (*TencentCOS) DeleteFile

func (*TencentCOS) DeleteFile(key string) error

DeleteFile 删除文件 @author: [lliuhuan](https://github.com/lliuhuan) @object: *TencentCOS @function: DeleteFile @description: 删除文件 @param: key string @return: error

func (*TencentCOS) UploadFile

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

UploadFile 上传文件 @author: [lliuhuan](https://github.com/lliuhuan) @object: *TencentCOS @function: UploadFile @description: 上传文件 @param: file *multipart.FileHeader @return: string, string, error

Jump to

Keyboard shortcuts

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