Documentation ¶
Index ¶
- Constants
- func CheckFile(ctx *gin.Context)
- func CreateFolder(ctx *gin.Context)
- func DeleteFile(ctx *gin.Context)
- func DeleteFileArr(ctx *gin.Context)
- func DownloadFile(ctx *gin.Context)
- func FileCategory(fileExt string) string
- func FileList(ctx *gin.Context)
- func FileListByFileType(ctx *gin.Context)
- func FindFilePath(ctx *gin.Context)
- func FormUpload(ctx *gin.Context)
- func GenerateRandomMd5(n ...int) string
- func GenerateRandomStr(n int) string
- func GetFileHash(filePath string) (string, error)
- func GetUserProfile(ctx *gin.Context)
- func ImageFilter(ctx *gin.Context)
- func MultiUpload(ctx *gin.Context)
- func PostLogin(ctx *gin.Context)
- func PostRegister(ctx *gin.Context)
- func Rename(ctx *gin.Context)
- func Search(ctx *gin.Context)
- func ServerStatic(ctx *gin.Context)
- func SliceUpload(ctx *gin.Context)
- func Video(ctx *gin.Context)
- func VideoInfo(ctx *gin.Context)
- type CreateDirForm
- type DeleteFileArrForm
- type DeleteForm
- type LoginForm
- type LoginResult
- type MultiUploadUrl
- type QueryForm
- type RegisterForm
- type RenameForm
- type UploadForm
- type UserData
- type UserDataTokenRes
- type UserFile
- type UserFileListRes
Constants ¶
View Source
const BASE_PATH = "./static/upload/"
上传文件夹地址
View Source
const DOWNLOADS_PATH = "static/upload"
View Source
const RELATIVEPATH_BASE_PATH = "/static/upload/"
返回 url 地址
Variables ¶
This section is empty.
Functions ¶
func GetUserProfile ¶
func PostRegister ¶
Types ¶
type CreateDirForm ¶
type DeleteFileArrForm ¶
type DeleteFileArrForm struct {
DeleteFileArr []uint `form:"deleteFileArr" json:"deleteFileArr" binding:"required"`
}
type DeleteForm ¶
type DeleteForm struct {
FsId uint `form:"fs_id" json:"fs_id" binding:"required"`
}
type LoginResult ¶
type LoginResult struct {
Token string `json:"token"`
}
type MultiUploadUrl ¶
type QueryForm ¶
type QueryForm struct { Order string `form:"order,default='date'" json:"order,default='date'"` DirId uint `form:"dirId,default=0" json:"dirId,default=0"` Limit int `form:"limit,default=50" json:"limit,default=50" binding:"max=100,min=50"` Desc int `form:"desc,default=1" json:"desc,default=1"` Page int `form:"page,default=1" json:"page,default=1"` FileType string `form:"fileType" json:"fileTye"` Q string `form:"q" json:"q"` }
type RegisterForm ¶
type RenameForm ¶
type UploadForm ¶
type UploadForm struct { Index int `form:"index" json:"index"` FileMD5 string `form:"fileMD5" json:"fileMD5"` DirId uint `form:"dirId,default=0" json:"dirId,default=0"` UploadType string `form:"uploadType" json:"uploadType"` FileName string `form:"fileName" json:"fileName"` FileSize int64 `form:"fileSize" json:"fileSize"` }
type UserDataTokenRes ¶
type UserFileListRes ¶
type UserFileListRes struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.