upload

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: AGPL-3.0 Imports: 31 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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) MultipartUploadFile

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

func (*AliyunOSS) UploadFile

func (a *AliyunOSS) UploadFile(file *os.File, keyPrefix ...string) (reqPath, fileKey, md5 string, err error)

func (*AliyunOSS) UploadTokenGet

func (a *AliyunOSS) UploadTokenGet(key string, uuid string) (token string, fileKey string, err 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) MultipartUploadFile

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

func (*Local) UploadFile

func (l *Local) UploadFile(file *os.File, keyPrefix ...string) (reqPath, fileKey, md5 string, err error)

func (*Local) UploadTokenGet

func (l *Local) UploadTokenGet(key string, uuid string) (token string, fileKey string, err error)

type OSS

type OSS interface {
	MultipartUploadFile(file *multipart.FileHeader, keyPrefix ...string) (reqPath, fileKey, md5 string, fsize int64, err error)
	UploadFile(file *os.File, keyPrefix ...string) (reqPath, fileKey, md5 string, err error)
	UploadTokenGet(key string, uuid string) (token string, fileKey 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) MultipartUploadFile

func (q *Qiniu) MultipartUploadFile(file *multipart.FileHeader, keyPrefix ...string) (string, string, string, int64, error)

func (*Qiniu) UploadFile

func (q *Qiniu) UploadFile(file *os.File, keyPrefix ...string) (reqPath, fileKey, md5 string, err error)

func (*Qiniu) UploadTokenGet

func (q *Qiniu) UploadTokenGet(key string, uuid string) (token string, fileKey string, err error)

type TencentCOS

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

func (*TencentCOS) DeleteFile

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

func (*TencentCOS) MultipartUploadFile

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

func (*TencentCOS) UploadFile

func (t *TencentCOS) UploadFile(file *os.File, keyPrefix ...string) (reqPath, fileKey, md5 string, err error)

func (*TencentCOS) UploadTokenGet

func (t *TencentCOS) UploadTokenGet(key string, uuid string) (token string, fileKey string, err error)

Jump to

Keyboard shortcuts

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