Documentation
¶
Index ¶
- func CreateFileMeta(fileMeta FileMeta)
- func CreateFileMetaDB(fileMeta FileMeta) bool
- func DeleteFileMeta(fileSha1 string)
- func DeleteFileMetaDB(fileSha1 string) bool
- func SetFileMeta(fileSha1 string, fileMeta FileMeta)
- func SetFileMetaDB(fileSha1 string, fileMeta FileMeta) bool
- type ByCreateAt
- type FileMeta
- type MPUploadMeta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFileMeta ¶
func CreateFileMeta(fileMeta FileMeta)
CreateFileMeta is to create the metadata of a file
func CreateFileMetaDB ¶
CreateFileMetaDB is to create the metadata of a file in database
func DeleteFileMeta ¶
func DeleteFileMeta(fileSha1 string)
DeleteFileMeta is to delete the metadata of a file
func DeleteFileMetaDB ¶
DeleteFileMetaDB is to delete the metadata of a file in database
func SetFileMeta ¶
SetFileMeta is to update the metadata of a file
func SetFileMetaDB ¶
SetFileMetaDB is to update the metadata of a file in database
Types ¶
type ByCreateAt ¶
type ByCreateAt []FileMeta
func (ByCreateAt) Len ¶
func (a ByCreateAt) Len() int
func (ByCreateAt) Less ¶
func (a ByCreateAt) Less(i, j int) bool
func (ByCreateAt) Swap ¶
func (a ByCreateAt) Swap(i, j int)
type FileMeta ¶
type FileMeta struct {
FileSha1 string
FileName string
FileSize int64
FilePath string
EnableTimes int64
EnableDays int64
CreateAt string
UpdateAt string
}
FileMeta is the metadata of a file
func GetFileMeta ¶
GetFileMeta is to retrieve the metadata of a file by fileSha1
func GetFileMetaDB ¶
GetFileMetaDB is to retrieve the metadata of a file by fileSha1 in database
func GetFileMetasByCreateAt ¶
GetFileMetasByCreateAt is to retrieve the metadata of files by CreateAt
func GetFileMetasByCreateAtDB ¶
GetFileMetasByCreateAtDB is to retrieve the metadata of files by CreateAt in database