meta

package
v0.0.0-...-b3a75bd Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

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

func CreateFileMetaDB(fileMeta FileMeta) bool

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

func DeleteFileMetaDB(fileSha1 string) bool

DeleteFileMetaDB is to delete the metadata of a file in database

func SetFileMeta

func SetFileMeta(fileSha1 string, fileMeta FileMeta)

SetFileMeta is to update the metadata of a file

func SetFileMetaDB

func SetFileMetaDB(fileSha1 string, fileMeta FileMeta) bool

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

func GetFileMeta(fileSha1 string) FileMeta

GetFileMeta is to retrieve the metadata of a file by fileSha1

func GetFileMetaDB

func GetFileMetaDB(fileSha1 string) (FileMeta, bool)

GetFileMetaDB is to retrieve the metadata of a file by fileSha1 in database

func GetFileMetasByCreateAt

func GetFileMetasByCreateAt(limitCount int) []FileMeta

GetFileMetasByCreateAt is to retrieve the metadata of files by CreateAt

func GetFileMetasByCreateAtDB

func GetFileMetasByCreateAtDB(limitCount int) ([]FileMeta, bool)

GetFileMetasByCreateAtDB is to retrieve the metadata of files by CreateAt in database

type MPUploadMeta

type MPUploadMeta struct {
	FileSha1   string
	FileSize   int64
	UploadID   string
	ChunkSize  int
	ChunkCount int
}

MPUploadMeta is the metadata of a multipart upload try

Jump to

Keyboard shortcuts

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