local

package
v0.0.0-...-3cf8a31 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package local @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License

Package local @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License

Package local @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License

Package local @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License

Package local @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OssLocal

type OssLocal struct{}

func (*OssLocal) CheckFileExist

func (c *OssLocal) CheckFileExist(file string) (bool, error)

CheckFileExist 检查文件是否存在

func (*OssLocal) CloseFile

func (c *OssLocal) CloseFile(f http.File)

CloseFile 关闭文件流

func (*OssLocal) GenerateHash

func (c *OssLocal) GenerateHash(file string) error

GenerateHash 生成文件hash

func (*OssLocal) GetHash

func (c *OssLocal) GetHash(file []byte, hash string) []byte

GetHash 获取文件hash信息

func (*OssLocal) GetLocalFileByInfo

func (c *OssLocal) GetLocalFileByInfo(ctx context.Context, fileSystem http.FileSystem, filePath, localFilePath string) (u *em.UploadInfo, err error)

GetLocalFileByInfo 获取文件信息 filePath 文件存储位置 localFilePath 文件路径

func (*OssLocal) SaveFile

func (c *OssLocal) SaveFile(ctx context.Context, localFilePath string, data []byte) error

SaveFile 保存文件

func (*OssLocal) SaveFileByInfo

func (c *OssLocal) SaveFileByInfo(ctx context.Context, data []byte, fileSystem http.FileSystem, filePath, localFilePath string) (u *em.UploadInfo, err error)

SaveFileByInfo 保存文件

func (*OssLocal) TouchFile

func (c *OssLocal) TouchFile(file string, hash string, bytes []byte) error

Jump to

Keyboard shortcuts

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