drives

package
v0.0.0-...-19e9449 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileInfo

type FileInfo struct {
	Content []byte
	DataLen int64
	Ext     string
}

func GetContentInfo

func GetContentInfo(content string) FileInfo

GetContentInfo 读取字符串基础信息

func GetFileHeaderFileInfo

func GetFileHeaderFileInfo(file *multipart.FileHeader) FileInfo

GetFileHeaderFileInfo 读取文件流中文件信息

func GetLocalFileInfo

func GetLocalFileInfo(localFile string) FileInfo

GetLocalFileInfo 读取本地文件基础信息

func GetNetFileInfo

func GetNetFileInfo(fileUrl string) FileInfo

GetNetFileInfo 读取网路文件基础信息

type Kodo

type Kodo struct {
	AccessKey string
	SecretKey string
	Bucket    string
	// contains filtered or unexported fields
}

func (Kodo) PutContent

func (receiver Kodo) PutContent(fileInfo FileInfo, key string) error

func (Kodo) PutFile

func (receiver Kodo) PutFile(localFilePath string, key string) error

type ObjectStorageDrive

type ObjectStorageDrive interface {
	// PutFile 上传本地文件122
	PutFile(localFilePath string, key string) error
	// PutContent 上传字符串到对象存储
	PutContent(fileInfo FileInfo, key string) error
}

Jump to

Keyboard shortcuts

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