controllers

package
v0.0.0-...-64108d5 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadFile

func DownloadFile(c *gin.Context)

DownloadFile godoc @Summary Download file @Description Download file by uploader and filename you can get from listFile endpoint so there is no need test this endpoint just click on the link provided by listFile endpoint if using postman @Tags File @Accept json @Produce json @Param uploader query string true "Uploader" @Param filename query string true "Filename" @Success 200 {object} models.File @Router /download [get]

func ListFile

func ListFile(c *gin.Context)

ListFile godoc @Summary List file @Description List file @Tags File @Param Authorization header string true "Authorization. How to input in swagger : 'Bearer <insert_your_token_here>'" @Accept json @Security BearerToken @Produce json @Success 200 {object} ListFileOutput @Router /file/list [get]

func Login

func Login(c *gin.Context)

Login godoc @Summary Login @Description Login @Tags User @Accept json @Produce json @Param user body models.User true "User" @Success 200 {object} models.User @Router /login [post]

func UploadFile

func UploadFile(c *gin.Context)

UploadFile godoc @Summary Upload file @Description Upload file @Tags File @Param Authorization header string true "Authorization. How to input in swagger : 'Bearer <insert_your_token_here>'" @Accept json @Security BearerToken @Produce json @Param file formData file true "File" @Success 200 {object} models.File @Router /file/upload [post]

Types

type ListFileOutput

type ListFileOutput struct {
	models.File
	Path string `json:"path"`
}

Jump to

Keyboard shortcuts

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