client

package
v0.0.0-...-5447790 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFileMeta

func GetFileMeta(filehash string) (*orm.ExecResult, error)

func GetFileMetaList

func GetFileMetaList(limitCnt int) (*orm.ExecResult, error)

func GetUserInfo

func GetUserInfo(username string) (*orm.ExecResult, error)

func Init

func Init(service micro.Service)

func OnFileUploadFinished

func OnFileUploadFinished(fmeta FileMeta) (*orm.ExecResult, error)

OnFileUploadFinished : 新增/更新文件元信息到mysql中

func OnUserFileUploadFinished

func OnUserFileUploadFinished(username string, fmeta FileMeta) (*orm.ExecResult, error)

OnUserFileUploadFinished : 新增/更新文件元信息到mysql中

func QueryUserFileMeta

func QueryUserFileMeta(username, filehash string) (*orm.ExecResult, error)

func QueryUserFileMetas

func QueryUserFileMetas(username string, limit int) (*orm.ExecResult, error)

func RenameFileName

func RenameFileName(username, filehash, filename string) (*orm.ExecResult, error)

func ToTableFile

func ToTableFile(src interface{}) orm.TableFile

func ToTableFiles

func ToTableFiles(src interface{}) []orm.TableFile

func ToTableUser

func ToTableUser(src interface{}) orm.TableUser

func ToTableUserFile

func ToTableUserFile(src interface{}) orm.TableUserFile

func ToTableUserFiles

func ToTableUserFiles(src interface{}) []orm.TableUserFile

func UpdateFileLocation

func UpdateFileLocation(filehash, location string) (*orm.ExecResult, error)

func UpdateToken

func UpdateToken(username, token string) (*orm.ExecResult, error)

func UserExist

func UserExist(username string) (*orm.ExecResult, error)

func UserSignin

func UserSignin(username, encPasswd string) (*orm.ExecResult, error)

func UserSignup

func UserSignup(username, encPasswd string) (*orm.ExecResult, error)

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
}

FileMeta : 文件元信息结构

func TableFileToFileMeta

func TableFileToFileMeta(tfile orm.TableFile) FileMeta

Jump to

Keyboard shortcuts

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