service层注释规范化
This commit is contained in:
@@ -7,15 +7,11 @@ import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// @title FindOrCreateFile
|
||||
// @description Check your file if it does not exist, or return current slice of the file
|
||||
// 上传文件时检测当前文件属性,如果没有文件则创建,有则返回文件的当前切片
|
||||
// @auth (2020/04/05 20:22)
|
||||
// @param fileMd5 string
|
||||
// @param fileName string
|
||||
// @param chunkTotal int
|
||||
// @return err error
|
||||
// @return file ExaFile
|
||||
//@author: [piexlmax](https://github.com/piexlmax)
|
||||
//@function: FindOrCreateFile
|
||||
//@description: 上传文件时检测当前文件属性,如果没有文件则创建,有则返回文件的当前切片
|
||||
//@param: fileMd5 string, fileName string, chunkTotal int
|
||||
//@return: err error, file model.ExaFile
|
||||
|
||||
func FindOrCreateFile(fileMd5 string, fileName string, chunkTotal int) (err error, file model.ExaFile) {
|
||||
var cfile model.ExaFile
|
||||
@@ -33,13 +29,11 @@ func FindOrCreateFile(fileMd5 string, fileName string, chunkTotal int) (err erro
|
||||
return err, cfile
|
||||
}
|
||||
|
||||
// @title CreateFileChunk
|
||||
// @description create a chunk of the file, 创建文件切片记录
|
||||
// @auth (2020/04/05 20:22)
|
||||
// @param id unit
|
||||
// @param fileChunkPath string
|
||||
// @param fileChunkNumber int
|
||||
// @return error
|
||||
//@author: [piexlmax](https://github.com/piexlmax)
|
||||
//@function: CreateFileChunk
|
||||
//@description: 创建文件切片记录
|
||||
//@param: id uint, fileChunkPath string, fileChunkNumber int
|
||||
//@return: error
|
||||
|
||||
func CreateFileChunk(id uint, fileChunkPath string, fileChunkNumber int) error {
|
||||
var chunk model.ExaFileChunk
|
||||
@@ -50,13 +44,11 @@ func CreateFileChunk(id uint, fileChunkPath string, fileChunkNumber int) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// @title DeleteFileChunk
|
||||
// @description delete a chuck of the file, 删除文件切片记录
|
||||
// @auth (2020/04/05 20:22)
|
||||
// @param FileMd5 string
|
||||
// @param FileName string
|
||||
// @param FilePath string
|
||||
// @return error
|
||||
//@author: [piexlmax](https://github.com/piexlmax)
|
||||
//@function: DeleteFileChunk
|
||||
//@description: 删除文件切片记录
|
||||
//@param: fileMd5 string, fileName string, filePath string
|
||||
//@return: error
|
||||
|
||||
func DeleteFileChunk(fileMd5 string, fileName string, filePath string) error {
|
||||
var chunks []model.ExaFileChunk
|
||||
|
||||
Reference in New Issue
Block a user