upload

package
v0.0.0-...-f53b5d5 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBucket

func NewBucket(cfg config.File) (*oss.Bucket, error)

func NewClient

func NewClient(cfg config.File) *cos.Client

Types

type AliyunOSS

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

func (*AliyunOSS) DeleteFile

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

func (*AliyunOSS) UploadFile

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

type AwsS3

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

func (*AwsS3) DeleteFile

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

func (*AwsS3) UploadFile

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

type Local

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

func (*Local) DeleteFile

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

func (*Local) UploadFile

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

type OSS

type OSS interface {
	UploadFile(file *multipart.FileHeader, keyPrefix ...string) (reqPath, fileKey, md5 string, err error)
	DeleteFile(key string) error
}

func NewOss

func NewOss(ossType ...string) OSS

type Qiniu

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

func (*Qiniu) DeleteFile

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

func (*Qiniu) UploadFile

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

type TencentCOS

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

func (*TencentCOS) DeleteFile

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

func (*TencentCOS) UploadFile

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

Jump to

Keyboard shortcuts

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