Documentation ¶
Index ¶
- type ExecResult
- func DeleteUserFile(username, filehash string) (res ExecResult)
- func GetFileMeta(filehash string) (res ExecResult)
- func GetFileMetaList(limit int64) (res ExecResult)
- func GetUserInfo(username string) (res ExecResult)
- func OnFileUploadFinished(filehash string, filename string, filesize int64, fileaddr string) (res ExecResult)
- func OnUserFileUploadFinished(username, filehash, filename string, filesize int64) (res ExecResult)
- func QueryUserFileMeta(username string, filehash string) (res ExecResult)
- func QueryUserFileMetas(username string, limit int64) (res ExecResult)
- func RenameFileName(username, filehash, filename string) (res ExecResult)
- func UpdateFileLocation(filehash string, fileaddr string) (res ExecResult)
- func UpdateToken(username string, token string) (res ExecResult)
- func UserExist(username string) (res ExecResult)
- func UserSignin(username string, encpwd string) (res ExecResult)
- func UserSignup(username string, passwd string) (res ExecResult)
- type TableFile
- type TableUser
- type TableUserFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecResult ¶
type ExecResult struct { Suc bool `json:"suc"` Code int `json:"code"` Msg string `json:"msg"` Data interface{} `json:"data"` }
ExecResult: sql函数执行的结果
func DeleteUserFile ¶
func DeleteUserFile(username, filehash string) (res ExecResult)
DeleteUserFile : 删除文件(标记删除)
func GetFileMetaList ¶
func GetFileMetaList(limit int64) (res ExecResult)
GetFileMetaList : 从mysql批量获取文件元信息
func OnFileUploadFinished ¶
func OnFileUploadFinished(filehash string, filename string, filesize int64, fileaddr string) (res ExecResult)
OnFileUploadFinished : 文件上传完成,保存meta
func OnUserFileUploadFinished ¶
func OnUserFileUploadFinished(username, filehash, filename string, filesize int64) (res ExecResult)
OnUserFileUploadFinished : 更新用户文件表
func QueryUserFileMeta ¶
func QueryUserFileMeta(username string, filehash string) (res ExecResult)
QueryUserFileMeta : 获取用户单个文件信息
func QueryUserFileMetas ¶
func QueryUserFileMetas(username string, limit int64) (res ExecResult)
QueryUserFileMetas : 批量获取用户文件信息
func RenameFileName ¶
func RenameFileName(username, filehash, filename string) (res ExecResult)
RenameFileName : 文件重命名
func UpdateFileLocation ¶
func UpdateFileLocation(filehash string, fileaddr string) (res ExecResult)
UpdateFileLocation : 更新文件的存储地址(如文件被转移了)
func UpdateToken ¶
func UpdateToken(username string, token string) (res ExecResult)
UpdateToken : 刷新用户登录的token
func UserSignin ¶
func UserSignin(username string, encpwd string) (res ExecResult)
UserSignin : 判断密码是否一致
func UserSignup ¶
func UserSignup(username string, passwd string) (res ExecResult)
UserSignup : 通过用户名及密码完成user表的注册操作
type TableFile ¶
type TableFile struct { FileHash string FileName sql.NullString FileSize sql.NullInt64 FileAddr sql.NullString }
TableFile : 文件表结构体
Click to show internal directories.
Click to hide internal directories.