controllers

package
v0.0.0-...-6617f65 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteFileHandler

func DeleteFileHandler(c *gin.Context)

func DownloadMultiFilesHandler

func DownloadMultiFilesHandler(c *gin.Context)

Files godoc @tags files @summary Download multiple files @description Download files by the specified file paths, will be zipped @accept json @produce octet-stream @param files body DownloadParams true "the files that you want to download" @success 200 {file} binary @failure 400 {object} types.ErrorResult{error=string} @failure 500 {object} types.ErrorResult{error=string} @router /api/storage/download [post]

func DownloadSingleFileHandler

func DownloadSingleFileHandler(c *gin.Context)

Files godoc @tags files @summary Download a single file @description Download a single file by the specified file path @accept json @produce octet-stream @param path path string true "the file that you want to download" @success 200 {file} binary @failure 400 {object} types.ErrorResult{error=string} @router /api/storage/download [get]

func EmptyTrashHandler

func EmptyTrashHandler(c *gin.Context)

func QueryFilesHandler

func QueryFilesHandler(c *gin.Context)

Files godoc @tags files @summary Retrieve files information @description get files by specified path @accept json @produce json @param path path string true "the path that you want to list the files" @success 200 {object} types.JSONResult{data=[]FileInfo} @failure 400 {object} types.ErrorResult{error=string} @router /api/storage/files [get]

func UpdateFilesHandler

func UpdateFilesHandler(c *gin.Context)

func UploadFilesHandler

func UploadFilesHandler(c *gin.Context)

func UserLogin

func UserLogin(c *gin.Context)

Types

type DownloadParams

type DownloadParams struct {
	FilePaths []string `json:"file_paths"`
}

type FileInfo

type FileInfo struct {
	FileName string `json:"file_name"`
	FilePath string `json:"file_path"`
	IsDir    bool   `json:"is_dir"`
}

type UploadMetaData

type UploadMetaData struct {
	Dst map[string]string `json:"dst"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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