oss

package
v0.0.0-...-003a2e9 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MemoryTooLargeError = fmt.Errorf("文件过大")

TODO 当上传文件过大时候 返回此Error

Functions

func MD5V

func MD5V(str []byte, b ...byte) string

Types

type Minio

type Minio struct {
	*minio.Client
	// contains filtered or unexported fields
}

func NewMinio

func NewMinio(endPoint string, accessKeyID string, secretAccessKey string, bucketName string) (*Minio, error)

func (*Minio) DeleteFile

func (m *Minio) DeleteFile(key string) error

func (*Minio) UploadFileWithPrefix

func (m *Minio) UploadFileWithPrefix(fileName string, file io.Reader, fileSize int64, prefix string) (string, string, error)

func (*Minio) UploadMultipartFile

func (m *Minio) UploadMultipartFile(multipartFile *multipart.FileHeader) (string, string, error)

func (*Minio) UploadMultipartFileWithPrefix

func (m *Minio) UploadMultipartFileWithPrefix(multipartFile *multipart.FileHeader, prefix string) (string, string, error)

type OSS

type OSS interface {
	UploadMultipartFile(file *multipart.FileHeader) (string, string, error)
	UploadMultipartFileWithPrefix(multipartFile *multipart.FileHeader, prefix string) (string, string, error)
	UploadFileWithPrefix(fileName string, file io.Reader, fileSize int64, prefix string) (string, string, error)
	DeleteFile(key string) error
}

Jump to

Keyboard shortcuts

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