oss

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseOSSProvider

type BaseOSSProvider interface {
	UploadFromIO(io.Reader, string) (string, error)
	DownloadToIO(string, io.Writer) error
	CheckObjectExist(string) (bool, error)
}

type LocalStorage

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

func NewLocalStorage

func NewLocalStorage() *LocalStorage

func (*LocalStorage) CheckObjectExist

func (l *LocalStorage) CheckObjectExist(objectName string) (bool, error)

func (*LocalStorage) DownloadToIO

func (l *LocalStorage) DownloadToIO(objectName string, ioWriter io.Writer) error

func (*LocalStorage) UploadFromIO

func (l *LocalStorage) UploadFromIO(ioReader io.Reader, suffix string) (string, error)

type MinioClient

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

MinioClient minio client

func NewMinioClient

func NewMinioClient() *MinioClient

NewMinioClient new minio client

func (*MinioClient) CheckObjectExist

func (m *MinioClient) CheckObjectExist(objectName string) (bool, error)

检查文件是否存在

func (*MinioClient) DownloadToIO

func (m *MinioClient) DownloadToIO(objectName string, ioWriter io.Writer) error

下载文件到io.Writer

func (*MinioClient) UploadFromIO

func (m *MinioClient) UploadFromIO(ioReader io.Reader, suffix string) (string, error)

从io.Reader上传文件

Jump to

Keyboard shortcuts

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