Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileItems ¶ added in v0.0.3
func FileItems(c echo.Context) error
@Title fileitem @Summary get fileitems by given path or id. @Description @Tags File @Accept json @Produce json @Param id query string true "file ID (md5)" @Success 200 "OK - get fileitems successfully" @Failure 400 "Fail - incorrect query param id" @Failure 404 "Fail - not found" @Failure 500 "Fail - internal error" @Router /api/file/fileitems [get] @Security ApiKeyAuth
func PathContent ¶
func PathContent(c echo.Context) error
@Title pathcontent @Summary get content under specific path. @Description @Tags File @Accept json @Produce json @Param ym query string true "year-month, e.g. 2022-05" @Param gpath query string true "group path, e.g. group1/group2/group3" @Success 200 "OK - get content successfully" @Failure 500 "Fail - internal error" @Router /api/file/pathcontent [get] @Security ApiKeyAuth
func UploadBodyData ¶ added in v0.0.3
func UploadBodyData(c echo.Context) error
@Title upload-bodydata @Summary upload file action via body content. @Description @Tags File @Accept application/octet-stream @Produce json @Param fname query string true "filename for uploading data from body" @Param note query string false "note for uploading file" @Param group0 query string false "1st category for uploading file" @Param group1 query string false "2nd category for uploading file" @Param group2 query string false "3rd category for uploading file" @Param data body string true "file data for uploading" Format(binary) @Success 200 "OK - return storage path" @Failure 400 "Fail - file param is incorrect" @Failure 500 "Fail - internal error" @Router /api/file/upload-bodydata [post] @Security ApiKeyAuth
func UploadFormFile ¶ added in v0.0.3
func UploadFormFile(c echo.Context) error
@Title upload-formfile @Summary upload file action via form file input. @Description @Tags File @Accept multipart/form-data @Produce json @Param note formData string false "note for uploading file" @Param group0 formData string false "1st category for uploading file" @Param group1 formData string false "2nd category for uploading file" @Param group2 formData string false "3rd category for uploading file" @Param file formData file true "file path for uploading" @Success 200 "OK - return storage path" @Failure 400 "Fail - file param is incorrect" @Failure 500 "Fail - internal error" @Router /api/file/upload-formfile [post] @Security ApiKeyAuth
Types ¶
This section is empty.