meta

package
v0.0.0-...-316529e Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveFileMeta

func RemoveFileMeta(fileSha1 string)

RemoveFileMeta : 删除文件元信息操作

func UpdateFileMeta

func UpdateFileMeta(fmeta FileMeta)

UpdateFileMeta : 新增/更新文件元信息

func UpdateFileMetaDB

func UpdateFileMetaDB(fmeta FileMeta) bool

UpdateFileMetaDB : 新增/更新文件元信息到数据库

Types

type ByUploadTime

type ByUploadTime []FileMeta

ByUploadTime :排序

func (ByUploadTime) Len

func (a ByUploadTime) Len() int

func (ByUploadTime) Less

func (a ByUploadTime) Less(i, j int) bool

func (ByUploadTime) Swap

func (a ByUploadTime) Swap(i, j int)

type FileMeta

type FileMeta struct {
	FileSha1 string
	FileName string
	FileSize int64
	Location string
	UploadAt string
}

FileMeta : 文件元信息结构

func GetFileMeta

func GetFileMeta(fileSha1 string) FileMeta

GetFileMeta : 通过sha1值获取文件元信息对象

func GetFileMetaDB

func GetFileMetaDB(filesha1 string) (FileMeta, error)

GetFileMetaDB : 从MySQL获取文件元信息

func GetLastFileMetas

func GetLastFileMetas(count int) []FileMeta

GetLastFileMetas : 获取多个文件的元信息

Jump to

Keyboard shortcuts

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