Documentation ¶
Index ¶
- func DeleteUserFile(username string, filehash string) bool
- func IsFileUploaded(filehash string) bool
- func OnFileRemoved(filehash string) bool
- func OnFileUploadFinished(filehash string, filename string, filesize int64, fileaddr string) bool
- func OnUserFileUploadFinished(username string, filehash string, filename string, filesize int64) bool
- func RenameFileName(username string, filehash string, filename string) bool
- func UpdateFileLocation(filehash string, fileaddr string) bool
- func UpdateToken(username string, token string) bool
- func UserExist(username string) (bool, error)
- func UserSignin(username string, encpwd string) bool
- func UserSignup(username string, passwd string) bool
- type TableFile
- type User
- type UserFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteUserFile ¶
DeleteUserFile: Delete User's File Record, marked as deleted
func IsFileUploaded ¶
IsFileUploaded: File is uploaded or not
func OnFileRemoved ¶
OnFileRemoved: Delete file in Database(only marked as deleted, not real deleted)
func OnFileUploadFinished ¶
OnFileUploadFinished: File upload completed
func OnUserFileUploadFinished ¶
func OnUserFileUploadFinished( username string, filehash string, filename string, filesize int64, ) bool
OnUserFileUploadFinished: Update User File Table
func RenameFileName ¶
RenameFileName
func UpdateFileLocation ¶
func UpdateToken ¶
UpdateToken: Refresh user sign in token
func UserSignin ¶
UserSignin: Check User's Password is valid
Types ¶
type TableFile ¶
type TableFile struct { FileHash string FileName sql.NullString FileSize sql.NullInt64 FileAddr sql.NullString }
func GetFileMeta ¶
GetFileMeta: Query File Meta Data from Database
func GetFileMetaList ¶
GetFileMetaList: Query Batch File Metas from DB
type User ¶
type User struct { Username string Email string Phone string SignupAt string LastActiveAt string Status int }
User Model
Click to show internal directories.
Click to hide internal directories.