Documentation ¶
Index ¶
- Constants
- type BaseInterface
- type LocalFile
- func (lf *LocalFile) SaveData(data []byte, dstAbsPath, dstRelativePath string) (url string, err error)
- func (lf *LocalFile) SaveFile(srcFile io.Reader, srcFileSize int64, dstAbsPath, dstRelativePath string) (url string, err error)
- func (lf *LocalFile) SaveFileFromLocalPath(srcPath string, dstAbsPath, dstRelativePath string) (url string, err error)
- type Qiniu
- func (qn *Qiniu) SaveData(data []byte, dstAbsPath, dstRelativePath string) (url string, err error)
- func (qn *Qiniu) SaveFile(srcFile io.Reader, srcFileSize int64, dstAbsPath, dstRelativePath string) (url string, err error)
- func (qn *Qiniu) SaveFileFromLocalPath(srcPath string, dstAbsPath, dstRelativePath string) (url string, err error)
- type QiniuConfig
- type QiniuRet
Constants ¶
View Source
const ( SUCCESS = "success" FAIL = "fail" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseInterface ¶
type BaseInterface interface { /** 从本地路径读取文件并保存 srcPath 本地文件路径 dstAbsPath 目的位置绝对路径 dstRelativePath 目的位置相对路径 */ SaveFileFromLocalPath(srcPath string, dstAbsPath, dstRelativePath string) (url string, err error) /** 将本地文件保存到目标位置 srcFile 源文件读取接口 dstAbsPath 目的位置绝对路径 dstRelativePath 目的位置相对路径 */ SaveFile(srcFile io.Reader, srcFileSize int64, dstAbsPath, dstRelativePath string) (url string, err error) /** 将数据保存到目标位置 data 数据 dstAbsPath 目的位置绝对路径 dstRelativePath 目的位置相对路径 */ SaveData(data []byte, dstAbsPath, dstRelativePath string) (url string, err error) }
type LocalFile ¶
type LocalFile struct {
BaseInterface
}
func (*LocalFile) SaveData ¶
func (lf *LocalFile) SaveData(data []byte, dstAbsPath, dstRelativePath string) (url string, err error)
* 保存数据到本地
type Qiniu ¶
type Qiniu struct { BaseInterface // contains filtered or unexported fields }
func NewQiniu ¶
func NewQiniu(config *QiniuConfig) *Qiniu
type QiniuConfig ¶
Click to show internal directories.
Click to hide internal directories.