upload

package
v0.0.0-...-1246224 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliyunOSS

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

func (*AliyunOSS) DeleteFile

func (u *AliyunOSS) DeleteFile(key string) error

func (*AliyunOSS) NewBucket

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

func (*AliyunOSS) UploadFile

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

type AwsS3

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

func (*AwsS3) DeleteFile

func (u *AwsS3) DeleteFile(key string) error

func (*AwsS3) UploadFile

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

type CloudflareR2

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

func (*CloudflareR2) DeleteFile

func (u *CloudflareR2) DeleteFile(key string) error

func (*CloudflareR2) UploadFile

func (u *CloudflareR2) UploadFile(file *multipart.FileHeader) (fileUrl string, fileName string, err error)

type Local

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

func (*Local) DeleteFile

func (u *Local) DeleteFile(key string) error

func (*Local) UploadFile

func (u *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 对象存储接口

func NewOss

func NewOss(conf *conf.Bootstrap, logger *zap.Logger) OSS

NewOss OSS的实例化方法

type Obs

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

func (*Obs) DeleteFile

func (u *Obs) DeleteFile(key string) error

func (*Obs) NewHuaWeiObsClient

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

func (*Obs) UploadFile

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

type Qiniu

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

func (*Qiniu) DeleteFile

func (u *Qiniu) DeleteFile(key string) error

func (*Qiniu) UploadFile

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

type TencentCOS

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

func (*TencentCOS) DeleteFile

func (u *TencentCOS) DeleteFile(key string) error

DeleteFile delete file form COS

func (*TencentCOS) NewClient

func (u *TencentCOS) NewClient() *cos.Client

NewClient init COS client

func (*TencentCOS) UploadFile

func (u *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