meta

package
v0.0.0-...-37de6bf Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: MIT, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveFileMeta

func RemoveFileMeta(fileSha1 string)

func UpdateFileMeta

func UpdateFileMeta(fmeta FileMeta)

新增/更新文件元信息

func UpdateFileMetaDB

func UpdateFileMetaDB(fmeta FileMeta) bool

Types

type ByUploadTime

type ByUploadTime []FileMeta

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 //时间戳
}

文件元信息

func GetFileMeta

func GetFileMeta(fileSha1 string) FileMeta

通过sha1获取文件的元信息对象

func GetFileMetaDB

func GetFileMetaDB(fileSha1 string) (FileMeta, error)

func GetLastFileMetas

func GetLastFileMetas(count int) []FileMeta

Jump to

Keyboard shortcuts

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