Documentation ¶
Overview ¶
* @Descripttion: * @version: * @Author: lfzxs@qq.com * @Date: 2023-08-22 11:42:54 * @LastEditors: lfzxs@qq.com * @LastEditTime: 2023-08-24 10:25:01
* @Descripttion: * @version: * @Author: lfzxs@qq.com * @Date: 2023-08-24 09:51:07 * @LastEditors: lfzxs@qq.com * @LastEditTime: 2023-09-14 16:57:12
Index ¶
- type BaiduOss
- func (obj *BaiduOss) FileHash(filedata io.Reader) (hash string, err error)
- func (obj *BaiduOss) GetFileKeyFormHash(hash string) (fileKey string, err error)
- func (obj *BaiduOss) GetName() string
- func (obj *BaiduOss) LinkFile(path string, fileKey string) (objectKey string, err error)
- func (obj *BaiduOss) SaveFile(filedata io.Reader, size int64, path string, pairs ...Pair) (fileUrl string, fileKey string, err error)
- func (obj *BaiduOss) SetName(name string)
- type BeyondService
- func (obj *BeyondService) FileHash(filedata io.Reader) (hash string, err error)
- func (obj *BeyondService) GetFileKeyFormHash(hash string) (fileKey string, err error)
- func (obj *BeyondService) GetName() string
- func (obj *BeyondService) LinkFile(path string, fileKey string) (objectKey string, err error)
- func (obj *BeyondService) SaveFile(filedata io.Reader, size int64, path string, pairs ...Pair) (fileUrl string, fileKey string, err error)
- func (obj *BeyondService) SetName(name string)
- type IUpLoad
- type Pair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaiduOss ¶
type BaiduOss struct {
// contains filtered or unexported fields
}
func (*BaiduOss) GetFileKeyFormHash ¶
type BeyondService ¶
type BeyondService struct { ConnStr string // contains filtered or unexported fields }
func (*BeyondService) FileHash ¶
func (obj *BeyondService) FileHash(filedata io.Reader) (hash string, err error)
func (*BeyondService) GetFileKeyFormHash ¶
func (obj *BeyondService) GetFileKeyFormHash(hash string) (fileKey string, err error)
func (*BeyondService) GetName ¶
func (obj *BeyondService) GetName() string
func (*BeyondService) LinkFile ¶
func (obj *BeyondService) LinkFile(path string, fileKey string) (objectKey string, err error)
func (*BeyondService) SetName ¶
func (obj *BeyondService) SetName(name string)
type IUpLoad ¶
type IUpLoad interface { GetName() string /** * FileHash * @Description: 获取文件hash值 * @param filedata 文件流 * @return hash 文件hash值 * @return err 异常(文件流异常) */ FileHash(filedata io.Reader) (hash string, err error) /** * FileHash * @Description: 获取文件hash值 * @param filedata 文件流 * @return hash 文件hash值 * @return err 异常(文件流异常) */ GetFileKeyFormHash(hash string) (fileKey string, err error) /** * SaveFile * @Description: 保存文件 * @param filedata 文件流 * @param size 文件大小,单位字节 * @param path 保存路径 * @param pairs 其他属性 * @return fileUrl 文件访问路径 * @return objectKey 文件对象ID * @return err 异常 */ SaveFile(filedata io.Reader, size int64, path string, pairs ...Pair) (fileUrl string, fileKey string, err error) /** * LinkFile * @Description: 创建链接文件 * @param path 逻辑路径 * @param fileKey 文件对象ID * @return objectKey 链接文件对象ID * @return err 异常(源文件不存在,新路径已存在) */ LinkFile(path string, fileKey string) (objectKey string, err error) }
上传接口
Click to show internal directories.
Click to hide internal directories.